Custom AMI Updates for RONIN Packages via AWS Systems Manager

Want to be able to automate updating AMIs in the RONIN Package Catalogue via the AWS console? Well, this blog post will teach you how!

Custom AMI Updates for RONIN Packages via AWS Systems Manager

Keeping your RONIN package catalogue up-to-date with the latest AMIs is an important task for a RONIN Administrator, but we know this job can sometimes be laborious, especially for CI/CD images that need to be continually updated at regular intervals. Well, we have now developed a way for you to be able to update AMI-IDs in the RONIN Package Catalogue via AWS Systems Manager parameters! Not only does this provide you with an easy spot to update your RONIN Packages in the AWS console, but it also allows for you to be able to automatically deploy updates as part of your CI/CD workflows.

This blog post will walk you through how to enable and leverage custom updates for packages in the RONIN package catalogue.

First, head to your RONIN Package Catalogue screen.

Next, click to add a new, or edit an existing, package that you would like to enable these custom AMI updates for.

💡
Note: You can enable custom AMI updates for any package that is not auto-updatable (i.e. any package that is not the base AWS Windows or Amazon Linux AMI - for these AMI's please refer to our auto-update feature instead).

Click the checkbox that appears at the bottom of the first form section to enable custom AMI updates. Once you select this checkbox, a field will drop down showing you the Systems Manager Parameter Name that you will use to update the AMI ID. Copy or remember this parameter for later on and save your changes to the package.

Once you have saved your changes RONIN will create a Systems Manager Parameter with the name specified. If you login to the AWS console for the RONIN account and navigate to Systems Manager > Parameter Store, you will be able to find or search for the parameter name we copied earlier under "My Parameters".

If you click on the parameter, you will see that the value is the AMI ID for the RONIN package we just added/edited:

If you update the AMI ID again for this package back in the RONIN package catalogue, this parameter value will be automatically updated instantly.

If you click "Edit" on this parameter in the Parameter Store and edit the AMI ID value, RONIN will check each night to see whether this value has been updated, and if so, it will replace the AMI ID for this package in the RONIN package catalogue.

💡
Note: Since this parameter value has been set as an AWS EC2 image (AMI) data type, AWS will automatically validate any changes to the parameter value. If you do not replace the value with a valid AMI ID (just the AMI ID, no special characters or spaces etc), AWS will NOT update the value, it will instead keep the previous value. It will only allow the value to be edited if it is replaced with a valid AMI ID.

If you then decide later on that you want to disable custom AMI updates on a RONIN package catalogue where custom AMI updates were enabled previously, just deselect the custom AMI updates checkbox in the RONIN package catalogue. RONIN will not delete the associated parameter, it will instead just disable checking of this parameter each night. The parameter will remain in the account in case you ever want to re-enable custom updates again. The parameter will only be deleted when you remove the associated package from the RONIN package catalogue.

You can easily see which packages have custom updates currently enabled in the RONIN package catalogue, as they will show a green tick with "Custom Update" written next to the age of the package:

You can now go ahead and automate the deployment of your CI/CD or specialised images for all of your RONIN users to enjoy!