Clean VM per deployment

I’m trying to evaluate using Octopus Deploy for our company. Our main product is a windows desktop application (MSI installer) so it does make our deployment/testing processing more complicated. (in the future we will have various AWS APIs and websites too but that should be straight forward).

We’d like to be able to deploy to virtual machines which are either rolled back before installing the software or are cloned from a clean virtual machine base image and install on that.

Is there any advice on if this is possible or how it can be done? I’ve seen some information about being able to register Tentacles from code and that Octopus has dynamic environments but i’m not sure if any of this applies to our scenario.

Currently we’re using VMware Workstation Pro, in the future we may be using a VMware ESX server. Although any advice on better approaches would be appreciated too.


Hi Chris,

Thanks for reaching out and sorry for the delay!

The general idea of the workflow you’ll need to follow will look like this:

  1. Run a process that.
    a) Spins up the infrastructure you need.
    b) Configures your infrastructure.

  2. Run the deployment process that pushes the MSI to your servers and executes it + anything else you need to get your app/service running.

  3. Run another process that destroys the infrastructure you created in (1).

Each of those processes can be contained in separate Octopus Projects called something like “Provision VMs”, “Deploy App” and “Tear down infrastructure”. This is a very common practice that even we use internally for our testing infrastructure.

The biggest challenge you’ll find in the above process is going to be with (1.b). Because you’re gonna need to run code on a VM that Octopus still doesn’t know about (because you haven’t set up a Tentacle on it yet). Luckly for you, with VMWare there’s ways to execute scripts on machines that you just created(I’ll let you do the research on this).

Once you figure out how to run scripts on your VM right after you provision it, this is the doc you’ll want to dig into: . It explains how to setup a tentacle and register it with your Octopus by running commands straight from the Tentacle VM. Once those commands run successfully, your Octopus server should know about this new Tentacle and it should be able to deploy code to it.

Let me know if you need help with this along the way.

Best regards,

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