Hey guys, I took a look at this question, but not sure I understand the suggestion as they were pretty light on implementation specifics (sorry if I’m a bit of a newb to octopus automation).
I’ve got azure scale sets set up and when a new machine comes online (automatically because of load etc…), I need it to be able to call out to the Octopus server and trigger deployments based on a role specifically. The machine will have no idea what projects should be deployed to it, it will only know what role(s) it fullfills. The provided answer suggests using octo.exe (or a provided powershell script)…but both suggestions require knowledge of which project(s) to deploy. In addition, I will also be doing this from linux…so not sure if octo.exe will run there. Is there a way that when a machine comes online it could make a call to the api to trigger a release deployment? That would be way better than having to install something and would be way easier from the linux side.
Thanks for reaching out. Like Daniel mentioned on that other ticket, we are currently working on a feature called Elastic Environments(EE) that was pretty much designed for this specific case. Once you finish installing the Tentacle in your machine, you’ll register it in Octopus, which will be smart enough to notice that a machine was registered and added to a specific Environment, and it will install the latest release of all the needed projects on it. All the logic will happen on the Octopus server, so it wont matter if the Tentacle/Target is Windows or Linux.
For the time being, I’m afraid there’s no way of doing this without knowing the name of the Project. Both the REST API and
Octo.exe (which is just a wrapper of the API) need to know the name of the project for the
POST body to
Octo.exe will only run in windows, so you won’t be able to execute it from your linux box. If you want to make an API call, you’re gonna have to use a linux tool like CURL. On the link below there’s a Powershell example for starting a deployment of an existing release to a specific machine which might help as a starting point
I do realize this is definitely not the answer you were looking for, but I hope you understand that we’ve definitely though about this scenario, and that we are working hard to release this EE feature as soon as we can for people that are in the same situation as you.
You can learn more about Octopus
3.4 and even try our current Alpha which already includes an early version of EE in this link: https://octopus.com/blog/octopus-deploy-3.4-eap-alpha2
OK thanks I’ll take a look at the Alpha.