Created
December 19, 2012 20:20
-
-
Save grahamb/4340122 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### bamboo tasks | |
| # create "Deploy to Staging" task -- cap staging deploy | |
| # create "Deploy to Production" task -- cap production deploy | |
| #### server tasks | |
| service httpd stop | |
| /etc/init.d/canvas_init stop | |
| # give canvasuser sudo nopassword access to the config and init scripts --> visudo | |
| ## Allow canvasuser to run specific tasks from capistrano scripts | |
| canvasuser ALL = NOPASSWD: /etc/init.d/canvas_init | |
| canvasuser ALL = NOPASSWD: /etc/init.d/canvasconfig | |
| canvasuser ALL = NOPASSWD: /etc/init.d/httpd | |
| # set up .bashrc | |
| curl -s https://gist.github.com/raw/4339845/a4d64787481b4170cb480823bb5c5b6cb79558ff/canvas%20bashrc > /home/canvasuser/.bashrc && source /home/canvasuser/.bashrc | |
| # ssh keys | |
| mkdir -p /home/canvasuser/.ssh | |
| cp /usr/local/canvas/config/home/canvasuser/.ssh/authorized_keys2 /home/canvasuser/.ssh/authorized_keys2 | |
| chmod 700 /home/canvasuser/.ssh && chmod 640 /home/canvasuser/.ssh/authorized_keys2 | |
| rm -f /etc/init.d/canvasconfig | |
| rm -f /etc/init.d/canvas_init | |
| ln -s /usr/local/canvas/config/etc/init.d/canvasconfig /etc/init.d/canvasconfig | |
| ln -s /usr/local/canvas/config/etc/init.d/canvas_init /etc/init.d/canvas_init | |
| ls -la /etc/init.d/canvas* | |
| chown -R canvasuser:canvasuser /var/rails/canvas | |
| chown -R canvasuser:canvasuser /opt/ruby-enterprise-1.8.7-2012.02 | |
| mkdir -p /var/rails/canvas/releases/manual | |
| cd /var/rails/canvas && mv * releases/manual ; mv .* releases/manual | |
| mkdir -p /var/rails/canvas/shared/log /var/rails/canvas/shared/pids /var/rails/canvas/shared/system | |
| ln -s /var/rails/canvas/releases/manual /var/rails/canvas/current | |
| ln -s /var/rails/canvas/shared/system /var/rails/canvas/current/public/system | |
| # change apache httpd.conf file --> DocumentRoot, Directory (/var/rails/canvas/current/public) | |
| ## for production, change the database password and update /usr/local/canvas/config/var/rails/canvas/current/config/database.yml.prod | |
| # alter user canvas password '...newpswd...'; | |
| # fix permission on config directory | |
| chmod u+rw /var/rails/canvas/current/config/* | |
| sudo /etc/init.d/canvasconfig start | |
| sudo /etc/init.d/httpd start | |
| sudo /etc/init.d/canvas_init start ### -ms & -mp only | |
| ## test canvas functions (discussions, file uploads, etc) | |
| ## if OK, do a bamboo deploy | |
| ## test canvas functions (discussions, file uploads, etc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment