Giter Site home page Giter Site logo

dams-vagrant's Introduction

DAMS Vagrant (+ Ansible )

UCSD DAMS Vagrant Virtual Machine that is provisioned via Ansible.

Requirements

Provision

  1. git clone [email protected]:ucsdlib/dams-vagrant.git
  2. cd dams-vagrant
  3. make all
  4. ansible-playbook main.yml

If you want to run the tests against a different branch or tag than develop you can specify that in the playbook command above, such as:

ansible-playbook main.yml --extra-vars "damspas_version=feature/my-widget" This will ensure the initially checked out branch of damspas is what you want.

At this point the virtual machine will be up and running! You do not need to run vagrant up.

You can confirm this by browsing to damspas or one of the tomcat apps using links documented in the Environment section.

Usage

If you have previously provisioned the virtual machine, you may just start it with vagrant up.

You can shell into the machine with vagrant ssh or ssh -p 2222 vagrant@localhost

The Tomcat and Postgres services will start on boot, but you will need to start the Rails webserver for damspas yourself:

vagrant ssh
cd /vagrant/damspas
bundle exec unicorn -p 3000

Vagrant Configuration

By default, the Vagrantfile will set up the VM with 2G of RAM and 2 CPUs. If you want to alter this for your own usage, feel free to do so.

Additional Data

You can load test records into DAMS Repository, installed in the Vagrant VM, using cURL:

curl -u dams:dams -d @your_damspas_path/damspas/spec/fixtures/damsObject.xml http://localhost:8080/dams/api/objects/bd22194583

Environment

  • Ubuntu 16.04.3 64-bit machine with:
    • Tomcat 7 at http://localhost:8080
      • Manager username = "tomcat", password = "tomcat"
    • DAMS Repository at http://localhost:8080/dams
      • Repository code will be available in the /dams-vagrant root on the host machine. You can edit source using your editor of choice.
      • Installed in Tomcat container
      • Data and configuration files in "/pub/dams"
    • Digital Collections at http://localhost:3000
      • Repository code will be available in the /dams-vagrant root on the host machine. You can edit source using your editor of choice.
      • On the guest/vm the code directory is available in /vagrant/damspas
    • Solr 4.0.0 at http://localhost:8080/solr, for indexing & searching your content.
      • Installed in Tomcat container
      • Data and configuration files in "/var/lib/tomcat7/solr"

Thanks

This VM setup was (originally) heavily influenced (read: copied) from Fedora 4 VM. While it has since been modified/ported to Ansible and made significantly more idempotent, we thank for the Fedora 4 crew for the original work!

dams-vagrant's People

Contributors

escowles avatar hweng avatar lsitu avatar mcritchlow avatar mohideen avatar ruebot avatar vivianchu avatar whikloj avatar zimeon avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mcritchlow

dams-vagrant's Issues

Migrate to Ansible

Rather than update the existing shell scripts, it was agreed upon to migrate the scripts to an ansible playbook. This will involve and result in:

  • Rewrite README.md to properly document how to use ansible and vagrant
  • Utilizing ansible roles for packages where appropriate (phantomjs, rbenv/ruby, etc.)
  • Making the environment setup process much more idempotent so that updates can be more targeted and granular going forward
  • Simplify management process since we have greater coverage of ansible experience between dev and ops now
  • Potentially a somewhat faster initial provisioning time. The greater win however will be in future updates.

unicorn not found

The last line of the damspas.sh script invokes unicorn and fails spectacularly.

Suspect this is due to a path issue at the moment of execution. This might be able to be addressed by prefixing bundle exec in front of unicorn or reference the rbenv shim.

remove redundant packages

There are far more packages installed than necessary to run a "minimal" VM for dams. Let's remove these to shorten install time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.