Skip to content

Configuring Vagrant Server

Noah Freedman edited this page Feb 6, 2014 · 2 revisions

Smile Plug Development Environment Configuration

We are using Vagrant for development environments. The development environment for Smile will live in a Vagrant virtual machine, while development and testing of web content can be done on the host machine.

Requirements

vagrant git

Clone git repository on host machine in directory of your choice

git clone 
[https://github.com/SMILEConsortium/smile_vm](https://github.com/SMILEConsortium/smile_vm)
cd smile_vm
git pull origin master
 All development should take place on the development branches. For adding a moodle server, for instance, create a moodle branch.
# Master will be reserved for releases for Smile Plug software.
git checkout [project branch]

Vagrant

Download Vagrant

Configure vagrant box:

#!bash
vagrant box add ArchLinux http://vagrant.srijn.net/archlinux-x64-2013-08-17.box
cd [smile_vm directory]
vagrant init ArchLinux
vagrant up

#to ssh into Vagrant box
vagrant ssh

#to return to host machine
exit 

Environment notes

smile_vm/vagrant is accessible at /vagrant from within the vagrant virtual machine.

You can use systemctl to control the servers installed on the vagrant virtual machine. systemctl uses the following syntax: sudo systemctl [start/stop] [service name]

There are three servers:

  1. CouchDB, with service name 'couchdb'
systemctl start couchdb
  1. An NGINX reverse-proxy server, with service name 'nginx'
systemctl start nginx

The virtual machine (VM)'s port :80 is mapped to the host's port :8080.
CouchDB is available at port :5984 on the VM and at :80/couchdb on the host