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

Version 1 Next »

Here is how to destroy and rebuild the schihist_digicoll staging servers.

0. Destroy the staging servers

Go to the AWS console.

Select all 4 staging servers: scihist_digicoll_*_staging, then:

Actions > Instance State > Terminate

Delete the EBS volumes that are listed as "available". They were recently orphaned by the staging servers.

1. Build the DB server

ansible-playbook create_kithe.yml --vault-password-file password_file.txt --private-key=~/.ssh/test.pem --extra-vars "role=database tier=staging"

1a) Then take the private IP of the resulting database server from the EC2 console, and add it to group_vars/kithe_staging:

redis_ip: new_private_ip_of_scihist_digicoll-database1-staging
postgres_ip: new_private_ip_of_scihist_digicoll-database1-staging

2. Build the SOLR server

ansible-playbook create_kithe.yml --vault-password-file password_file.txt --private-key=~/.ssh/test.pem --extra-vars "role=solr tier=staging"

Then take the private IP of the resulting SOLR server from the EC2 console, and add it to group_vars/kithe_staging:

postgres_ip: new_private_ip_of_scihist_digicoll-solr1-staging

3. Build the jobs server

ansible-playbook create_kithe.yml --vault-password-file password_file.txt --private-key=~/.ssh/test.pem --extra-vars "role=jobs tier=staging"

4. Build the web server

ansible-playbook create_kithe.yml --vault-password-file password_file.txt --private-key=~/.ssh/test.pem --extra-vars "role=web tier=staging" --extra-vars "@group_vars/kithe_web_staging_override"

5. Associate the elastic IP with the new web server

https://console.aws.amazon.com/ec2/v2/home?region=us-east-1
Select "Elastic IPs"
Select "digicoll-staging"
Actions -> Associate address
Under the "Resource type", Choose "Instance".
Fill in the appropriate instance (the staging web server)
Check "Allow this Elastic IP address to be reassociated if already attached"
Click "Associate".
You should then see an instance IP under "Associated instance ID" in row digicoll-staging

6. Deploy to staging

cd /path/to/scihist_digicoll/
bundle exec cap staging deploy --trace

At this stage you should see an empty but functioning site at https://staging-digital.sciencehistory.org/, but with no data in it.

7. Sync data from production to staging

See Syncing scihist-digicoll production to staging for details.

8. Commit changes to the staging branch of Ansible

See Ansible development workflow for details.

9. Log in to the management server and run the stage_update.shscript

See Management Server for details.

  • No labels