Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 52 Next »

*Update the changelog when deploying!

Deploy the application with Capistrano

  • cd into the root dir of your chf-sufia repository

$ bundle exec cap [staging|production] deploy

  • If this is the first deploy, you need to start web services (because before this there was no project and apache / tomcat would fail to find various directories and config files). ssh to the ec2 machine as the sudo (ubuntu) user.

$ sudo service tomcat7 restart

$ sudo service apache2 restart

Addt'l useful capistrano info

Deploy with downtime

bundle exec cap staging maintenance:enable REASON="a test of maintenance mode" UNTIL="12pm Eastern Time"
  • It'll read "The system is down for [REASON]"
  • Deploy as usual / desired
  • Do anything else needed on the server that required the downtime
bundle exec cap staging maintenance:disable

Set up Capistrano (first-time use)

Create an entry for the deploy user in your .ssh/config:

Host staging
Hostname NEW.IP
User hydep
#IdentityFile ~/.ssh/your_key
ForwardAgent yes
  • This keeps us from publishing server names, etc, in the cap config files which live in our public repo.
  • don't change the Host designation without:
    • Changing it in capistrano, e.g. deploy/staging.rb, to match
    • Clearing it with everyone who might deploy (they'll have to change their ssh config as well.
  • this will use your personal ssh key – the one that matches your public key on github, which is added to the deploy user by ansible scripts.




  • No labels