Coder Social home page Coder Social logo

vagrant's Introduction

Vagrant setup for Twine

Virtual OS: Ubuntu 12.04 (Precise) x64 With Packages:

  • Apache
  • PHP
  • Curl
  • OAuth
  • Mongo
  • Prince
  • Python
  • Flask
  • PostgreSQL
  • phppgadmin
  • R + Rserve

Requirements:

Guide:

  1. Download and install software from Requirements

  2. Create a folder named 'twineapp/' and clone this repository (twineapp/vagrant).

  3. Clone / copy in the twine repos and datasets
    3.1. 'siv-v3' github repository to 'twineapp/siv-v3/' directory (~55MB)
    3.2. 'api-data' github repository to 'twineapp/siv-v3/api-data/' directory (~0.3MB)
    3.3. 'instance-unhcr' github repository to 'twineapp/twine_instances/instance-unhcr/' directory 3.4. (optional) 'documentation' github repository to 'twineapp/documentation/' directory
    3.4. Unzip twine postgres build into 'twineapp/vagrant/src/postgres/' directory (~83MB)
    3.5. Unzip twine mongodb build to 'twineapp/vagrant/src/mongo/' directory (~288MB)

  4. Run terminal, go into 'twineapp/vagrant/', and execute the command 'vagrant up'. This will download the base box of ubuntu (~35MB), and bring up the twine vm

  5. Load an instance, for example (ssh'd to the app root):

    grunt dev --instance=/var/www/twine_instances/instance-unhcr

Working with the twine vagrant:

  • "vagrant up" starts the virtual machine
  • "vagrant suspend" suspends the vm, this is normally how you would end your work session
  • "vagrant halt" shuts down the vm, you would do this to autoload additional db patches for example
  • "vagrant reload" is equivelent to a halt and up, and should be run after changes to the vagrant repo. Before a reload, delete the siv_% dbs (you can run siv.drop.sql in phpmyadmin to do this)
  • "vagrant destroy" completely removes the vm from your machine. You would do this to save disk space if you won't be working on twine for a while, or to do a full rebuild after significant changes to the vagrant repo
  • command reference: http://docs.vagrantup.com/v2/cli/index.html

Notes:

PHP Docs:

  • To setup phpdoc and dependencies run: sudo /var/www/vagrant/src/scripts/phpdoc-setup.sh
  • To generate autodocs for the Twine API run: /var/www/vagrant/src/scripts/phpdoc-build.sh
  • Docs available at: http://192.168.50.4/siv-v3/docs/
  • these are copied into the documentation repo at documentation/api/app/

VM Passwords

  • postgres username:password are admin:admin

Known issues

  • Hardware virtualization. Issues have been reported in Windows 7 when hardware virtualization was not enabled in the system bios. http://www.virtualbox.org/manual/ch10.html
  • Permissions Issues There have been issues on Windows systems when the project code has been cloned and run from folders which do not have sufficient permissions for the application to run on the Host system causing issues inside the vagrant with permissions.

Installing Puppets Locally:

  1. Clone this repository (twineapp/vagrant) in '/var/www/'
  2. Go through step 3. from above "Guide"
  3. sudo apt-get install puppet-common
  4. Change directory to '/var/www/vagrant/' and run: sudo puppet apply puppet/manifests/twine.pp --modulepath=puppet/modules/

vagrant's People

Contributors

pfitzpaddy avatar yarmoshuk avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vagrant's Issues

Update Vagrant Config [Ubuntu 12.04]

Reported on Ubuntu 12.04

The following error is sticky whenever you try to use the vagrant commands against the vagrantfile:

There were warnings and/or errors while loading your Vagrantfile.
Your Vagrantfile was written for an earlier version of Vagrant,
and while Vagrant does the best it can to remain backwards
compatible, there are some cases where things have changed
significantly enough to warrant a message. These messages are
shown below.

Warnings:
config.vm.customize calls are VirtualBox-specific. If you're
using any other provider, you'll have to find provider-specific configuration
to translate to manually in your Vagrantfile.```

Looks like the vagrant config isn't up to date with the latest version of Vagrant, it may be worth freezing at a specific Vagrant version as Vagrant provides a backlog of their versions.

Error on `vagrant up` [Ubuntu 12.04]

[Ubuntu 12.04]

Get the following CLI error when trying to run vagrant up:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' twine.pp --detailed-exitcodes || [ $? -eq 2 ]

The vagrant image will still run and access is still available to HTTP and SSH so I'm not sure what this error is in regards to.

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.