Overview
As DevOps Deploy clients are looking at OpenShift / Kubernetes deployments of their new container-based applications, some are looking to leverage Argo CD which uses a GitOps approach for deployment of updates.
Argo CD is a Kubernetes extension. It uses the Kubernetes existing functionality for monitoring and comparing actual and desired state.
The Argo CD Server that you configure in your Kubernetes cluster will check two items:
- Git repository where your Kubernetes configuration files are stored
- The actual state of the running cluster to see if it differs from the desired state (stored in git)
However, there can be business challenges that you will need to address. You may not want to have a git commit updating an environment in production without approvals, appropriate governance and trial of audit. Further, you may have a technical challenge where you will want to ensure that automated tests are run automatically following the update along with container scans.
This is where IBM DevOps Deploy comes into play with the introduction of our new Argo CD Plugin.
You can now drive all of your deployments, from mainframe, traditional distributed, and containers in Argo CD using IBM DevOps Deploy with the orchestration and governance that you require.
In part 1 of this blog series, will focus on the prerequisites that are required in order to integrate IBM DevOps Deploy with Argo CD utilizing our new Argo CD plugin. After you have the prerequisites configured, you can review the remaining steps by clicking this link to part 2.
Prerequisites
The following items will need to be configured before you can begin using Argo CD deployments with DevOps Deploy:
- Git Repository (using Bitbucket, GitLab, GitHub as examples)
- Argo CD Server
- Argo CD CLI
- Install the Docker Source and Automation Plugins to your DevOps Deploy Server
- Install the NEW Argo CD Automation Plugin to your DevOps Deploy Server
We will review each required prerequisite below.
Git Repository
You will need a git repository that contains the Kubernetes resource definition files you plan to deploy.
Here is an example of a git repository that contains a folder with all the resource definitions that Argo CD would monitor: https://github.com/IBM-ICP-CoC/KubeToy/tree/master/deployment
Argo CD Server
You will need access to an Argo CD server. See https://argo-cd.readthedocs.io/en/stable/getting-started/ for instructions on how to install Argo CD in your OpenShift or Kubernetes cluster.
An Argo CD application that references your git repository must exist in the Argo CD server.
Argo CD CLI
The Argo CD CLI will need to be installed on a DevOps Deploy agent machine. See https://argo-cd.readthedocs.io/en/stable/cli_installation/ for instructions on installing the CLI.
If you want to install the Argo CD CLI on a containerized DevOps Deploy agent running in Kubernetes/OpenShift cluster, be sure to install it in the persisted 'conf' directory. If you install the CLI anywhere else, it will be lost if the pod is restarted.
Finally, be sure that the CLI executable has execute permission set.
DevOps Deploy Docker Source and Automation Plugins
The DevOps Deploy Docker source and automation plugins will need to be loaded into the DevOps Deploy server. The Docker automation plugin depends on the source plugin, so you should load the Docker source plugin first.
The Docker source plugin can be downloaded from https://urbancode.github.io/IBM-UCx-PLUGIN-DOCS/UCD/#docker-registry
In your IBM DevOps Deploy web console, click on Settings at the top of the page and then click Source Configuration Plugins. Click the 'Load Plugin' button and choose the location of your source configuration plugin zip file as shown below:
Click Submit to load the new source configuration plugin.
Once this is complete, download the The Docker automation plugin from https://urbancode.github.io/IBM-UCx-PLUGIN-DOCS/UCD/#docker
In the IBM DevOps Deploy web console, click on Settings at the top of the page and then click Automation Plugins. Click the 'Load Plugin' button and choose the location of your automation plugin zip file as shown below and click Submit.
DevOps Deploy Argo CD Automation Plugin
The NEW DevOps Deploy Argo CD automation plugin will need to be loaded into the DevOps Deploy server.
First, download the ArgoCD plugin from https://urbancode.github.io/IBM-UCx-PLUGIN-DOCS/UCD/#argocd
Second, in your IBM DevOps Deploy web console, click on Settings at the top of the page and then click on Automation Plugins. Click the 'Load Plugin' button and choose the plugin zip file and click Submit as shown below:
If you click on the Argo CD plugin link, you will see all the steps that are available as of version 3.1166635 of the plugin:
Next Steps
In Part 2 of this blog series, we will review all the steps needed to configure IBM DevOps Deploy to work with Argo CD. This will allow you to have a single solution to drive all of your deployments with the ability to wire in automated testing and rollback. You will also have the history, trail of audit, and proper governance you are used to in IBM DevOps Deploy. In the end, the integration helps to add value and improve the overall solution for the customer.