Reputation: 12176
lately I am doing some POC's in amazon elastic cloud. I created a sample instance and I uploaded my sample web application and finally saw my hello world jsp.
Now I am trying to create one more instance and want to send data from my first instance to second instance. I know that this can be achieved through zookeeper. But I want to create my second instance programmatically and not through the management console.
How to achieve this? I am thinking that this has something to do with the amazon s3 where we bundle our ami. But not sure about it. Can anyone give me guidelines?
Upvotes: 6
Views: 3827
Reputation: 1279
You could also use Packer from Hashicorp to automate the creation of amazon AMIs. Check out the link below to find out how to create an AMI using packer :
https://www.packer.io/intro/getting-started/build-image/
Upvotes: 2
Reputation: 3065
This is a link to the Amazon documentation for creating an AMI. Amazon provide a set of command line tools so you should be able to call these from your script.
you may also find these 3rd party scripts useful for creating a bootable EBS from a running instance.
Or it may be more useful to invoke the AWS EC2 APIs more directly from your application.
Upvotes: 3