This project provides instructions to setup the DRAG Stack, which includees: Drone, Argo CD, Gitea, Docker Registry via Nexxus, and k3d as your local k3s based Kubernetes Cluster.
It also shows you how to use the Argo CD declarative setup to setup Drone CI with Drone Kubernetes runner.
The stack also deploys Argo CD Image Updater to enable updating the application images via GitOps.
For workshop schedules and related details, visit DRAG Stack workshop
All linux distributions adds envsubst via gettext package. On macOS it can be installed using Homebrew like brew install gettext
.
git clone https://github.com/harness-apps/drag-stack && \
cd "$(basename "$_" .git)" && direnv allow .
As instructed lets reset the environment,
direnv allow .
$DAG_HOME/hack/cluster.sh
$DAG_HOME/hack/install-gitea
You can now access Gitea in your browser using the url http://gitea-127.0.0.1.sslip.io:30950. Default credentials demo/demo@123
.
$DAG_HOME/hack/install-argocd
You can now access Argo CD in your browser using the url http://argocd-127.0.0.1.sslip.io:30080. Default credentials admin/demo@123
.
The cluster bootstrapping that we did in earlier step installs the core DRAG stack applications (App of Apps) and DRAG stack has the following child applications,
- Argo CD Image Updater
- Drone Server
- Droner Runners
- Nexus3 Maven Repository Manager
A successful ArgoCD Deployment of Drone should look as shown below,
You can now access Drone CI in your browser using the url http://drone-127.0.0.1.sslip.io:30080.
Verify the /etc/hosts
entries in the gitea pods,
kubectl exec -it gitea-0 -n default cat /etc/hosts
It should have entry like
# Entries added by HostAliases.
$DRONE_SERVICE_IP drone-127.0.0.1.sslip.io
What we have done until now,
- Setup Gitea
- Setup Argo CD
- Setup
dag-apps
Argo CD that in turn setup- Drone Server
- Drone Kube Runner
- Drone Docker Runner
Copy the account settings named Example CLI Usage
from the Drone Account Settings page, verify if its all good,
drone info
Congratulations!!! You are now a GitOpsian. Add other projects of yours and keep rocking with Drone CI and Argo CD.
Few applications that you can try with this stack,
- https://github.com/haness-apps/quarkus-springboot-demo-gitops
- https://github.com/harness-apps/MERN-Stack-Example
Captured some learnings in gotchas for pointers and helpful commands.
k3d -c hack/k3s-cluster-config.yaml