Uninstall-release option for relocating services between hosts

Hi there,

We have hundreds of different services running on a set of target hosts (multi-tenant) which also need to be relocated every now and then. That means the service needs to be installed on a new target host, run on the new target host and then uninstalled from the old target host, in that order.

I’ve read multiple threads on an uninstall-option request for Octopus, but the answers all state: “No, it is not supported and we have no plans to add Uninstall support.” However, as you can see in my case it is almost vital to the use of Octopus, to be able to move services around between different target hosts.

Is there some way I can get this working? Removing specific deployments is also not what we intend (like in thread What about uninstalling release? ) - but perhaps we can automate the removal of entire deployments from Octopus via the REST API. However, keeping a track of history is also a big plus.

So I’d like to know if this is something Octopus can support. Hope you can help!

Cheers,
Eelko

Hi @EelkonioCM

Thanks for getting in touch, and I can definitely understand your point of view.

Unfortunately our answers haven’t really changed since the thread you have already located, as this is a non-trivial problem that, to be honest, hasn’t gained much traction with the community.

I doubt we will ever implement an uninstall solution, as it is impossible to even begin to define what that might look like. However if we see that it’s important enough to the Octopus community there may be justification to support some form of dashboard notification that a release or project is no longer installed on a given machine.

For your current problem I, one approach that might suite would be to create an uninstall project that you can deploy to a machine to remove the services, then you could create a migrate project that uses our (newish) Deploy a Release step to call the projects in the correct order and mitigate any manual errors. You will still have to make a choice about having a stale dashboard vs. removing all history however that is the best option that we have available at this point in time.

I know that’s not the answer you’re looking for, however it is where we are currently at.

Let me know if there is anything else that I can assist with,

Regards,
Alex

Hi Alex,

Well, even though it’s not what I was hoping for (fingers crossed, rubbing a rabbit’s foot and throwing salt over my shoulder for two hours) you did give me some pointers on how to approach it via custom projects.

I was already setting my mind to creating automated uninstall scripts in Octopus as part of each deployment step. That generated script could then be used to uninstall a service and at the end perhaps even trigger Octopus to remove all (at that time) irrelevant release-information regarding the target host. But I’ll follow your pointers first.

So thanks! Should I stumble into serious problems, I’ll be grateful to share and hear your thoughts.

Best regards,

Eelko

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