Technical recipes for frequently and infrequently recurring problems
This assumes we are making nightly AMI backups and a standard DCE single server box.
In AWS, it will be in the EC2 console, under Images
-> AMIs
. Each AMI should
have a date in its name, e.g., single_box_prod_on_2018-06-26_07.00.43
Auto-Assign Public IP
.Name
and give it a meaningful valueSelect an existing security group
. Give it ssh so you can ssh in, and apache so you can connect to the web interface. You might also optionally open up fedora and solr ports here if you are doing some troubleshooting that will require that access. Note, these ports should not be left open for a production environment.In the AWS EC2 console, go to Network & Security
–> Elastic IPs
. Select the elastic IP for the staging environment and re-assign it to the image you just created.
If you are restoring a backup of the production environment, the box will have production hostname settings, shibboleth certs, etc. Run the last block of roles in the appropriate configuration management ansible playbook. E.g., for Laevigata, that would be these:
- { role: set_hostname }
- { role: emory_dotenv }
- { role: emory_shibboleth-sp }
- { role: apache_with_mod_ssl }
- { role: splunkuforwarder }
- { role: nrpe, nrpe_version: '3.2.1', nagios_plugins_version: '2.2.1' }
This will update the hostname, shibboleth cert, ssl cert, splunk configuration, and monitoring configuration to staging
settings instead of production.
You should now be able to interact with your new instance via the staging domain name, but it will have all of the data and machine state of the production environment.
Note The process is exactly the same for restoring a production backup to production, except that you don’t need to run the ansible roles.