Custom AMI problems: elastic agent doesn't start and ssh fails

I've read through this document, and this document very carefully. I'm starting from a Bamboo stock image, Amazon Linux: S3 x86_64. I make my modifications and bundle/register a new AMI. I then register this new AMI as a new elastic image in the Bamboo OnDemand configuration and try to start a new instance.

The instance starts fine, but the bamboo agent never starts. After a while I see issues like:

- /home/bamboo/bamboo-agent-home/ (No such file or directory) Could not create directory '/home/bamboo/bamboo-agent-home/classpath'

I think this is due to the /home/bamboo directory not being included in the AMI. I thought the command, /opt/bamboo-elastic-agent/bin/, was to work around this issue, but I'm running that prior to creating the AMI and it's still not working.

The second problem I'm seeing is that I'm not able to shh to the instance:

! ssh -i ~/.ssh/
Permission denied (publickey).

I found this unanswered question on stack-overflow:

And the second link above has some relevant comments. Before I waste anymore time on this can someone let me know if this is even possible?



1 answer

0 votes

Was there any interesting output from prepareInstanceForSaving ?

Did you try using the EBS image?

I haven't tried to use an EBS image yet, but that's the next step if all else fails.

Here's the ouput from prepareInstanceForSaving

[root@domU-... ec2-user]# /opt/bamboo-elastic-agent/bin/
Stopping crond:                                            [  OK  ]
Killing all Java processes...
Mounting root device /dev/xvda1 in /tmp/rootDevice15312 to copy data from ephemeral storage...
Copying back /home from ephemeral storage to the root device...
If its your internal image, its safe to just save it now. Otherwise,
you may want to remove some build files/authorisation data/Maven caches from /tmp/rootDevice15312/home/bamboo first.

That looks good. Weird. Try the EBS image.

Using the stock Bamboo amazon linux **EBS** AMI does seem to work, so I'm good to go. That being said, it's pretty clear from the docs I linked to in my post that you claim to support custom AMIs using modified Bamboo S3/instance-store AMIs, so you should upgrade your docs, fix the bug, whatever. I'm certaintly not the only one who's confused or experiencing trouble.

Regardless, I really do appreciate your prompt response to my question.

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Dec 06, 2018 in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

5,595 views 22 17
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you