-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment guide
The deployment system is implemented with Vlad. The script is in config/deploy.rb
. This file contains server settings, deployment path and the git repository URL at the start. The script currently uses Ruby through rvm, which must be set up on the server for all users (in /usr/local/lib).
When everything is set up, the deployment is done with the following command: rake vlad:deploy
You need a private ssh key to access the Amazon EC2 server (e.g. in ~/.ssh/aapps).
Ssh access to Github must be properly configured and the user must have reading rights to the repository. This includes setting your public ssh key as an allowed key in Github's admin panel. This key is separate from the key used with EC2 server. See Github's help pages for further instructions.
Ssh in the local computer needs to be set up to use the correct ssh key to when connecting to EC2 server. This can be done by adding the following lines to ~/.ssh/config
:
Host 79.125.124.244
IdentityFile ~/.ssh/aapps
User aaltoapps
ForwardAgent yes
This guide is for Ubuntu 11.04 running in an Amazon EC2 server.
-
Install the following packages (
sudo apt-get install package1 package2 ...
):- gcc
- g++
- make
- automake1.9
- git
- zlib1g-dev
- libcurl4-openssl-dev or libcurl4-gnutls-dev
- libssl-dev
If some of the -dev-packages are not installed, ruby-build may silently skip building some of its core modules, which some gems may require.
-
Install ruby-build:
git clone git://github.com/sstephenson/ruby-build.git cd ruby-build sudo ./install.sh
-
Install rbenv:
cd git clone git://github.com/sstephenson/rbenv.git .rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile echo 'eval "$(rbenv init -)"' >> .bash_profile
-
Install the latest stable Ruby under
~/.rbenv/versions/
and set it as the default ruby:ruby-build 1.9.2-p290 $HOME/.rbenv/versions/1.9.2-p290 rbenv rehash rbenv global 1.9.2-p290
-
Install Nginx and Phusion Passenger:
gem install passenger --no-rdoc rbenv rehash sudo sh -c "PATH=\"$PATH\" passenger-install-nginx-module"
-
(alternate install...) Install Nginx. The package in Ubuntu's own package repository is usually out-of-date, so we'll use Nginx's own PPA:
sudo add-apt-repository ppa:nginx/stable sudo apt-get update sudo apt-get install nginx