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!
What"It is a Git-based application deployment tool that allows you todefine your environment by utilizing modules and provision yourserver 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
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
How● To setup a basic rvm-rails-passenger-nginx-mysql stack● gem install gitpusshuten● Init and configure gitpusshuten for your rails project
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)
Init and Configurecd /path/to/Rails.rootheavenly initializeedit Rails.root/.gitpusshuten/config.rbpusshuten 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 endend
Install your SSH key to the server (forthe root user account)heavenly user install-root-ssh-key to staging
Install Passengerheavenly 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
Create the User account forDeploymentsheavenly user add to staging ● Will add the user to the server as specified in the config.rb file.
Setup MySQLheavenly mysql install to stagingheavenly 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
Deploy! (finally...)heavenly push branch master to staging
Pros and ConsPros 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
More Info● http://gitpusshuten.com/documentation/● http://gitpusshuten.com/guides/setting-up-a-full-ruby-on- rails-environment/● https://github.com/meskyanichi/gitpusshuten