DEV Community

abrarmoiz
abrarmoiz

Posted on

Hybrid CI CD: Cloud based CI and On premise CD Solution

Use of (cloud-based) Azure Devops CI tool with (on premise) Octopus deploy CD tool. This blog explains steps to move towards a cloud-based solution from an on premise one.

Follow steps below to implement this solution:

Use of on-premise agents: The concern with this implementation was the deployment would happen on premise servers using Octopus. To implement this solution we used the “On-premise” Agents. The type of agents, communication and authentications steps are all discussed in https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser

alt text

Setting up default agent: Ensure the user has sufficient permissions and identify a suitable littler on-premises agent. Then follow the steps in https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops to set up the agent.

alt text

Azure Devops Plugins: Following plugins are installed :
a. Red gate plugin to facilitate Integration with Redgate SQL Change Automation (https://marketplace.visualstudio.com/items?itemName=redgatesoftware.redgateDlmAutomationBuild)

b. Octopus plugins for deployment (https://marketplace.visualstudio.com/items?itemName=octopusdeploy.octopus-deploy-build-release-tasks)

alt text

Setting up of additional Octopus projects: Create additional projects to receive output artifacts from Azure Devops pipeline.

These projects would receive build artifacts from Azure Devops. The additional projects were setup to:
a. Avoid any impact to progress on tickets dependent on Octopus
b. Existing projects in octopus have a Team city specific configuration, this was modified to generic one in

alt text

Ensure the code is in a cloud based repository: Either Azure repo / github / gitlab / bitbucket etc..,

Setting up pipelines in Azure Devops: Follow steps to setup azure build pipeline (for e.g. follow https://azuredevopslabs.com/labs/azuredevops/yaml/ to set up a pipeline) however ensure the agent pool in Azure Devops is set to default (as we have defined the agent to be default in step 2) and have the following major tasks in each pipeline:

a. NuGetCommand@2
b. VSBuild@1
c. OctopusPack@4
d. OctopusCreateRelease@4
e. OctopusDeployRelease@4

For Steps c,d and e follow https://octopus.com/docs/packaging-applications/build-servers/tfs-azure-devops/using-octopus-extension which results in packaging/ creating a release and deploying a release in Octopus from Azure Devops

Note : Since we are using Azure Devops as a CI tool we will only be setting up the build pipelines and not the release pipelines

Top comments (0)