-
Notifications
You must be signed in to change notification settings - Fork 0
Development Setup: Guided Walkthrough
huxoll edited this page Nov 6, 2014
·
24 revisions
This page provides a guided installation for setting up StackStudio and dependencies for development.
It's convenient to use a virtual machine to install StackStudio, for example, if the development machine is a Windows box.
- Install vagrant (http://www.vagrantup.com/)
- Set up the basics:
$ mkdir StackStudio
$ cd StackStudio
$ vagrant init stackstudio https://s3.amazonaws.com/TranscendDevPublic/stackstudio.box
$ vagrant up
$ vagrant ssh
$ sudo apt-get install libxslt-dev libxml2-dev
You should now be connected to your new Vagrant virtual machine. If you started with our "stackstudio" box, you can skip directly to the Run Services below. If you start with a vanilla Ubuntu or other OS, proceed with the following Ubuntu Setup or adapt it for other distros.
Now, from within the virtual machine, you can install dependencies.
$ sudo su -
$ apt-get update
$ apt-get install git
$ cd /usr/local/
$ git clone https://github.com/TranscendComputing/CloudMux.git
$ apt-get install ruby1.9.1-dev
$ apt-get install build-essential
$ apt-get install mongodb
$ cat > /usr/local/etc/cloudmux.sh << EOF
MONGO_URI=mongodb://transcend:password@localhost:27017
RACK_ENV=development
RAILS_ENV=development
export MONGO_URI RACK_ENV RAILS_ENV
EOF
$ source /usr/local/etc/cloudmux.sh
$ cp /usr/local/etc/cloudmux.sh /etc/profile.d
$ cd /usr/local/CloudMux/
$ echo "gem: --no-rdoc --no-ri" > ~/.gemrc
$ gem install bundler
$ bundle install
$ bundle exec rake db:seed
$ cd /usr/local
$ git clone https://github.com/TranscendComputing/StackStudio.git
# Add repo to get latest node.js.
$ apt-get install python-software-properties python g++ make
$ add-apt-repository ppa:chris-lea/node.js
$ apt-get update
$ apt-get install nodejs
$ cd StackStudio
$ npm install config/
$ npm install -g grunt-cli
# Jam the IP address of the local machine into backend.json
$ cp /usr/local/StackStudio/backend.json.sample \
/usr/local/StackStudio/backend.json
$ sed -i "s|@backend_endpoint@|http://localhost:9292|g" \
/usr/local/StackStudio/backend.json
It's useful to open two terminal sessions, to follow logs.
In the first session, run CloudMux.
# Run CloudMux.
$ cd /usr/local/CloudMux/
# It's a good idea to update to the latest code.
$ git pull
# If there is updated code, you might need to re-run
# bundle as follows to update packages.
$ bundle install
$ bundle exec rackup -i. -p 9292
In the second session, run StackStudio.
# Run the StackStudio front end.
$ cd /usr/local/StackStudio
# It's a good idea to update to the latest code.
$ git pull
# If there is updated code, you might need to re-run
# npm install to update packages.
$ npm install config/
$ grunt run