Monday 4 January 2016

AWS: 1. Creating a base image to make deployment faster

In the previous post I deployed a WebAPI service to an EC2 instance and accessed it externally.

The Windows VM image (Amazon Machine Image - AMI) I used did not have Internet Information Service (IIS) or WebDeploy installed. I had to enable or download these features or install.

What IF I needed anther VM to deploy the same application. Then I need to follow the same steps to install the components and features. This is not a very scalable process. The solution is to create a base image or golden image. Then I can create multiple VMs using the same image.

Creating the base image


The EC2 Dashboard provides the facility to create an image based on a running or stopped EC2 instance.
Creating the base image
The "Image" selection in the above menu allows me to create an image. The process to create the image can take few minutes and once created it appears under "Images"/ AMIs side menu.

Base image location

Launching a new VM using the base image


The base image is available under "My AMI's" and can be selected during the EC2 launch process.

Selecting the base image during EC2 launch
 I can follow the same steps and deploy the application without having to install any components.

Successful deployment
The deployment is successful!.

Now the base image is ready and I can deploy the application very quickly. In the next post I am attempting to make this process a lot faster. (Automation!)

No comments:

Post a Comment