Development

Argo CD 101 and Setup for Shipa

There is a lot of the art of the possible between the GitOps Engine, Argo CD, and the Application-as-Code platform, Shipa. In a recent blog post, we outlined the power of a one-line developer experience. Though if you are unfamiliar with ArgoCD, here is a guide to get you started with Argo CD and leveraging Shipa for your first deployment. 

Installing Argo CD

Installing Argo CD is straightforward. You can follow the project’s documentation to get up and started. You will need to have handy a Kubernetes cluster and Homebrew to install the CLI. 

#Installing ArgoCD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Once installed, you can expose the UI and wire the CLI and login. 

#Install the CLI
brew install argocd
#Expose ArgoCD with a Service
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
#Grab Install PW
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
#Grab ArgoCD Address
kubectl get services -n argocd

The Argo CD address is the External-IP of the ArgoCD LoadBalancer. 

#Login
argocd login <load-balancer-address>
default user: admin

Once logged in, you can update the admin password. 

argocd account update-password

Finally, head to the browser with the LoadBalancer URL and you are ready to start your Argo Journey. 

Fresh Argo CD Install

Preparing Argo CD for Shipa

If this is your first time using Argo CD, you will need to create an Argo Project, Application, and link Argo CD up to a Git-based repository. 

Create a New Project

Argo CD -> Settings -> Projects + New Project

Name: shipaproject

Argo CD New Project

Click Create, then you will need to add a Source Repository and Destination. If using the example from the One Line Developer Experience can leverage this repository. To execute this example will need to setup Crossplane as described in the blog or the Shipa Crossplane documentation and Terraform as described in the blog. 

Wire The Project

Wire in the Repository and Destination. Click Edit to add. 

Repository: https://github.com/ravilach/gitops-sample.git

Destination: https://kubernetes.default.svc

Argo CD Project Wiring

Once those are wired in, lastly in Cluster Resource Allow List, grant all. Click Edit to add. 

Argo CD Resource Allow List

With the Project wirings out of the way, now you are ready to add an ArgoCD Application.

Running an Argo CD Application

You are now ready to create an Argo CD Application e.g a grouping of manifests to execute. 

Argo CD -> Applications + Create Application 

New Argo CD Application

Name: sampleapp

Project: shipaproject

Repository: https://github.com/ravilach/gitops-sample.git

Path: shipa/apps

Destination: https://kubernetes.default.svc

Argo CD Sample App
Argo CD Destination

Then click Create. Now you are ready to Sync [e.g run] Argo CD. 

Argo CD Sync

Click Sync on the sampleapp Application then Synchronize and you on your way to deployment. 

Argo CD Run Sync

Clicking into the details can see the workflow execution. 

Argo CD Execution

Returning to the Shipa Dashboard, you will see your application deployed. 

Shipa Deploy App

Clicking on the Endpoint will bring you to the application.

Deployed Shipa App

Combining forces with Argo CD and Shipa, there is certainly a lot of the art of the possible. 

Cheers,

-Ravi