DR Scenario for Octopus Server

Hello,

We have active passive DR mechanism and we recover production servers in DR site using VMWare SRM and it starts running from there. We have separate octopus setup for production and DR. Is it possible in any ways to add the production servers as deployment target in DR Octopus without network connectivity and it will start working in DR zone once recovered.

Hi @kousik.roy

Thanks for your question!

It looks like you already have Octopus set-up in your DR environment which is excellent! In case it’s useful, I wrote up a Knowledgebase article about that very topic here:

Adding your production servers as deployment targets to your DR Octopus will depend on how you have your DR Octopus configured in terms of replicating data from your production Octopus instance.

If it’s standalone and not connected in any way to your existing production octopus database (by way of database replication techniques such as Log Shipping) then you can add the production servers to the DR Octopus instance - either manually in the DR Octopus web portal, or by using the REST API and adding the machines in programmatically.

Having no connectivity to the production servers from your DR Octopus instance in the DR Site themselves isn’t an issue. To prevent Octopus from trying to connect to them in the DR site, you have a couple of options:

  1. Mark the machines as Disabled in the DR Octopus instance. This means they won’t be connected to and fail any machine policy health checks. The downside of this is that you will need to re-enable them when DR is invoked.
  2. Configure the machines to have a machine policy with machine Connectivity set to Unavailable deployment targets will not cause health checks to fail.

If you do add your production servers to your DR Octopus instance, be sure to remember the Tentacles to trust both your Production and DR Octopus instances, since they may have different Server Thumbprints. In addition for any software which is deployed to them, ensure they have the matching target roles, environments and tenanted setup if applicable.

I hope that helps!

Hello Mark,

Thanks for your quick help and this knowledge base article. In my scenario, we have other non production servers are already connected from that DR octopus setup. Not sure database replication will be helpful or not for adding the DR servers during DR scenario. Also could you please help me with the process to add the machines programmatically.

Hi @kousik.roy

Thanks for getting back in touch!

Of course, you can use the Octopus REST API on your DR Octopus instance to add machines programmatically.

Depending on the type of deployment-target that you wish to register will depend on the exact request you make to the API.

We have a bunch of examples of registering targets on our website here:

If they are virtual machines using either a listening or a polling tentacle, then these examples should help to get you started:

In order to use the Octopus REST API, you will also need an API key. You can see how to create one here - https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key.

I hope that helps!

This is very helpful. However we have Linux servers configured with ssh as well. Could you please help for that as well.

Hi @kousik.roy

Whilst we don’t have an SSH example on our website, most of the API examples are also available on our OctopusDeploy-API Github repo:

Here is an example in that repo for registering an SSH target:

Best regards

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.