1. Deploying
• Corey Purcell
• @coreypurcell
• Thanks to Daniel Carper
Friday, June 3, 2011
2. About Me
Penn United Technologies
We make stuff, like things you
can touch!
Friday, June 3, 2011
3. My Environment
• Oracle
• All internal applications (currently)
• Low traffic
• Managing deployment with Moonshine
Friday, June 3, 2011
4. Moonshine
Moonshine is an opensource configuration management
and deployment system that follows the Rails way,
simplifying server configuration, dependency
management, and Rails application deployment, using
Ruby and Puppet.
Friday, June 3, 2011
6. capify .
#deploy.rb
server "rails-box", :app, :web, :db, :primary => true
cap deploy:setup
cap deploy
Friday, June 3, 2011
7. The Good
• Capistrano Based
• Plugins
• Puppet based
• 15 minutes to build a server
Friday, June 3, 2011
8. The Ugly (to me)
• Capistrano Based
• Templates are stored in app/manifests
• Slow to deploy (5-10 minutes)
• Mixes deployment with server managment
Friday, June 3, 2011
9. Git Pusshuten
A Git-based application deployment tool that allows
you to define your environment by utilizing modules
and provision your server with basic deployment needs
Friday, June 3, 2011
10. gem install gitpusshuten
ten initialize
#creates .gitpusshuten/
pusshuten 'Hello Git Pusshu Ten', :staging, :production do
configure do |c|
c.user = 'gitpusshuten'
c.ip = '172.16.3.142'
# c.password = 'my-password'
# c.passphrase = 'my-ssh-passphrase'
# 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 :apache
# m.add :nanoc
m.add :rvm
# m.add :mysql
# m.add :redis
end
end
Friday, June 3, 2011
11. ten user install-root-ssh-key to staging
#enter root password
ten rvm install to staging
# 1.9.2
ten passenger install to staging
#errors!!!!!!!
ten rvm install to staging
ten passenger install to staging
# select apache
ten user add to staging
#choose password
Friday, June 3, 2011
12. #edit vhost on your local machine, .gitpusshuten/apache/staging.vhost
<VirtualHost *:80>
ServerName pusshuten.local
ServerAlias www.pusshuten.local
DocumentRoot /var/applications/hello_git_pusshu_ten.staging/public
<Directory /var/applications/hello_git_pusshu_ten.staging/public>
AllowOverride all
Options -MultiViews
</Directory>
SetEnv LD_LIBRARY_PATH /opt/oracle/instantclient_11_2
SetEnv TNS_ADMIN /opt/oracle/instantclient_11_2/network
</VirtualHost>
Friday, June 3, 2011
13. ten push branch master to staging
Done!
ten active_record upload_config to staging
ten apache upload-vhost to staging
Friday, June 3, 2011
14. Git Pusshu Ten
[Aliases]
gitpusshuten, heavenly, ten
[Commands]
active_record [Module] Active Record commands.
apache [Module] Apache commands.
bundler [Module] Bundler commands.
delete Deletes the application of the specified environment.
help Displays the command list, or the help screen for a specific command.
initialize Initializes Git Pusshu Ten with the working directory.
passenger [Module] Phusion Passenger commands.
push Pushes a branch, tag or ref to the specified environment.
remote Performs a command on the remote server for the specified environment from
the application root.
rvm [Module] Ruby Version Manager (RVM) commands.
user Interacts with users, based on the <app_root>/.gitpusshuten/config.rb file.
version Displays the current version of Git Pusshu Ten
[Command Specific Help]
heavenly help <command>
Friday, June 3, 2011
15. The Good
• separation of deployment from code
• deploy from any branch, ref, tag
• server setup in 15-30 mins
• deploys take around 30 seconds
Friday, June 3, 2011
16. The Ugly
• Not that many modules
• Not very active
Friday, June 3, 2011