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.
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
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
Once those are wired in, lastly in Cluster Resource Allow List, grant all. Click Edit to add.
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
Name: sampleapp
Project: shipaproject
Repository: https://github.com/ravilach/gitops-sample.git
Path: shipa/apps
Destination: https://kubernetes.default.svc
Then click Create. Now you are ready to Sync [e.g run] Argo CD.
Click Sync on the sampleapp Application then Synchronize and you on your way to deployment.
Clicking into the details can see the workflow execution.
Returning to the Shipa Dashboard, you will see your application deployed.
Clicking on the Endpoint will bring you to the application.
Combining forces with Argo CD and Shipa, there is certainly a lot of the art of the possible.
Cheers,
-Ravi