Versions Compared

Key

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

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:

...

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"

  • 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

...

  • 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

...

jobs server

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

...

3. 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"

...

4. 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

...

5. 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.

...

6. Sync data from production to staging

See Syncing scihist-digicoll production to staging Delete this page for details.

...

7. Commit changes to the staging branch of Ansible

See Ansible development workflow for details.

...

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

See Management Server for details.