-
Notifications
You must be signed in to change notification settings - Fork 37
Incus Checklists
Huzzah! Just merge the pull request, and Travis will automatically deploy it.
Sometimes the deployment will fail on the CodeDeploy side because of timeouts. Just redeploy it (go to Applications
-> Incus
-> most recent revision -> Deploy This Revision
).
If that doesn't work because Travis is down or has gone out of business or gets bought and killed by Yahoo:
- An S3 access token with at least the policies that the CodeDeploy role has. It might be sufficient to just have
s3:*
andcodedeploy:*
.
- Install the AWS CLI and configure with an access key with [appropriate permissions
- Set up your GOPATH
- Check out the code
- Run
$ ./scripts/build.sh
. An archive file has been created at$GOPATH/incus.tar
with a CodeDeploy appspec file. - Run
$ TRAVIS_PULL_REQUEST=false TRAVIS_BRANCH=master ./scripts/deploy.sh
. This uploads the archive created in the prior step to S3, and notifies CodeDeploy about the uploaded archive, and deploys it to all the Incus machines.
For each running instance,
- Remove it from ELB (
incus
) - Wait 10 seconds for connections to drain
- Terminate the instance.
- Wait until autoscaling re-creates it.
Try to keep at least one instance alive at a time.
The configuration file is located at /etc/incus/config.yml
and is read by Incus at startup. There is no graceful reload of configuration, so a restart is necessary. Since the user data script downloads the initial configuration from S3, below are instructions to rotate it without updating existing images. You can of course update the existing file on disk and do a rolling restart by /etc/init.d/incus stop
and letting monit handle the start.
- Download the current configuration from
s3://imgur-incus/config.yml
. - Your change here
- Upload the new configuration to
s3://imgur-incus/config.yml
. - Follow "rotation" above
- Create new instance from current AMI
- Wait for CloudWatch health checks to pass
- Remove newly created instance from ELB, if present
- Stop monit (
sudo /etc/init.d/monit stop
) - Stop incus (
sudo /etc/init.d/incus stop
) - Remove config file (
sudo rm /etc/incus/config.yml
) - Remove CodeDeploy-downloaded incus binary (
sudo rm /usr/sbin/incus
) - Your change here
- Create new AMI using EC2 Console, making sure NOT to check
No reboot
. Name the AMIincus_YYYYMMDD_XX
, where XX is how many bad AMIs you have created today - When the AMI completes, terminate the newly created instance.
- Create a new launch configuration
- Copy the old one (
incus_YYYYMMDD_XX
) - Change the AMI to be your newly created AMI
- Change the name of the launch configuration to match the AMI
- Defaults should be fine until security group. Choose Filter by
EC2 Classic
, chooseincus
for the security group
- Copy the old one (
- Update the
incus-a
,incus-c
, andincus-d
autoscaling groups to use your new launch configuration - Follow "rotation" above