/MorphoSource_SF

A generated Hyrax-based MorphoSource application (Hyrax v2.1.0.beta2)

Primary LanguageRuby

MorphoSource_SF

A generated Hyrax-based MorphoSource application

Note that this application is intended to run within the morphosource-vagrant virtual machine

Prerequisites (vagrant / virtualbox)

  • Vagrant version 1.8.5+

    You can quickly check to see if you have a suitable version of vagrant installed by running vagrant -v

    If you don't have vagrant installed, you can download it -- it's available for both Mac and Windows, as well as Debian and Centos.

  • VirtualBox

    Vagrant runs inside of a Virtual Machine (VM) hosted by VirtualBox, which is made by Oracle and is free to download. They have version for Mac and Windows, as well as Linux and Solaris.

    You can quickly check to see if you have VirtualBox installed by running vboxmanage --version

Setup the Environment

Vagrant

  1. clone the morphosource-vagrant repository

    git clone https://github.com/morphosource/morphosource-vagrant.git

  2. move to the morphosource-vagrant folder, then clone the MorphoSource_SF repository

    cd morphosource-vagrant

    git clone https://github.com/MorphoSource/MorphoSource_SF.git

  3. startup vagrant

    vagrant up

    This will run through provisioning the new Virtual Machine. The first time it runs, it will take a while to complete. In the future when you want to startup the dev environment, you'll run the same command but it will startup much more quickly

    Vagrant creates a shared folder that you can access both inside the VM and on your workstation. We've found it's best to do your git operations exclusively via the workstation folder.

    Shell into vagrant box

    vagrant ssh

MorphoSource application

This repo (MorphoSource_SF) is included as a submodule in morphosource-vagrant, so the folder and files are there already.

  1. Move to the MorphoSource_SF folder

    cd /vagrant/MorphoSource_SF

    then update the MorphoSource_SF repository with the following two commands

    git fetch

    git pull origin master

  2. Run MorphoSource_SF setup script

    ../install_scripts/morphosource_sf.sh

  3. start the server(s)

    bin/rails hydra:server

    This starts Solr, Fedora, and Rails

  4. Create default admin set

    Open a new ssh session and shell into vagrant:

    cd morphosource-vagrant

    vagrant ssh

    cd /vagrant/MorphoSource_SF

    then run

    bin/rails hyrax:default_admin_set:create

    (you can close the session when it's done)

  5. The application should now be running at localhost:3000. You can try to do some things like creating a new user account and depositing an object

    *Note that if you would like to give your user account admin rights, you'll need to edit the config/role_map.yml file. Create a new role type under the development section at the top named 'admin:' and add the user account you created under it as '- email@address.com'. After updating the role_map.xml, shutdown and restart the rails server to see the change. *

Shut down the application

  • to shut down the app, stop the rails server by pressing Ctrl-C, logout of vagrant logout, and then shutdown the VM vagrant halt

Start up the application

  • to startup again, run vagrant up, vagrant ssh, cd /vagrant/MorphoSource_SF, and bin/rails hydra:server

Solr and Fedora

Environment (via morphosource-vagrant)

References

Instructions are based on the Samvera Hyrax installation instructions