Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.

Development environment

Sven Osterwalder edited this page Jun 7, 2014 · 11 revisions

Development environment

The dev. environment is currently available in the vagrant branch and is built using a mixture of vagrant and chef on the outside and nginx and mysql on the inside.

Credentials

  • IP-Address
  • 192.168.56.101
  • Hostname
  • oss2.vm In the form of [username:password]
  • Machine
  • vagrant:vagrant
  • MySQL
  • root:123qwe
  • developer:123qwe

Hint: If you need root access, just do

sudo su

Requirements

Getting started

  1. Go into or clone the repository

  2. Switch to the vagrant branch

     git fetch
     git checkout vagrant
     git submodule update
    
  3. Bring vagrant up

     vagrant up
    

Setup the application

  1. Change the ruby version in Gemfile (needed once) data/Gemfile from

     ruby "2.0.0"
    

    to

     ruby "1.9.3"    
    
  2. Log into vagrant

     vagrant ssh
    
  3. Install the needed gems

     cd /vagrant/data
     bundle install --without production
     rake db:migrate RAILS_ENV=development
    

Attention: Do not commit this change, as this will break Travis CI!

Using the dev. environment

Accessing the application

Using a web browser go to

http://oss2.vm

or

http://192.168.56.101

Attention: This needs the vagrant hosts updater plugin or otherwise you won't be able to access the page by the vms hostname. You can do this manually by inserting

192.168.56.101  oss2.vm

into your hosts file.

Connecting to vagrant (= the virtual machine)

  1. Go into the set up repo (vagrant branch, see Getting started)

  2. Connect

     vagrant ssh
    
  3. Do whatever you want

Re-setting the dev. environment

  1. Go into the set up repo (vagrant branch, see Getting started)

  2. Destroy the virtual machine with

     vagrant destroy
    
  3. Bring the virtual machine up again with

     vagrant up
    
  4. Follow Setup the application

Stopping the virtual machine

  1. Go into the set up repo (vagrant branch, see Getting started)

  2. Stop the virtual machine with

     vagrant halt