so i have a script that
creates and ec2 instance
configures it as an elastic agent
creates the AMI
now i want create an elastic agent via that AMI with a API call is this doable via API call? or is there another automated way
Thanks
Bill
Hello @William Flow
Bamboo relies on premade AMIs to launch its Elastic Agents. An EC2 instance that is supposed to be used as an Elastic Agent needs to be launched by Bamboo and cannot be running before that.
Considering your AMI contains all the required applications to launch an Elastic Agent, you just have to add your AMI as a Custom image in Bamboo and launch an Elastic Agent.
Here are some links for you:
Best regards,
Eduardo AlvarengaAtlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
Hi Eduardo
Yes I understand that my question is can I fire up an elastic agent via an api call to bamboo? i will know the image id etc
Hey @William Flow
There is no REST API endpoint that would allow you to control Elastic Agents up/down specifically. Elastic Agents are expected to be started automatically by the Automatic Elastic Instance Management feature.
But you can always call the UI through curl, for example, below I'm starting one Elastic Agent from imageId=688129:
$ curl -u user:pass 'https://bamboo.mydomain.net/admin/elastic/createElasticInstances.action' -H 'content-type: application/x-www-form-urlencoded' -H 'x-atlassian-token: no-check' -X POST --data-raw 'numAgentsToCreate=1&elasticImageConfigurationId=688129&selectFields=elasticImageConfigurationId&save=Submit'
Cheers,
I do have one more question on this in your example you have
elasticImageConfigurationId=688129&selectFields=elasticImageConfigurationId&save=Submit'
my question is in my instance of Bamboo i dont have the elasticImageConfigurationId I only have elasticImageConfigurationId how do i get the elasticImageConfigurationId ? or do i just use the elasticImageConfigurationId
It looks like you're new here. Sign in or register to get started.