The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Deployment

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tobias Luetke

Posts: 150
Nickname: xal
Registered: Jan, 2005

Tobias Luetke is a contributor to the ruby on rails project
Deployment Posted: Feb 14, 2005 6:05 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Tobias Luetke.
Original Post: Deployment
Feed Title: too-biased
Feed URL: http://blog.leetsoft.com/xml/rss/
Feed Description: Read the announcement: CD Baby rewrite in Postgres and Ruby, Baby!CD Baby is going rails. This is huge! If you don’t know CD Baby, its a distribution site with over 80.000 musicians under contract and its one of the biggest digital distributors of audio to Apple iTunes, Napster, Rhapsody, etc.  Read all about it here. What is even more exciting about it is that I’m on board for the rewrite and I had chance to talk to Derek on the phone directly for a consulting session which might have played its little part in the decision to go with rails. Come monday I’ll work together with him and other rails contributor Jeremy Kemper to help crunch those 90k lines of PHP in beautifully compact code for which Rails and Ruby are known. Here is a quote from Derek’s announcement on his weblog: Like a lost soul walkin’ the earth, lookin’ for spirituality, that stumbles upon the right church with the right people at the right time, I’ve found my niche with Ruby. Its little itty-bitty community attracts some brilliant “think different” types with a love for beautiful code that do this for love, not money.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Tobias Luetke
Latest Posts From too-biased

Advertisement

How do I deploy my code on a production server?

A few months back we had this little discussion in IRC to which david replied that he keeps different versions of his production apps on their respective servers and uses a symlink to hook up a working copy to the web server.

The big advantage in this is that you can test the code before restarting the web server since the current web site runs untouched. This has saved me from deploying quite a couple of bugs in the beginning and it prompted me to install damagecontrol.

Over the last couple of weeks I have tried to automate this process. What I came up with is a script which basically acts as a batch handler for server deployment.

Take for instance Hieraki. Issuing deploy hieraki runs through the following steps:

  • ssh connect to production server
  • checkout the latest version from subversion
  • run all unit tests using rake
  • set permissions on log dir
  • point the hieraki/latest symlink to the newly deployed copy
  • restart apache gracefully

The current version of my deploy script reads the file ~/.deployrc for its configuration. In hieraki’s case this looks like this:

  hieraki:

    server: myserver
    checkout: svn export svn://myserver/hieraki/trunk
    directory: /var/www/applications/hieraki
    test: RAILS_ENV=production rake

    after_test:
      - chmod 777 log/
      - chmod 666 log/*

    after_commit:
      - sudo /etc/init.d/apache reload

A nice and clean yaml config file as you can see. Hope this is a useful starting point for others.

Download the script here

Read: Deployment

Topic: more progress than you can shake a stick at Previous Topic   Next Topic Topic: Frosted MiniColons

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use