Install Devtron with CI/CD integration

Are you installing Devtron on Minikube, Microk8s, K3s, Kind? See Instructions here

Before you begin

Install Helm.

Installing Devtron using Helm

  1. Add Devtron repository

  2. Install Devtron

This installation will use Minio for storing build logs and cache.

helm repo add devtron https://helm.devtron.ai

helm install devtron devtron/devtron-operator \
--create-namespace --namespace devtroncd \
--set installer.modules={cicd}

Append the command with --set installer.release="vX.X.X" to install a particular version of Devtron. Where vx.x.x is the release tag.

For those countries/users where Github is blocked, you can use Gitee as the installation source:

helm repo add devtron https://helm.devtron.ai

helm install devtron devtron/devtron-operator --create-namespace --namespace devtroncd \
--set installer.source=gitee

If you are planning to use Devtron for production deployments, please refer to our recommended overrides for Devtron Installation.

Check Devtron installation status

The install commands start Devtron-operator, which takes about 20 minutes to spin up all of the Devtron microservices one by one. You can use the following command to check the status of the installation:

kubectl -n devtroncd get installers installer-devtron -o jsonpath='{.status.sync.status}'

The command executes with one of the following output messages, indicating the status of the installation:

Check the installer logs

To check the installer logs, run the following command:

kubectl logs -f -l app=inception -n devtroncd

Devtron dashboard

Use the following command to get the dashboard URL:

kubectl get svc -n devtroncd devtron-service \
-o jsonpath='{.status.loadBalancer.ingress}'

You will get an output similar to the one shown below:

[test2@server ~]$ kubectl get svc -n devtroncd devtron-service \
-o jsonpath='{.status.loadBalancer.ingress}'
[map[hostname:aaff16e9760594a92afa0140dbfd99f7-305259315.us-east-1.elb.amazonaws.com]]

The hostname aaff16e9760594a92afa0140dbfd99f7-305259315.us-east-1.elb.amazonaws.com as mentioned above is the Loadbalancer URL where you can access the Devtron dashboard.

If you don't see any results or receive a message that says "service doesn't exist," it means Devtron is still installing; please check back in 5 minutes.

Note: You can also do a CNAME entry corresponding to your domain/subdomain to point to this Loadbalancer URL to access it at a custom domain.

Devtron Admin credentials

For admin login, use the username:admin, and run the following command to get the admin password:

kubectl -n devtroncd get secret devtron-secret -o jsonpath='{.data.ACD_PASSWORD}' | base64 -d

Cleaning Devtron Helm installer

Please make sure that you do not have anything inside namespaces devtroncd, devtron-cd, devtron-ci, and devtron-demo as the below steps will clean everything inside these namespaces:

helm uninstall devtron --namespace devtroncd

kubectl delete -n devtroncd -f https://raw.githubusercontent.com/devtron-labs/charts/main/charts/devtron/crds/crd-devtron.yaml

kubectl delete -n argo -f https://raw.githubusercontent.com/devtron-labs/devtron/main/manifests/yamls/workflow.yaml

kubectl delete ns devtroncd devtron-cd devtron-ci devtron-demo

What's next

Configurations

FAQs

1. How will I know when the installation is finished?

Run the following command to check the status of the installation:

kubectl -n devtroncd get installers installer-devtron -o jsonpath='{.status.sync.status}'

The above command will print Applied once the installation process is complete. The installation process could take up to 30 minutes.

2. How do I track the progress of the installation?

Run the following command to check the logs of the Pod:

pod=$(kubectl -n devtroncd get po -l app=inception -o jsonpath='{.items[0].metadata.name}')&& kubectl -n devtroncd logs -f $pod
3. How can I restart the installation if the Devtron installer logs contain an error?

First run the below command to clean up components installed by Devtron installer:

cd devtron-installation-script/
kubectl delete -n devtroncd -f yamls/
kubectl -n devtroncd patch installer installer-devtron --type json -p '[{"op": "remove", "path": "/status"}]'

Next, install Devtron

Still facing issues, please reach out to us on Discord.

Last updated