After you have selected an existing AMI to customise, the next step is to start an instance of the AMI. 3.1 Starting an instance of Atlassian's default AMIIf you chose to customise Atlassian's default AMI, you must start the instance from the admin section of Bamboo. See Starting an Elastic Instance. Note that Atlassian's default AMI cannot be started using the command line ec2 tools. This is because, on start up, the Bamboo agent on Atlassian's AMI checks to see if it was started from a Bamboo server, and immediately shuts itself down if it was not. Once started, see Accessing an Elastic Instance for details on how to access the running instance. 3.2 Starting an instance from the command lineUse the ec2-run-instances command to start your instance, as follows: ec2-run-instances <image_name> -k <key_pair_name> |
where <image_name> is the name of the AMI selected in the previous step and <key_pair_name> is the name of the registered key pair generated in '1. Requirements' The public certificate of this key will be injected into your instance. For example, if you wanted to start an instance of image ami-e55bbd8c using key pair my-keypair, you would run the following command: ec2-run-instances ami-e55bbd8c -k my-keypair |
This command would produce the following command-line output: INSTANCE i-25b86743 ami-e55bbd8c running my-keypair |
i-25b86743 is the name of the new instance in the above example. You should note down the name of your new instance, as you will need that to access your instance in the next step.
Please note that once you start an instance, you will be billed by Amazon for instance uptime. If you decide to abandon the setup of a custom elastic image after this step, please ensure that you shut down your instance via the AWS console. |
3.3 Starting an instance from BambooYou can also start a fresh, uncustomised image from Bamboo and begin customisation. The drawback of this approach is that you have only 40 minutes before Bamboo shuts down your instance. The advantage is that you can customise the agent in a single step (as opposed to having to customise/create image/start from Bamboo/save image again). |