Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Process documentation

...

bundle exec cap staging maintenance:enable REASON="a test of maintenance mode" UNTIL="12pm Eastern Time"
  • Deploy as usual / desired
  • Do anything else needed on the server that required the downtime
bundle exec cap staging maintenance:disable

...

  1. (Note: ansible-vault password and all current AWS keys are in shared network drive)
  2. Generate a new ssh key on AWS (EC2 > Keypairs)
    1. place it in ~/.ssh
    2. chmod 0600.
    1. useful command if you're having problems with the key: $ openssl rsa -in chf_prod.pem -check
  3. Check ansible variables
    1. $ ansible-vault edit group_vars/all
    2. Look for # Use these temporarily for new instances
    3. ensure your ssh key is listed under keys_to_add
  4. run the ansible playbook
    1. $ ansible-playbook -i hosts ansible-hydra/create_ec2.yml --private-key=/path/to/your/.ssh/key.pem --ask-vault-pass
    2. OR, if you're re-running scripts on an existing machine: 
      1. $ ansible-playbook -i hosts ansible-hydra/my_playbook.yml --ask-vault-passpass [-e hosts=ec2_hosts]
    3. note that if there's a failure during postgres setup handlers may not run – watch out for this. if this happens it's potentially best to start over completely.
  5. Assign an elastic IP to the new box
  6. Ask IT to give you a DNS entry for the elastic IP if desired
  7. Consider naming the aws volumes for 'root' and 'data' – this isn't done in the scripts (but probably could be!)
  8. Set up to use capistrano (below) or just deploy with capistrano (above)

...