- Notifications
You must be signed in to change notification settings - Fork2
Hyku: A turnkey Samvera application built on the latest and greatest community components. Brought to you by the Hydra-in-a-Box project partners and IMLS.
License
ubiquitypress/hyku
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- Running the stack
- Single Tenant Mode
- Switching accounts
- Development dependencies
- Importing
- Compatibility
- Product Owner
- Help
- Acknowledgments
On OS X or Linux we recommend runningDory. It acts as a proxy allowing you to access domains locally such as hyku.test or tenant.hyku.test, making multitenant development more straightforward and prevents the need to bind ports locally. Be sure toadjust your ~/.dory.yml file to support the .test tld. You can still run in development via docker with out Dory, but to do so please uncomment the ports section in docker-compose.yml and then find the running application at localhost:3000
gem install dorydory up
docker-compose up web workers
This command starts the whole stack in individual containers allowing Rails to be started or stopped independent of the other services. Once that starts (you'll see the linePassenger core running in multi-application mode.
to indicate a successful boot), you can view your app in a web browser with at either hyku.test or localhost:3000 (see above). When donedocker-compose stop
shuts down everything.
The full spec suite can be run in docker locally. There are several ways to do this, but one way is to run the following:
docker-composeexec web rake
solr_wrapperfcrepo_wrapperpostgres -D ./db/postgresredis-server /usr/local/etc/redis.confbin/setupDISABLE_REDIS_CLUSTER=true bundleexec sidekiqDISABLE_REDIS_CLUSTER=true bundleexec rails server -b 0.0.0.0
See theHyku Development Guide for how to run tests.
You can log all of the I18n lookups to the Rails logger by setting the I18N_DEBUG environment variable to true. This will add a lot of chatter to the Rails logger (but can be very helpful to zero in on what I18n key you should or could use).
$I18N_DEBUG=true bin/rails server
AWS CloudFormation templates for the Hyku stack are available in a separate repository:
We distribute twodocker-compose.yml
configuration files. The first is set up for development / running the specs. The other,docker-compose.production.yml
is for running the Hyku stack in a production setting. . Once you havedocker installed and running, launch the stack using e.g.:
docker-compose up -d web workers
Note: You may need to add your user to the "docker" group.
newgrp docker
Thesamvera-vagrant project provides another simple way to get started "kicking the tires" of Hyku (andHyrax), making it easy and quick to spin up Hyku. (Note that this is not for production or production-like installations.) It requiresVirtualBox andVagrant.
Hyku provides a set ofHelm charts for deploying to a Kubernetes cluster. Detailed instructions are provided for deploying locally with Docker for Mac.
Much of the default configuration in Hyku is set up to use multi-tenant mode. This default mode allows Hyku users to run the equivielent of multiple Hyrax installs on a single set of resources. However, sometimes the subdomain splitting multi-headed complexity is simply not needed. If this is the case, then single tenant mode is for you. Single tenant mode will not show the tenant sign up page, or any of the tenant management screens. Instead it shows a single Samvera instance at what ever domain is pointed at the application.
To enable single tenant, in your settings.yml file change multitenancy/enabled tofalse
or setSETTINGS__MULTITENANCY__ENABLED=false
in yourdocker-compose.yml
anddocker-compose.production.yml
configs. After changinig this setting, runrails db:seed
to prepopulate the single tenant.
In single tenant mode, both the application root (eg. localhost, or hyku.test) and the tenant url single.* (eg. single.hyku.test) will load the tenant. Override the root host by setting multitenancy/root_host in settings.yml orSETTINGS__MULTITENANCY__ROOT_HOST
.
To change from single- to multi-tenant mode, change the multitenancy/enabled flag to true and restart the application. Change the 'single' tenant account cname in the Accounts edit interface to the correct hostname.
There are three recommend ways to switch your current session from one account to another by using:
switch!(Account.first)# orswitch!('my.site.com')# orswitch!('myaccount')
Hyku supports multitenancy using theapartment
gem.apartment
works best with a postgres database.
- Set bulkrax -> enabled to true in settings (via file or env variable)
- Add
require bulkrax/application
to app/assets/javascripts/application.js and app/assets/stylesheets/application.css files.
(in adocker-compose exec web bash
if you're doing docker otherwise in your terminal)
bundleexec rails db:migrate
./bin/import_from_csv localhost spec/fixtures/csv/gse_metadata.csv ../hyku-objects
./bin/import_from_purl ../hyku-objects bc390xk2647 bc402fk6835 bc483gc9313
- Ruby 2.4 or the latest 2.3 version is recommended. Later versions may also work.
- Rails 5 is required. We recommend the latest Rails 5.1 release.
The Samvera community is here to help. Please see oursupport guide.
This software was developed by the Hydra-in-a-Box Project (DPLA, DuraSpace, and Stanford University) under a grant from IMLS.
This software is brought to you by the Samvera community. Learn more at theSamvera website.
About
Hyku: A turnkey Samvera application built on the latest and greatest community components. Brought to you by the Hydra-in-a-Box project partners and IMLS.
Topics
Resources
License
Code of conduct
Stars
Watchers
Forks
Packages0
Languages
- Ruby81.4%
- HTML13.0%
- JavaScript2.4%
- SCSS1.5%
- Shell0.7%
- CSS0.5%
- Other0.5%