How to recconect to tentacle when on ec2 that was just started

Hello,

We stop some of our ec2 deployment target instances at night to save money. The CICD for them is set to start the instance and once ready do deployments. But even though the ec2 instance is running and all checks passed, the target still “unconnected” for some time. This causes the build/deploy pipeline to fail.

I need a way to explicitly re-connect/validate the connection to the tentacle. I tried running a health check via the api, but that didn’t work? I get this message "There are no active deployment targets to check " which is not true.

Please advise,

Bob

Hi @bob.hardister,

Thank you for reaching out to us.

I will take a look into this for you and see if I can find out what is going on.

I would be keen to understand how your Tentacles/Deployment targets are configured in a little more detail if possible:

  • Are you using Windows or Linux for your ec2 deployment targets?
  • Are you using Polling or Listening Tentacles?
    • If you are using Listening Tentacles, how are these endpoints (Tentacle URL) being configured?
    • Are you using ephemeral IPs?
  • Do you have any other process on your ec2 that run on startup causing delays when they come back online?
  • When you say all checks pass, I assume you are referring to AWS checks rather than the Octopus Deploy health check?
  • Are you performing any checks to get the Tentacle health (check if online) as part of your deployment process within Octopus?
  • Within your CI/CD pipeline, how are you starting up your ec2 instance? Is this done within Octopus or something external like a build server or orchestration tool?
  • What is an example of instance size you are using for your ec2?

At this point, it feels (and I am just making assumptions here) that there could be changes with the Tentacle URL when you are stopping your ec2 and starting them back up in AWS when connecting over the public DNS (assuming this is how you are connecting to your Tentacles) where this may change if you are using ephemeral IPs.

You mentioned using the API to run the health check, where did you run this from?

Just in case you haven’t seen our documentation for adding health steps to determine a deployment target availability during a deployment: Health check step - Octopus Deploy. If you haven’t done this already, I would consider adding this a health check step to the start of your deployment process (after you have started the ec2) so you can make sure the machines are healthy and online before your deployment.

I look forward to hearing from you.

Regards

Doug