I'm very new to Packer. We are using Packer to bake AWS AMI and use it in 
Teamcity. When we add the new AMI to TC. We are seeing this error 
"Some plugins in cloud image are missing/outdated. This affects the time 
necessary to start the agent"

>From the tc-agent logs, it looks like the agent was build in the state 
where it still needs to upgrade the plugins. Perhaps it also needs to or 
download some tools from the server before the build. The approach I was 
thinking of is to create the AMI only after all necessary plugins & tools 
are downloaded and upgraded.  But I'm not sure what exactly to do. 

I have tried using a sleep 180 at the end of the script. And also in the 
provisioner's section, I wrote the below query. But none of them is working 
out. Can someone please point in the right direction?

https://stackoverflow.com/questions/29415198/always-sleep-on-packer-provisioning

https://teamcity-support.jetbrains.com/hc/en-us/community/posts/360002485420-Build-agent-some-plugins-are-missing-outdated

"provisioners": [{

    "type": "shell",

    "scripts": [

      "scripts/common/sleep.sh",

      "scripts/common/init.sh"

      ]


sleep.sh

---------------------------

#!/usr/bin/env bash

while [ ! -f /var/lib/cloud/instance/boot-finished ]

do 

echo 'Waiting for cloud-init...' 

sleep 1 

done

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/4a632fb3-acbb-4dca-b896-b4a4d71036d3n%40googlegroups.com.

Reply via email to