...
Web
$CREATE_CMD $SECURITY_OPTS --extra-vars "role=web tier=production" --extra-vars "@group_vars/group_vars/kithe_web_production_override"
Deploy
Deploy master branch to all 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.
2. Switch
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"
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 serverAnnounce the switch is complete.
...