Skip to content

Installing and using Gitpusshuten

rchristensen edited this page May 2, 2011 · 2 revisions

Installing and Using Git Pusshu Ten on a developent workstation.

Important: Git Pusshu Ten will from now one be referred to in spoken conversation as heavenly. It is dangerous to try and pronounce the full name. Be fore warned.

Installation:

Install the gem as root through rvm with: rvmsudo gem install gitpusshuten

Ensure installation worked with: heavenly help

If you get a message about i18n not being installed, perform the following rvmsudo gem install i18n

Setup heavenly in the roomtrol git repository. cd /path/to/roomtrol-daemon/ heavenly initialize

Let's configure our heavenly environment. Edit .gitpusshuten/config.rb to:

##
# Git Pusshu Ten - Configuration
#
# Here you specify all your environments. Most people will be
# satisfied with just 2: "staging" and "production". These are included
# in this configuration template. If you need more, feel free to add more.
#
# For more information, visit:
# http://gitpusshuten.com/documentation/getting-started/configuration/


##
# Example of configuring both a staging and production environment
pusshuten 'Roomtrol', :staging, :production do

  configure do |c|
    c.user       = 'roomtrol'
    c.ip         = 'roomtrol-dev3.class.wesleyan.edu'
    # c.password   = 'my-password'
    # c.passphrase = 'my-ssh-passphrase'
    # c.port       = '22'
    c.path       = "/var/roomtrol-daemon/"
  end

  modules do |m|
    m.add :bundler
    m.add :nginx
    m.add :rvm
    # m.add :passenger
    # m.add :mysql
    # m.add :redis
  end

end

pusshuten 'Roomtrol', :production do
   configure do |c|
       c.ip     = 'roomtrol-dev3.class.wesleyan.edu'
   end
end

And our .gitpusshuten/hooks.rb file is:

##
# Git Pusshu Ten - Hooks
#
# These are actions performed on the remote server
# from within the application root. Depending on what
# modules you included in the "config.rb" file, you might
# not have to create extra hooks here.
#
# For example, if you specified the :nginx module in the "config.rb"
# then you do not need to specify a nginx restart hook here since the
# module will automatically add a hook that already does that for you.
#
# For more information, visit:
# http://secretpreview.gitpusshuten.com/documentation/getting-started/deployment-hooks/
#

perform_on :staging do
  post "Running bundle install" do
      run 'rvm 1.9.2'
      run 'bundle install'
  end
end