Automating provisioning and deployment

I am very new to Octopus Deploy and I am investigating how it will work in a Continuous Delivery pipeline where we will automatically provision a new environment (1+ servers) and then deploy to the new environment with all the appropriate variables and configurations. This means we will:

  1. create a new VM with a tentacle installed
  2. connect the Octopus server to the new tentacle
  3. update any variables specific to that environment (I’ve been using a variable set for each environment when setting up my projects)
  4. create a release and deploy (or deploy an existing release to that environment)

I’ve seen other discussions about deploying to a specific machine and automating tentacle install, but not sure how I would handle this entire workflow. Any ideas?


Thanks for getting in touch! Could I ask why you need a new environment with each new Tentacle? Are you doing a tenancy style deployment where an environment is actually related to configuration specific information? Generally when new machines are provisioned they are attached to existing environments.

I would like to know more about your requirements and specifics so I can suggest the best method and solution for you using Octopus.


Hi Vanessa,

Thanks for your reply. The use case I have in mind is for automated testing. In our workflow, we are using TeamCity to build, trigger deployments, and run automated integration tests. In order to run the automated integration tests, we need environments to run them on. We would like to use virtualization for this and use the following process when we run these tests:

  1.   Create a new VM image. (not using Octopus)
  2.   Setup and configure the VM image with any prerequisite software. (not using Octopus)
  3.   Deploy the latest of our software to the VM image using Octopus.
  4.   Run integration tests from TeamCity on the VM image.
  5.   Delete/deprovision the VM image.

My question is concerned with how we can configure Octopus Deploy to deploy to a newly created VM image that it previously has not known about and configure our software with the correct values for target-specific variables.


Hi Brian,

Thanks for clarifying. Generally when this occurs there is already an existing environment, and the machine is added to it with a script setup to deploy the latest release from specific projects.(in 3.4 we are introducing a feature to automatically deploy to new machines that come online).

If you have target-specific values you may need to also script these in via the API to create the new variables or scoped variables before deployment. Octopus itself is environment focused not machine focused, so deploying to new machines is very easy and even specific machines can be targeted for a deployment to an existing environment. You can always add more machines to environments and then deploy to them without much fuss.

It does sound like everything you want to do could be done via scripting and using the API. Many customers do do this with more complexity.

Let me know what I can provide more information about or clarify.