Automate Server: $cardnumberof$cardsuite.automate.e9.io
Workstation: $cardnumberof$cardsuite.workstation.e9.io
Username: chef
Password: C0d3Can
Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).
Other application notes:
Salient points for each file:
#!/bin/bash | |
# CREATE BACKUPS BEFORE RUNNING THIS SCRIPT! | |
for m in $(locate Mage.php | grep -v downloader); do | |
cd $(dirname $(dirname $m)) || (echo && continue) # old locate db | |
MAGE_VERSION=$(php -d error_reporting=0 -r "require 'app/Mage.php'; Mage::app(); echo Mage::getVersion();") | |
if echo $MAGE_VERSION | egrep -q "^[0-9.]+$"; then | |
if [ $MAGE_VERSION "<" 1.4.0.0 ] || [ $MAGE_VERSION ">" 1.7.0.1 ]; then | |
echo -e "No patch available for version $MAGE_VERSION in $(pwd)\n" |
input { | |
exec { | |
type => "dstat" | |
command => "dstat -cdngypms --nocolor 1 0" | |
interval => 13 | |
} | |
exec { | |
type => "apache-benchmark" |