Tentical configure to reconnect on restart of machine

execution

(stephanie.gooch) #1

Hi, my aws EC2 windows servers need to reboot for patching, this causes the tentical connection to be dropped. How can i say on the script I run at iniatl build that i always want this service on so on reboot it reconnects to the octopus server?


(Daniel Fischer) #3

Hi,

Thanks for getting in touch! I think I know what is going on here. After your server restarts, you can add a step in your deployment to perform a health check. This should pick up the server once it is restarted and the Tentacle service is running.

We also have some documentation on how to handle transient targets in Octopus.

Let me know if this helps, or if you have any other questions. :slight_smile:

Best regards,
Daniel


(stephanie.gooch) #4

So the Reboot isnt part of the deployment it is when we do patching to the servres seporatly. Having a step while ‘deployment is in progress.’ will not bring them back when they go down randomly at stack points. I believe the Transient Targets is for in progress right?
If there is a way of having octopus installed so it sends an connection as soon as this turns on that would be perfect.


(Daniel Fischer) #5

Hi,

Thanks for getting back. I’m sorry, my assumption was that this was happening during the deployment. The transient targets are a ‘deployment in progress’ feature.

Octopus can not know the status of a Listening Tentacle until a Health Check has been run. I believe there are a few ways you could manage this.

  1. The first would be to see if our Machine Policies feature can help you out here. This will let you customize how Octopus performs its health checks on a per-machine basis. You can increase the interval which selected targets are checked. This also lets you use custom health check scripts.

  2. Create a project which only performs the Health Check step and remotely execute it using Octo.exe deploy-release as an automated process on the target server rebooting.

  3. You could use an API script against Octopus from the target server to remotely perform a health check. Here is a link to an example script for this in our GitHub repo.

Let me know if any of these options help here, or if you have any further questions. :slight_smile:

Best regards,
Daniel


(stephanie.gooch) #6

Hi Daniel,

I ran the api script and got the following

Name : Health

Description : Health check started from Powershell script

Arguments : {[Timeout, 00:05:00], [MachineTimeout, 00:05:00], [EnvironmentId, KPMGprojectstore-uat],

                         [MachineIds, [

                           "i-0a35070680d65ee1d"

                         ]]}

State : Queued

Completed : Queued…

QueueTime : 3/16/2018 4:41:06 PM +00:00

QueueTimeExpiry :

StartTime :

LastUpdatedTime : 3/16/2018 4:41:06 PM +00:00

CompletedTime :

ServerNode :

Duration : less than a second

ErrorMessage :

HasBeenPickedUpByProcessor : False

IsCompleted : False

FinishedSuccessfully : False

HasPendingInterruptions : False

CanRerun : True

HasWarningsOrErrors : False

Id : ServerTasks-55350

LastModifiedOn :

LastModifiedBy :

Links : {[Self, /api/tasks/ServerTasks-55350], [Web, /app#/tasks/ServerTasks-55350], [Raw,

                         /api/tasks/ServerTasks-55350/raw], [Rerun, /api/tasks/rerun/ServerTasks-55350]...}

But the server did not show up, any ideas?


(stephanie.gooch) #7

All i really need is a simple command that will bring the server back into the octopus deploy environment ideally using the information that is on the server so i don’t have to pass in the key, env name etc


(Daniel Fischer) #8

Hi @stephanie_gooch,

The API Script method is a great option for interacting with Octopus outside of the UI but it can be a bit tedious. An easier alternative may be option 2 I mentioned previously but the API is generally a common option here.

The Health Check is an automated process in Octopus and manually controlling it outside of a deployment or Machine Policy wont be a simply process. Octopus does the Health Check via task, the only way to manually perform one is via the UI, using the API, or with a single step in a deployment. (Method 2).

If you would still prefer to use the API over creating a project to trigger remotely then I will need to get some further information about what happened when you ran the API script.

Was a new task created after running the script? If it was, can you please attach the task log?

Did you make any modifications to the script? Would you be able to attach the script you used so I can test on my end?

It would also help to know what version of Octopus you are currently running.

Looking forward to hearing from you.

Best regards,
Daniel


(system) #9

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.