Skip to content

Hyku Test Environment Hints

Tim Donohue edited this page Nov 3, 2017 · 9 revisions

SSH to server

All staff members should have SSH access (via your personal SSH key).

Start / Stop Hyku

NOTE: Fedora, Solr, and Postgres all start/stop automatically (on server boot). However, Hyku is currently a manual start/stop process.

Just use the provided start/stop script to start/stop Hyku:

# Start Hyku (on port 3000)
~/start-hyku

# Stop Hyku
~/stop-hyku

Afterwards, Hyku should be visible at: http://ec2-34-230-187-85.compute-1.amazonaws.com:3000/

Creating the default Admin Set (in Fedora)

  1. SSH into the server
  2. cd ~/hyku/
  3. Run this command:
SOLR_URL="http://127.0.0.1:8983/solr/hyku-development" FEDORA_URL="https://627cys77vl.execute-api.us-east-1.amazonaws.com/dev/" bundle exec rake hyrax:default_admin_set:create

Pointing Hyku at a different Fedora

The Fedora being used by Hyku is configured in Hyku's /config/fedora.yml

  • If you simply need to change the location of the Fedora, that can be achieved by updating the FEDORA_URL environment variable in our ~/start-hyku script. Simply edit that script, and change the value of FEDORA_URL.
  • If the Fedora requires authentication, the username/password can be found in the /config/fedora.yml configuration file.

Hyku, Fedora and Solr

Hyku:

Fedora:

Solr:

Debugging Tips

Clearing out data

Clearing the Solr index

SSH into the server (or run remotely by replacing localhost with the server name) and run:

curl http://localhost:8983/solr/hyku-development/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

Clearing the Postgres database

  1. SSH into the server
  2. ~/stop-hyku
  3. cd ~/hyku
  4. bundle exec rake db:drop db:create db:migrate
  5. ~/start-hyku
  6. You will need to recreate the default Admin user, by simply registering a new account in the Hyku UI (the first registered account is given admin privileges).

Clearing out DynamoDB

Simply visit the DynamoDB UI, select all items and select "Delete" from the Actions.