...
Jobs
$CREATE_CMD $SECURITY_OPTS --extra-vars "role=jobs tier=production"
Web
$CREATE_CMD $SECURITY_OPTS --extra-vars "role=web tier=production" --extra-vars "@group_vars/
...
kithe_web_production_override"
2. Switch
Turn off automatic updates on the management server.
Point the prod URL in your
etc/hosts
file locally to the web server.Spin up the downtime server in Amazon (
actions
➡instance state
➡start
)Point the elastic IP for the prod web server to the downtime server
Select
Elastic IPs
Select
Temp-Down
Actions
➡Associate address
Under the "
Resource type
", Choose "Instance
".Fill in the appropriate instance (the new prod web server)
Check
Allow this Elastic IP address to be reassociated if already attached
"
Spin down the existing prod servers (
actions
➡instance state
➡stop
)Deploy master branch to all the new servers.
bundle exec cap production deploy --trace
At this stage, if you point the prod URL in your
etc/hosts
file locally to the web server, you should see an empty production website.Copy the old database over to the new DB server
TODO Fill this in
Index
bundle exec cap production invoke:rake TASK="scihist:solr:reindex"
At this stage, if you point the prod URL in your
etc/hosts
file locally to the web server, you should be able to search the new site and get full results.
Commit the changes to Ansible into both the
staging
andmaster
branches on Bitbucket.This is important: if you don’t do this, the old IP addresses will be automatically reapplied to the new servers. And the old IP addresses are inactive by now.
Point elastic IP to the new web server:
Select
Elastic IPs
Select
digicoll-production
Actions
➡Associate address
Under the "
Resource type
", Choose "Instance
".Fill in the appropriate instance (the new prod web server)
Check
Allow this Elastic IP address to be reassociated if already attached
"Click
Associate
.
Remove the
etc/hosts
entry and check that traffic is indeed routed to the new serverTurn on automatic updates on the management server.
Announce the switch is complete.
...