Skip to content

Server Installation: Guided Walkthrough

John Gardner edited this page Nov 12, 2013 · 20 revisions

This page provides a guided installation for setting up StackStudio and dependencies on a server.

Installation on Ubuntu

apt-get update
apt-get install git
cd /usr/local/
git clone https://github.com/TranscendComputing/CloudMux.git
# CloudMux requires ruby 1.9.x; if you have ruby 1.8 installed, you may wish to use RVM (http://rvm.io) instead.
apt-get install ruby1.9.1-dev
apt-get install build-essential
apt-get install mongodb
cat > /usr/local/etc/cloudmux.env
cd /usr/local/CloudMux/
echo "gem: --no-rdoc --no-ri" > ~/.gemrc
gem install bundler
bundle install --without development test --deployment
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
npm install -g grunt-cli

cp /usr/local/StackStudio/backend.json.sample /usr/local/StackStudio/backend.json
sed -i "s|@backend_endpoint@|http://${HOSTNAME}:9292|g" /usr/local/StackStudio/backend.json

# Add web server
apt-get install libssl-dev 
gem install puma 
cd
git clone https://github.com/puma/puma.git
cp puma/tools/jungle/upstart/puma* /etc/init 
# replace "apps" in /etc/init/puma.conf with intended user
echo "/usr/local/CloudMux" >> /etc/puma.conf
cp /usr/local/etc/cloudmux.env /etc/profile.d/cloudmux.sh 
# Replace /etc/init/puma.conf line:
exec bundle exec puma -C config/puma/production.rb
# with the following:
exec puma config.ru

# Install nginx
apt-get install nginx
# Edit default port to be 9001, root to be /usr/local/StackStudio
vi /etc/nginx/sites-available/default
update-rc.d nginx enable  

Clone this wiki locally