Creating a Custom AMI
To create a custom CloudyCluster AMI with additional software or libraries.
When using a CloudyCluster Custom AMI you must first: * Subscribe to CloudyCluster in the AWS Marketplace * Follow the steps to customize the AMI before you launch CloudyCluster the normal way.
Complete the following steps to locate the CloudyCluster AmiID of the instance to base the custom ami with.
- Navigate to the CloudyCluster Amazon Marketplace.
- Select the Version of CloudyCluster you wish.
- Select the “Continue” link.
- Login to your AWS account.
- On the subsequent page, you will see a Deployment Options section. Select the “View” link in this section.
- In the subsequent Control Instance Topology screen, select the “View Template in Cloud Formation Designer” link at the bottom left.
- Select the “Mappings” tab at the bottom of the subsequent screen and scroll down until you see “AWSRegionArch2AMI” with regions listed beneath it.
- Copy the AmiID for the region you wish to use, for example, “ami-abcdefg1”
- After you obtain this AmiID, you will enter it in the field where prompted.
To customize your CloudyCluster AMI, complete the following steps
- Save this CloudFormation template to your local machine.
- Locate the region where you want to launch the instance that will contain your added software.
- Navigate to the CloudFormation Console in AWS and select “Upload Template.”
- Select the CloudFormation template that you downloaded in Step 1.
- Click “Next” and fill in any of the prompts that are shown. In the “AmiID” field, enter the CloudyCluster AmiID that you located in your AWS account. The instance and all of its prerequisites will be created and spun up.
- Instance Details
- Once the instance is launched, you can ssh into it using the key specified. The instance will not have a Web UI and will not run CloudyCluster. You may now perform any software installs and any other modifications that you would like to this instance.
Complete the following steps to capture an AMI from that instance
- Select the instance from the EC2 console.
- Click the “Actions” button.
- Select the image menu item from the drop-down menu.
- Click “Create Image.”
- You will be prompted to name the image, then click “OK.”
- The instance that you were working on will be temporarily unavailable while imaging takes place, and a new AMI will be created that contains your configuration of CloudyCluster and software.
- After imaging is completed, your instance will remain running in EC2. You must delete the cloud formation stack that you just created.
Launch the new AMI
You can either:
- Edit the cloud formation template and change the ami-id to the one you just created and launch the cloud formation template
- Create an IAM role manually and launch throught the EC2 Console.
Automate The Process
If you want to be able to automate the process of adding software to the release CloudyCluster AMIs, you can use the builderdash project. The Builderdash project was created to provided a build system, that we use internally to build CloudyCluster releases. It is open sourced so the same methodology can be used to add Software to the AMI. The project is available on Github.