(see https://code.library.ualberta.ca/hg/ansible-dev/hydranorth.yml for authoritative list)
(see https://code.library.ualberta.ca/hg/ansible-dev/hydranorth.yml to apply Ansible playbook)
ansible-playbook hydranorth.yml
This assumes that you've created a hosts inventory with a hydranorth group. If not consider using the vagrant or dev inventories that exist
ansible-playbook -i vagrant hydranorth.yml
If you're using Vagrant the easiest path is to
vagrant up hydranorth
Developers not wanting to have to ssh into the Vagrant to work on the application can mount the code from the host operating system by doing the following:
mv /var/www/sites/hydranorth /var/www/sites/hydranorth.bak
exit the vagrant and add the following to the Vagrant file above the provider line:
config.vm.define "hydranorth", primary: true do |hydranorth|
#...
hydranorth.vm.synced_folder "<path to host's hydranorth repo directory>", "/var/www/sites/hydranorth"
hydranorth.vm.provider "virtualbox" do |v|
#...
ssh into the vagrant and symlink the jetty directory on the vagrant into place (java does not like it when the jetty directory is mounted on the Host's share):
cd /var/www/sites/hydranorth
ln -s /var/www/sites/hydranorth.bak/jetty jetty
(see http://cardiff.library.ualberta.ca/job/HydraNorth/)
rake spec
Relative to the application directory
log/<RAILS_ENV>.log
jetty/jettywrapper.log
jetty/logs
log/resque-pool.std[err|out].log
The shell script bin/restart-all
runs these commands:
cd /var/www/sites/hydranorth && rake jetty:restart
service resque-pool restart
service httpd restart
The shell script bin/reset-all
runs these commands:
rake jetty:stop
rake jetty:clean
rake sufia:jetty:config
rake jetty:start
redis-cli
$ FLUSHALL
$ exit
kill -9 `ps aux | grep [r]esque | grep -v grep | cut -c 10-16` # another way to stop all resque workers
service resque-pool start
rake db:reset
rake migration:user_migration['lib/tasks/migration/test-metadata/users.txt']
rake migration:era_collection_community['lib/tasks/migration/test-metadata/community']
rake migration:era_collection_community['lib/tasks/migration/test-metadata/collection']
rake migration:eraitem['lib/tasks/migration/test-metadata']
rake migration:eraitem['lib/tasks/migration/test-metadata',false]
rake hydranorth:update_special_itemtype
will update the resource type "report" to "computing science technical report" if this item is a member of "technical report". In order for the rake task to work, the collection has to be migrated already and exist in the system.rake hydranorth:characterize
will push all the items to the characterize resque pool for characterization, and thumbnail creation. This should be done after a complete fresh migration - as currently the migration job disables the resque jobs for faster completion.
rake hydranorth:characterize_some['filename']
will push the items in the given list to the characterize resque job. rake batch:ingest_csv['batchData.csv','directory_where_batchFiles_lives','investigation_id','ingest_mode']
rake migration:dataverse_objects['spec/fixtures/migration/test-metadata/dataverse/']
for Google Scholar
rake sitemap:generate
rake hydranorth:harvest:geonames_cities
RAILS_ENV = {{RAILS_ENV}} bundle exec ruby bin/fix/fix-audit.rb 'triples','sample-sparql.txt'
RAILS_ENV = {{RAILS_ENV}} bundle exec ruby bin/fix/fix-audit.rb 'thesis' <pair tree prefix|id>
RAILS_ENV = {{RAILS_ENV}} bundle exec ruby bin/fix/fix-audit.rb 'reindex' <pair tree prefix|id>
A set of rake tasks is also added for index jobs:
rake hydranorth:solr:index[id]
Index a single object with IDrake hydranorth:solr:index_pairtree[input]
Index with a pairtree structurerake hydranorth:solr:batch_index[directory|file]
Index from a list of noids, usually from a solr csv output that just contains noids.rake hydranorth:solr:reindex_all
Complete reindex of the repositoryA shell script will update namespace uris
/bin/fix/fix.rb
is to update all the namespace uris. Requires user to replace @server with the Fedora server location before using./bin/fix/run.sh
is to run script through all the pairtree combinations. Requires being run from the bin/fix directory.For hydranorth to successfully create and maintain DOI's you must configure the environmental variables for EZID's API. For more details on these environmental variables see the secrets file at: config/secrets.yml
. For non-production environments you can use the apitest
test account provided by EZID by configuring it's password using the EZID_PASSWORD
environment variable.