Skip to content

Kick Start your Cloud Native CI and GitOps with Drone, Argo CD and Gitea Stack

License

Notifications You must be signed in to change notification settings

harness-community/drag-stack

Repository files navigation

The DRAG Stack

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.

Workshop

For workshop schedules and related details, visit DRAG Stack workshop

Required tools

All linux distributions adds envsubst via gettext package. On macOS it can be installed using Homebrew like brew install gettext.

Optional

Clone the Sources

git clone https://github.com/harness-apps/drag-stack && \
  cd "$(basename "$_" .git)" && direnv allow .

As instructed lets reset the environment,

direnv allow .

Create Kubernetes Cluster

$DAG_HOME/hack/cluster.sh

Deploy Gitea

$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.

Deploy ArgoCD

$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.

Cluster Bootstrapping

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,

ArgoCD Apps

You can now access Drone CI in your browser using the url http://drone-127.0.0.1.sslip.io:30080.

Verify Gitea Patch

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

Validate Drone Setup

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

Add Drone Admin User

Copy the account settings named Example CLI Usage from the Drone Account Settings page, verify if its all good,

drone info

Do some GitOps

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,

Gotchas

Captured some learnings in gotchas for pointers and helpful commands.

Clean up

k3d -c hack/k3s-cluster-config.yaml

About

Kick Start your Cloud Native CI and GitOps with Drone, Argo CD and Gitea Stack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published