Hotfix versus Full Deploy

Hi,
I currently have 8 steps in my multi-tentanted deployment process

  1. take site offline, backup the web.config and delete existing files
  2. backup database
  3. run database migrations
  4. deploy web application
  5. perform setup tasks so site can be tested internally
  6. manual intervention step so site can be tested
  7. bring site back online
  8. deploy Windows Service.

These steps roughly replicate how we manually perform a major update for a tenant.
However we also frequently perform minor hotfixes where many of these steps are omitted so that the site is updated in the least amount of time, is not taken offline and does not require any manual intervention.

I have been looking at the step conditions but only seem to be able to skip them based upon environment or tenant.
In each case the environment and tenants are the same.
I have also considered setting up a separate project for the hotfixes which is pretty much a clone of this project missing the steps we wish to omit. I am thinking this may be the way to go and was wondering if anyone else had come across this issue.

Thanks
Matt

Hi Matt,

Thanks for reaching out! Hotfix deployments are very commonly done with the use of channels. They can be expedited by having a separate lifecycle where you can skip everything and deploy straight to Production. Then you can backfill to your other environments as needed. When channels were introduced in Octopus 3.2, we wrote a blog post walking through the process of configuring them.

I hope that helps!

Kenny

Thanks a lot Kenny,
exactly what I was looking for.
I got a little lost as the Channels condition did not appear in the Step Details until I had multiple channels setup.

Love the product, kudos to the team!

Matt

Hi Matt,

Great to hear that helped! Thanks so much for the kind words!

Warm regards,

Kenny

Thanks Kenny,
I now have a full deployment channel and a hotfix channel setup.
I can see that there are version rules that I can put in place to filter which builds can be applied to each channel. I am after a rule to ensure that a major upgrade goes through full deployment and not a hotfix.

Ie if tenant A is currently running on version 1.7
they can be hotfixed or have a full deployment to version 1.8
but can only go through the full deployment to go to version 2.0 from 1.x

Does this make sense or am I going about it the wrong way?

Cheers,
Matt

Hi Matt,

Great to hear you got the hotfix set up! I’m not positive I fully understand your scenario, so please correct me if I’m mistaken about what you’re wanting to do.

Octopus was designed to allow you to deploy the most recent release to a new tenant without having to go through previous releases. You can set the package version rules for the channel (which you can overwrite at release creation), but there’s no existing mechanism to only release for Tenant A if they have already gone through the channel.

Kind regards,

Kenny

Hi Kenny,
I am trying to create a release for the current version of my app. However upon creating the release I have to choose a channel. The way that I currently have it configured is that I have a hotfix and a full deployment channel, the main difference being the hotfix omits some steps such as the manual intervention step where we QA the web application before putting it back online.

If the tenant is only getting a minor upgrade we want to use the hotfix channel but if it is a major upgrade we require the full deployment channel.
Therefore I need to create a release for each and ensure that I apply the correct channel release to the correct tenant.

I would rather have a single release and be able to choose the channel when it comes to deployment. Or even better have the correct channel selected based upon version rules.

Perhaps I am not using channels as they were intended to used.

I hope this makes some sense.

Regards,
Matt

Hi Matt,

To answer your question:

I would rather have a single release and be able to choose the channel when it comes to deployment.

Channels are only for a release, and not for a deployment. You can select the channel to use when you create the release, but you can’t change the channel at deployment time.

Though you can force which package(s) the release uses with the version rules. If you define the Version range to something like [1.7.0,1.7.9] for example, that will mean the release will then choose only packages that fall into that range. It’ll use the most recent one in that range by default. And it won’t consider anything outside of that range, like 1.8.0.

Kind regards,

Kenny

So back to my original question, can I per deployment choose to omit particular steps based upon the version that the tenant is currently running and being deployed?

Presently I am creating two releases for each build
2.2-Full
2.2 (the hotfix version)

I am then choosing which release to deploy based upon whether the version is currently on 1.x or 2.x

Other than environment, channel and tenant filters I can’t see how to omit particular steps at deployment time.

Sorry if I am being daft, I really appreciate all the advice that you are providing.
Matt

Hi Matt,

That’s no problem! Of course you’d want a resolution to your original question :slight_smile:

You can skip steps based on the channel by scoping the steps to the channels. If you scope a step to the Hotfix channel then it would only run when the Hotfix channel is used.

Kind regards,

Kenny

Notice:

This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.