Argo Deployment set up for Azure
Creating a cluster in Azure
Download the Azure CLI Install the Azure CLI for Windows
Login to Azure account
az login
3. Create a Kubernetes Cluster
kubectl installation
4. Install ArgoCD CLI based on your system from https://argoproj.github.io/argo-cd/cli_installation/
5. Update the kubeconfig file through CLI and create external clusters inside ArgoCD
# Update the kubeconfig file for auth.
az aks get-credentials --name cluster-name --resource-group cluster-resource-group-name
# Login to argocd server through cli
# For Windows
"/argocd-windows-amd64.exe" login <argocd_server_url> --password <password> --username <username>
# For Linux
./argocd-linux-amd64 login <argocd_server_url> --password <password> --username <username>
# add external cluster through cli to argocd
argocd cluster add <cluster-name> --name <any-name>
Configuring git in Argo Tool
Login to Argo tool → Settings
Navigate to Repositories
Click “Connect repo using HTTPS” / SSH as per requirement
Enter the details:
Select the type as git
Enter Repo URL and credentials and connect
The added Repo details get reflected in Repositories
Configuring Project in Argo Tool
Navigate to Repositories → Projects
Click New Project
Enter the required details and save
The saved project is reflected
Configuring Kubernetes cluster in Argo Tool
The cluster added to Argo via CLI is reflected in “Clusters” tab of Argo tool.
Prerequisites For Nexus
In order to pull an artifact/image from Nexus by Argo and deploy it, a secret key needs to be generated.
Generate a secret token from Kubernetes for Nexus
2. Copy the generated secret token
3. Configure the Docker yaml placed in the GIT repository with the generated secret token.
Similar to line numbers 6-17 below:
Registering Argo Tool
Login to https://portal.opsera.io -> Tool Registry -> Click “+New Tool” Button
Enter a name and select “Argo” as Tool Identifier
Click “Create” button for the tool to be registered
Enter connection details - URL, ID and password and save
“Test Connection” to be successful to ensue the credentials are valid
Navigate to Application tab and Click “Create Argo Application”
Enter the details and save
Pipeline setup and configuration:
Sample pipeline flow:
Jenkins Docker Build → Nexus Push → Argo Deploy
Jenkins - Docker Build
Sample Configuration screenshot of Docker build step:
2. Nexus Push configuration sample screenshot
3. Argo Tool - Argo deploy step configuration
Rollback Enabled - When this step is enabled , rollback will happen automatically by deploying the artifact which is pointed to the artifacts.
4. Save the steps and Run the Pipeline
5. Pipeline successful run
Argo Tool Validation
Login to Argo Tool and verify the application reflected and synced