Skip to content
Fedora repository Vagrant environment
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
dist
files
manifests
scripts
.gitignore
LICENSE.md
README.md
Vagrantfile

README.md

fcrepo-vagrant

This is a multi-machine Vagrant that simulates the UMD Libraries' production Fedora 4 setup. It consists of a PostgreSQL database server, a Solr server, and the Fedora 4 application server running Tomcat, Karaf, and Fuseki.

Setup

  1. Clone this repository:

    cd /apps/git
    git clone git@github.com:umd-lib/fcrepo-vagrant
    
  2. Clone fcrepo-env into /apps/git/fcrepo-env, and check out the develop branch:

    git clone git@bitbucket.org:umd-lib/fcrepo-env.git -b develop
    
  3. Clone fedora4-core into /apps/git/fedora4-core, and check out the develop branch:

    git clone git@bitbucket.org:umd-lib/fedora4-core.git -b develop
    
  4. Download an Oracle JDK 8 tarball (current version is 8u65) and place a copy of it in both the dist/fcrepo and dist/solr directories.

  5. Add fcrepolocal and solrlocal to your workstation's /etc/hosts file:

    sudo echo "192.168.40.10  fcrepolocal" >> /etc/hosts
    sudo echo "192.168.40.11  solrlocal" >> /etc/hosts
    
  6. Start the Vagrant:

    cd /apps/git/fcrepo-vagrant
    vagrant up
    

Congratulations, you should now have a running fcrepo-vagrant!

Starting the application

The applications will only start automatically during the first vagrant up (provisioning). You should start solr and fedora manually anytime you restart the VM.

Start Solr

vagrant ssh solr
cd /apps/solr/solr
./control start

Start Fedora

vagrant ssh fcrepo
cd /apps/fedora
./control start

Authentication

By default, Tomcat is configured to accept any UMD directory authenticated user and assigns them fedoraAdmin privileges. This is controlled by the LDAP_COMMON_ROLE environment variable in config/env. The full Grouper role DN that is used is cn=Application_Roles:Libraries:FCREPO:FCREPO-Administrator,ou=grouper,ou=group,dc=umd,dc=edu.

Bootstrap Repository Data

By default, the last step of provisioning the fcrepo machine creates a skeleton of bootstrap content in the repository (top level containers and minimal ACLs to support testing and interaction with the IIIF server). You can disable this step to start from an empty repository by setting the environment variable EMPTY_REPO before starting the Vagrant:

EMPTY_REPO=1 vagrant up

Restoring Repository Data

If you restore repository data from a JCR backup, you will need to restart Tomcat before indexing will work properly. For some reason, the JCR restore processes causes Tomcat to stop sending JMS messages.

Client Certificates

To create a client certificate signed by the fcrepo Vagrant's CA, run the bin/clientcert script from the host (not the Vagrant!):

bin/clientcert
# creates fcrepo-client.{key,pem} with subject CN=fcrepo-client

bin/clientcert batchloader
# creates bactchloader.{key,pem} with subject CN=batchloader

bin/clientcert batchloader bactchloader-client
# creates batchloader-client.{key,pem} with subject CN=batchloader

Testing

To confirm that the system is running properly, you may run the indexing tests from fcrepo-test. Note that these tests must be run with a user that has write access to https://fcrepolocal/fcrepo/rest/tmp.

Self-Signed Certificate Warnings

The Apache web server in this Vagrant is configured to use a self-signed certificate. This means that the first time you bring up the Vagrant, when you access https://fcrepolocal/ through your browser, you will get a certificate security warning. The SSL certificate is cached in dist/fcrepo, so if you destory and recreate the Vagrant, you will not have to add a new security exception. You can at any time delete the cached certificate to force the regeneration the next time you provision the Vagrant.

The Solr web server also uses a self-signed HTTPS certificate, cached in dist/solr.

VM Info

Box Name Hostname IP Address OS Open Ports
fcrepo fcrepolocal 192.168.40.10 CentOS 6.6 80,443,8161
solr solrlocal 192.168.40.11 CentOS 6.6 8983,8984
postgres pglocal 192.168.40.12 CentOS 6.6 5432

Vagrantfile

License

See the LICENSE file for license rights and limitations (Apache 2.0).

You can’t perform that action at this time.