Deployment project with no environment?

I need to create deployment project which asks user a few questions (or provides a few variables to fill) and creates virtual infrastructure using Octopus Azure VM extension. The problem is that I need to run it manually and it cannot be associated with any existing environment as the environment only appears as the result of running this project. Is there a way to run environment-less project?

Hi Konstantine,

Thanks for getting in touch! Unfortunately, there is no way in octopus to do an environment-less deployment. However, you are able to to do a Cloud Region deployment to an “infrastructure” environment, for the sake of spinning up your new environment.

Example:

Project 1 - Create Environment

Project 1 deploys to “Infrastructure”, which is an environment with a simple Cloud Region target.

We originally considered calling these "Generic Targets" because they can be used as a target for any steps that run on the Octopus Server.

Project 1 is used to create all of your environments + targets.

If you want to spin up your new infrastructure, this is the only way that we can currently do so, as environment-less is not possible.

If you would like to then automatically deploy to the newly created environments/targets, things get a little more complicated. You will need to create a new lifecycle that has these environments in them. You will also need to configure an automatic deployment trigger on your project which can look for status changes on a certain machine role (Which cold be unique for the new machines). The lifecycle part will need to happen via the API for automation, the trigger can be preconfigured or also done via the API if you wish.

I hope the above information get you started in the right direction. Please let me know if you have any further questions here or run into any issues. :slight_smile:

Best regards,
Daniel