view · edit · sidebar · attach · print · history

20130612-migel

<< | Index | >>


Summary

  • Try to make migel work on funtoo oddg

Commits

Index


setup migel

Requirements as per E-Mail from Zeno

  1. oddb2tdat ist ein _Export_ welchen Du auch im jobs Verzeichnis von oddb.org findest. (/var/www/oddb.org/jobs/export_oddb2tdat)
  2. Dazu muss bin/swissindex_nonpharmad laufen
  3. Dazu muss die MiGel DB laufen.
  4. Die MiGel DB ist ein separates scm.ywesee.com Projekt und wird wie alle anderen Services auch via "bin/migeld" gestartet.
  5. Der MiGel DB Backup ist am gleichen Ort wie der oddb.org DB Backup auf dem Thinpower. Hohl ihn von dort und erstell die MiGel DB.
  6. Den MiGel Setup bitte auch gleich mit ins Puppet / Vagrant Setup mitaufnehmen.
  7. Testen kannst Du auf dem Localhost in dem Du im local.oddb.org auf den MiGel-Button klickst. Das kannst Du auch gleich mit Watir testen.
  • swissindex_nonpharma. Already running
 
root      3425  3407  0 08:36 ?        00:00:00 supervise ch.oddb-swissindex_nonpharma
root      3434  3425  0 08:36 ?        00:00:00 sudo -u apache /var/www/oddb.org/ext/swissindex/bin/swissindex_nonpharmad
apache    3497  3434  0 08:36 ?        00:00:00 ruby /var/www/oddb.org/ext/swissindex/bin/swissindex_nonpharmad

Forced using postgresql 8.4 by calling sudo eselect postgresql set 8.4. Then emerge --unmerge dev-db/postgresql-base-9.2.4

  • Make postgres DB for migel
  • Added script get_db_dumps.rb to get (via scp) postgresql database dumps from yesterday into sub-directory db-dumps.
  • Making /var/www/migel/bin/migeld work

On thinpower migel uses the database migel.ruby193 as defined in /var/www/migel/etc/migel.yml. Creating the file /etc/migel/migel.yml via puppet. But still cannot connect to database migel. This script does not work, as it cannot connect to the postgresql database.

how to grant necessary database privileges to Migel

On Thinpower the command psql -U postgres migel.ruby193 works.

On my vagrant system I must use sudo -u apache psql migel or I cannot connect to the db.

On Thinpower had a look at the grants.

psql -U postgres migel.ruby193
Dies ist psql 8.3.8, das interaktive PostgreSQL-Terminal.

migel.ruby193=# \dg
                                       Liste der Rollen
   Rollenname   | Superuser | Rolle erzeugen | DB erzeugen |    Verbindungen    | Mitglied von 
----------------+-----------+----------------+-------------+--------------------+--------------
 migel          | nein      | nein           | ja          | keine Beschränkung | {}
 oddb           | nein      | nein           | nein        | keine Beschränkung | {}
 postgres       | ja        | ja             | ja          | keine Beschränkung | {}

After changing the db_user to apache in /etc/migel/migel.yml I get

sudo -u apache /var/www/migel/bin/migeld
/var/www/migel/bin/migeld:6: warning: variable $KCODE is no longer effective; ignored
ERROR:  relation "object" already exists
ERROR:  must be owner of relation object
ERROR:  must be owner of relation object
ERROR:  relation "object_connection" already exists
ERROR:  must be owner of relation object_connection
ERROR:  relation "collection" already exists
ERROR:  permission denied for relation object
/usr/local/lib64/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:62:in `rescue in execute': ERROR:  permission denied for relation object (DBI::ProgrammingError)
        from /usr/local/lib64/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:37:in `execute'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:96:in `execute'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:81:in `execute'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:115:in `select_one'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/connection_pool.rb:39:in `block in method_missing'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/connection_pool.rb:29:in `next_connection'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/connection_pool.rb:38:in `method_missing'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:513:in `restore_named'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:297:in `block in fetch_named'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `call'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `fetch_or_do'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:296:in `fetch_named'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:351:in `indices'
        from /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:474:in `setup'
        from /var/www/migel/lib/migel/persistence/odba.rb:21:in `<module:Migel>'
        from /var/www/migel/lib/migel/persistence/odba.rb:15:in `<top (required)>'
        from /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/www/migel/lib/migel/persistence.rb:9:in `<module:Migel>'
        from /var/www/migel/lib/migel/persistence.rb:8:in `<top (required)>'
        from /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

Ran sudo emerge --oneshot portage to avoid warning An update to portage is available. It is _highly_ recommended when restarting vagrant.

Conclusion: must also bring pg_hba.conf pg_ident.conf postgresql.conf in /etc/postgresql-8.4/ into vagrant.

May be I should also install etckeeper. But must configure git before.

Bring up a fresh instance of vagrant-oddb

In parallel tried to bring up a new instance of vagrant. Made the following corrections

  • commit: Add runpuppet and runlibrarian helpers
  • commit: Install librarian-puppet via shell/main.sh. Then it is available very early
  • commit: Corrected initialisation of etckeeper

Access via git to scm.ywesee.com not possible, as server is being restored. There a lot of stuff does not work.

Want to be able to use vagrant > 1.2 with funtoo

Finally made a simple funtoo box come up with vagrant > 1.2.2. See https://github.com/mitchellh/vagrant/pull/1826

There are other people interested in funtoo/vagrant. See

Committed changes to fix [[https://github.com/ngiger/vagrant/commit/5d68c4d19ff972bc39f2a4e60b85d398ca381dce | funtoo network configuration ]

view · edit · sidebar · attach · print · history
Page last modified on June 17, 2013, at 09:24 AM