view · edit · sidebar · attach · print · history

20120222-setup-ydpm-and-access-test

<< | Index | >>


summary

  • setuped ydpm for time management.
    • updated /usr/bin/ydpm and /usr/lib/ruby/site_ruby/1.8/ydpm/commandline.rb.
    • requested create user.
    • read README (updated README)

index


ydpm

setup

check out with git clone git+ssh://ywesee@scm.ywesee.com/home/ywesee/git/ydpm
checked required libraries and gems.

$ sudo gem18 install rmail

then setup & install via ruby18

$ ruby18 install.rb config
$ ruby18 install.rb setup
$ sudo ruby18 install.rb install

edited following files to run ydpm with ruby18

  • /usr/bin/ydpm
  • /usr/lib/ruby/site_ruby/1.8/ydpm/commandline.rb

shebang

#!/usr/bin/env ruby
#!/usr/bin/env ruby18

request_access

ran ydpm in console.

$ ydpm autologin=false

ydpm.yml

put yml config file to ~/.ydpm/ydpm.yml

---
autologin: true
ssh_tunnelport: '12350'
home_project: '/'
ssh_host: 'xx.xx.xx.xx'
ssh_user: 'yasu'
editor: /usr/bin/vim
user: yasaka
private_key: /home/yasu/.ssh/id_dsa

ran ydpm autologin=false
got druby connection refused error.

moved(removed) my current id_dsa and id_dsa.pub files from ~/.ssh.
Then one more tried.

$ ydpm autologin=false #=> edit via vim
~/.ydpm/ydpm20120222-12152-r9tdar-0" 7L, 181C written
-> The key at /home/yasu/.ssh/id_dsa could not be loaded. Do you want to generate a new DSA-Key?
Enter the desired Key-Size or 0 to abort [0]> 1024
-> Generating DSA-Key in /home/yasu/.ssh/id_dsa, please wait.
-> druby://localhost:12345 - #<Errno::ECONNREFUSED: Connection refused - connect(2)>
status: stopped

I could get correct response.
But still conn error remains.

Then changed ~/.ydpm/ydpm.yml like this.

  • ssh tunnel port to '12348'
  • ssh user to 'ywesee' (not yasaka)
---
autologin: true
ssh_tunnelport: '12348'
home_project: '/'
ssh_host: '62.12.131.38'
ssh_user: 'ywesee'
editor: /usr/bin/vim
user: yasaka
private_key: /home/yasu/.ssh/id_dsa

I could get expected result.

$ ydpm autologin=false #=> edit via vim
"~/.ydpm/ydpm20120222-12286-1d8vsnr-0" 7L, 181C written
-> The key at /home/yasu/.ssh/id_dsa could not be loaded. Do you want to generate a new DSA-Key?
Enter the desired Key-Size or 0 to abort [0]> 1024
-> Generating DSA-Key in /home/yasu/.ssh/id_dsa, please wait.
-> #<YDPM::Request:0xb72e3184>
status: stopped

create user

administrator part

I sent generated id_dsa.pub file to administrator.
This id_dsa.pub is different format against one by ssh-keygen.

Administrator could create_user(in my case 'yasaka' user) without uploading my id_dsa file to server.
It needs set public_key path to id_dsa.pub via create_user command (for example, in admin user's local machine)


access test

test heavy access via following scripts.

NOTE:

  to make sure memory limit before run batch. (It may need to decrease count of line.)

get production access_log.

$ scp ywesee@server:/var/www/oddb.org/log/oddb/access_log .

then run

$ sh batch.sh

check threads

check fachinfo patinfo

My local oddb.org has 404 errors about Fachinfo and Patinfo in request loop output.
Its are not problem.
But, checked and pursued flow for fachinfo and patinfo jobs

/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-2.0.1/lib/mechanize/http/agent.rb:241:in `fetch': 404 => Net::HTTPNotFound (Mechanize::ResponseCodeError)
from /usr/local/lib/ruby/rubygems/1.9.1/gems/mechanize-2.0.1/lib/mechanize.rb:386:in `get'
from ./agentccess_test.rb:37:in `block in <main>'
from ./access_test.rb:33:in `timees'
from ./access_test.rb:33:in `<main>'
flow
* update_fachinfo
  - update_textinfo_news
  - update_textinfos
    - TextInfoPlugin
      - import_news
      - import_fulltext
message
Plugin: ODDB::TextInfoPlugin
Error: RuntimeError
Message: please configure ODDB.config.text_info_newssource to proceed

To update news needs text_info_newssource in etc/oddb.yml

text_info_newssource: ''

copied from production server.

text_info_newssource: 'http://www.documed.ch/de/produkte/kompendium-archiv/neue-geaenderte-fachinformationen-2011.php'

import_daily cron task use this value.

TODO

  • check import_daily job for cron.
view · edit · sidebar · attach · print · history
Page last modified on February 23, 2012, at 06:34 PM