Hi there
I’m currently trialing Octopus deploy in an AWS EC2 auto-scaling environment (not Elastic Beanstalk or CloudFormation). For the most part it’s working well, but the fact that we use autoscaling means that the machines in a given environment will vary over time.
To support this, my project has two build steps:
- Refresh AWS instances
- Deploy site
The first build step in the deploy queries AWS for the current instances in the specified environment. It will create a new machine in Octopus for any new instances, and delete any machines whose AWS counterpart is no longer there.
All of that is fine, but the annoying part is that the changes to the machines in the environment during build step 1 are not reflected in build step 2 where the nuget package is deployed. That build step still attempts to deploy to the machines that were originally there. This causes the deployment to fail if one of machines no longer exists.
I’d like to use the powershell cmdlets to modify the current DeploymentResource to include the new/exclude the old machines, but there is no Modify option on $repository.Deployments
Does anyone have any other suggestions of how this can be acheived without having two separate Projects?
Thanks very much