2. About me
I am Yasith FERNANDO
Work for favoritemedium.com
Offices in GZ and Singapore
Blog: http://thekindofme.wordpress.com
Github: http://github.com/thekindofme
Twitter: @meaningful
Glad to be here!
3. What
"It is a Git-based application deployment tool that allows you to
define your environment by utilizing modules and provision your
server with basic deployment needs."
- http://gitpusshuten.com/about/
● Not just a 'deployment tool'
● Cross between a deployment tool (ex: capistrano) and a
server configuration automation (ex: chef) tool
● Have limited functionalities of both sides
4. Why
● Save time
● Have a well defined and reliable deployment procedure
● Simple and easy to use and setup
● Well suited for small to medium sized projects
5. How
● To setup a basic rvm-rails-passenger-nginx-mysql stack
● gem install gitpusshuten
● Init and configure gitpusshuten for your rails project
6. Modules
● Add different features and functionalities to gitpusshuten
● Modules that come with the gem
○ Active Record
○ Apache
○ Bundler
○ MySQL
○ Nanoc
○ NginX
○ Passenger
○ RVM (Ruby Version Manager)
7. Init and Configure
cd /path/to/Rails.root
heavenly initialize
edit Rails.root/.gitpusshuten/config.rb
pusshuten 'My Application', :staging, :production do
configure do |c|
c.user = 'gitpusshuten'
c.ip = '123.45.678.90'
c.port = '22'
c.path = '/var/applications/'
end
modules do |m|
m.add :bundler
m.add :active_record
m.add :passenger
m.add :nginx
m.add :rvm
m.add :mysql
end
end
8. Install your SSH key to the server (for
the root user account)
heavenly user install-root-ssh-key to staging
10. Install Passenger
heavenly passenger install to staging
● Choose nginx/apache
● Adds nginx config
○ Rails.root/.gitpusshuten/nginx/staging.vhost
● Edit it
● Upload the new config file to the server
○ heavenly nginx upload-vhost to staging
11. Create the User account for
Deployments
heavenly user add to staging
● Will add the user to the server as specified in the config.rb
file.
12. Setup MySQL
heavenly mysql install to staging
heavenly mysql add-user to staging
● Install MySQl
● Provide a password for the root user
● Create a mysql user as specified in the config.rb file
● Provide a password for the new user
14. Pros and Cons
Pros Cons
● Simple ● Not very popular
● Acts as both a ○ Limited number of modules
○ Project is not very active
deployment and server
configuration automation ● Might be too simple for
tool your needs
● Useful set of modules for ● You might not want a
the popular rails- single tool to handle both
passenger-nginx-mysql deployment and server
stack configuration