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:
- We have octopus release lifecycle as PD–> QA --> Production. (Each release after successful deployment will be promoted to next environments).
- 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.)
- we want some way to provide feedback of offline deployments fed back into our self-hosted octopus server.
- 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.
- 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?
- What is the better way to deal with offline machine updates based on our requirements?
- 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?)
- Is there a better way to export project and its dependent projects along with its associated packages and variables using REST API?
- 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.