Hi David, Not a direct answer to either of your questions, but if you haven’t looked at it yet you might want to check out one of the packer AMI builders for automated building of AMIs: http://www.packer.io/docs/builders/amazon.html I have found it very useful for repeatable builds of images for various providers they support and keeping the images up to date over time.
Thanks, Chris -- Chris Custine On August 18, 2014 at 3:19:34 PM, David Bosschaert ([email protected]) wrote: Hi all, I'm creating a node in EC2 using JClouds that I later want to save as an AMI, so that I can later create compute nodes from it. I was wondering what the recommended configuration options are for such a scenario, esp in relation to security settings. I'd like to use this AMI for different accounts, just like many of the general-purpose AMIs can be used. I currently have the following: TemplateBuilder templateBuilder = compute.templateBuilder(); templateBuilder .hardwareId(InstanceType.M3_MEDIUM) .imageId("eu-west-1/ami-892fe1fe") // standard amazon linux .options(TemplateOptions.Builder .inboundPorts(22, 80, 8080)); // depends on application I then install some stuff on it (using "yum -y update" and "yum -y install xyz"). I noticed that I should not use AdminAccess.standard() as my runscript (which I think is typically done for compute nodes), as that causes [1]. Any other things that I should look out for when creating an image, that is to be an AMI later? Many thanks, David [1] AuthorizationException on node eu-west-1/i-e4d0b2a4: org.jclouds.rest.AuthorizationException: (... stuff ...) error acquiring {hostAndPort=54.73.70.170:22, loginUser=root, ssh=null, connectTimeout=60000, sessionTimeout=60000} (out of retries - max 7): Exhausted available authentication methods at org.jclouds.sshj.SshjSshClient.propagate(SshjSshClient.java:385) Caused by: net.schmizz.sshj.userauth.UserAuthException: publickey auth failed
