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.
###Customizing CloudyCluster
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 “Continue to Subscribe”.
- On the subsequent page, you will see a Subscription Options section. Select “Continue to Configuration”.
- Choose the region you want to deploy CloudyCluster in. Then select “Continue to Launch”.
- On the launch options page, select “Launch CloudFormation”.
- STOP HERE! Copy the AWS S3 URL for the template and navigate to it in a new tab. The template will be downloaded locally.
- Open the .template file, and find the “RegionMap” section of the JSON file. Copy the AMI ID beside the Region you wish to deploy CloudyCluster to.
- You will now launch an instance with this AMI from the EC2 console.
To customize your CloudyCluster AMI, complete the following steps
- Access the AWS Console and Navigate to EC2 -> Instances, select “Launch Instance”.
- On the instance configuration page, enter the AMI ID you found in the template. Look under the “Community AMIs” tab and select the CC image.
- Name the instance, and select a large enough instance type to install your software. Add additional storage for your new software.
- Select a valid SSH key.
- Deploy the instance. Navigate to the isnatnce you deployed on the “Instances” page, select it and then select “connect” to open up SSH options. SSH into your instance using the key you selected.
Use the username “centos” when SSHing into your instance
-
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.
-
After your instance is done being configured, stop it, then select it and select the “Create image” action.
-
Name the image and ad additonal storage if necessary.
-
Create the image, then copy the AMI ID to the .template file you downloaded earlier. Replace the AMI ID in the “RegionMap” section that corresponds to the region you wish to deploy CC to.
Launch the new AMI
- Access the AWS Console and navigate to the CloudFormation Dashboard. Select “Create Stack” -> “With new resources”.
- Select “Upload a template file” and upload the template you downloaded and modified with your custom AMI.
- Configure your stack like you would for a standard CloudyCluster deployment.
- CloudyCluster is now deployed with your custom image!
To use custom images without having to deploy a new cluster each time you make changes, use the -awsami <ami_id>
command line argument.
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.