Deploying releases to offline targets

Hi,

As a product development company, we have multiple customers (some of which are online and some are completely offline) to whom we need to perform deployments to.

The problem is with offline customers. We are looking for a clean solution to handle this scenario.

Below are our requirements:

  1. We have octopus release lifecycle as PD–> QA --> Production. (Each release after successful deployment will be promoted to next environments).
  2. We want to use the same defined octopus deployment process for a project that we are using for online customers even in an offline case. (We can transfer any artifacts or files manually and run the process locally but we want to use the same steps/process we used in deploying to previous environments.)
  3. we want some way to provide feedback of offline deployments fed back into our self-hosted octopus server.
  4. Most of our projects have a step to deploy another project. (So there are dependencies of projects in a single deployment/release). We also need the projects to be run in a specific order so that dependencies are not missing. And each project deals with installing different components on different machines based on their roles.
  5. If we migrate the projects, the lifecycle of the projects should only be Production instead of again requiring to deploy a release to PD --> QA and then to production.

I have gone through some of the available octopus documentation and tried them. We are also looking into an option of installing local octopus server at offline sites and exporting projects and its configuration from the main server to offline server and later export back the deployment information or release to the main server to have a single place for all information.

Below are the observations for each approach tried:

a) Tried offline package drop: This helps to create a folder structure of all the required resources like main project and its dependencies to run on offline machine but it does not have the ability to perform any steps based on failure from the previous step, no solution is available to transfer feedback from deployment back to octopus server , we have to manually run powershell script for each project in specific order, if a project has steps defined on multiple machines, we have to run each projects on all machines for the respectives actions to be done on each machine etc…

b) Export and partial-export options: I have tried to use REST API to export a project and its configuration and import it onto an offline octopus server (which is maintained at customer site). I saw that exporting a project does not export its dependent projects. so we need to explicitly specify all projects needed. Below is my sample Request
url:https://xxxxx.com/api/migrations/partialexport
body:
{
“Password”: “xxxxx”,
“Projects”: [
“Prjct1”,
“Prjct2”
],
“PackageId”:“name of package to be created”,
“IgnoreCertificates”: true,
“IgnoreMachines”: true,
“IgnoreDeployments”: true,
“IgnoreTenants”: true,
“IncludeTaskLogs”: true,
“EncryptPackage”: true,
“DestinationApiKey”:“API-xxxxxxxxxxxxxxxxx”,
“DestinationPackageFeed”:“xxxxxxxxxxxxxxxx”,
“TaskId”: “string”,
“Links”: {

}
}

With this approach, the package is exported and when tried to import to the offline server, we found that the packages from the built-in repository that the project requires are not transferred to the offline server.

c)I have looked into octo export and import documentation briefly and it says clearly that all project groups, , environment, machines, nuget, library variables, channels that are required by project should exists in offline server. This is a manual effort and also redundant work to be done on all offline machines.

d) I have looked into octo export and import release and its same as described in section c. Expects all dependencies to be present on offline octopus server like channel, lifecycle etc…

Based on this, Can you help to answer the below questions?

  1. What is the better way to deal with offline machine updates based on our requirements?
  2. Is there an equivalent of “deploy to offline drop” in Octopus REST API? (Which URL /request will allow deploying a specified release on a specified offline target?)
  3. Is there a better way to export project and its dependent projects along with its associated packages and variables using REST API?
  4. Once the offline deployment is made, how can we transfer the deployment status or release version installed information to central octopus server?

Please let me know if you need any details.

Hi Revathi,

Thanks for reaching out. currently within octopus there is no way to know if deployment steps have successfully completed when using offline deployment targets, Octopus is only interested in knowing that the file were successfully copied to the specified offline drop location and if so, that deployment will be marked as successful.
When you say some of your customers are offline, are they completely offline? the reason I am asking is because if those customers are able to make outbound connections, a possible solution might be to use Polling Tentacles. I just wanted to mention it, as this would be the simplest solution and sometimes it can be overlooked.

Based on what you have mentioned I will try and answer the question the best I can.

  1. Currently there isn’t really a nice solution for handling deployments + deployment status for offline targets, Octopus will really only prepare all the files for a deployment to be run manually. There is currently no way to communicate the results of executing an offline deployment to the Octopus server.
  2. Not 100% sure if I understand this question. Through the Octopus REST API it is possible to create deployments, however the targets of those deployments will be determined by the environment the deployment is on and the roles selected in the deployment steps. There is also some documentation around the API endpoints for your Octopus server, if you go to http://<Your-Octopus-Server>/swaggerui it will show you all the endpoints and usage examples.
  3. The example you provided for exporting projects from the REST API is the correct way of doing it. However the fact that the dependant project don’t also get exported when not explicitly defined could possibly be a bug, so I will have a look into that one. There is also an command line tool, Octopus.Migrator.exe which you can use to perform exports/imports.
  4. If you were willing to maintain all to processes around exporting/importing projects and releases from your main Octopus server to the offline Octopus server, this could be a possible solution. However its worth noting that when using the Migration API the Octopus server will be put into maintenance mode, which could interrupt your daily deployment operations.

I’m sorry I don’t have a nice clean solution for you. If you have any more questions, Id be more than happy to try and help.

Kind regards,
Tom W

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