Need help with Packer and TC

47 views
Skip to first unread message

Gautam Mallick

unread,
Jan 11, 2021, 2:13:01 PM1/11/21
to Packer
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://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


Reply all
Reply to author
Forward
0 new messages