Octopus Deploy Drift Mecanism

Hi,

I am currently working with Octopus in our environment and faced an interesting (read obvious) question other day from management.

Once we deploy the content and configuration and some changes it for reason unknown then how would we get the content or configuration back ( basically how to catch Drift ).

Does octopus supports it and if not how can I use DSC with octopus to achieve it …

Thanks,
Nitin

Hi Nitin,

Thanks for reaching out.

Your question is quite interesting, and the answer will ultimately depend on your application’s architecture.

The way DSC works goes a bit like this:

  • A user creates a manifest that says how he’d like things 1,2,3 to be (in which state).
  • DSC checks the status of 1,2,3, and if they are not in the state desired, it sets them the correct way.

Now, that model is quite convenient for configurations because its not that hard to check a value and update it if its not in the desired state. But when we are talking about applications, it can get tricky depending on What you want to check-and-correct-to-desired-state.

I’d be interested in knowing a bit more about the purpose behind your initial question. Something tells me someone recently made an undesirable change for an unknown reason to your app that you’d have liked to correct ASAP using Octopus.

What change was it? A file disappeared? A config changed? A value in IIS changed? Let us know more about this so we can give you a more informed answer.

Best regards,
Dalmiro

Hi Dalmiro,

Thanks for responding to this. Please find my answers inline –
Hi Nitin,

I’d be interested in knowing a bit more about the purpose behind your initial question. Something tells me someone recently made an undesirable change for an unknown reason to your app that you’d have liked to correct ASAP using Octopus.

[Nitin] – Yes this is precisely I am looking for.

What change was it? A file disappeared? A config changed? A value in IIS changed? Let us know more about this so we can give you a more informed answer.

[Nitin] – While troubleshooting a production issue immediately after deployment, IIS configuration was manipulated along with a XML. After this engineer forgot what changes he made on the configuration and even after deploying the content it is not consistent with production.
Thanks,
Nitin

Hi Nitin,

Octopus doesn’t check the current configuration/files before starting the deployment (like DSC does). It just executes the deployment with the directives given in the deployment process.

In your case you could do something like this:

Have 2 channels in your project.
Channel 1 ( Deployer ) will contain the steps of your current deployment process.
Channel 2 ( Checker ) will contain a set of custom steps that will check specific aspects of your application. For example “Is IIS properly configured?”,“Does the XML have the expected content?”. If the Checker detects that theres a misconfigured machine, It’ll take note of that machine name. At the last step of the Check, it’ll execute Octo.exe deploy-release for channel Deployer, but only on the machines that are misconfigured (using the --specificmachines param with the names of the misconfigured machines).

Its a bit hacky, but I can totally see this working.

Best regards,
Dalmiro