Installing Devtron

Join Discord

Devtron Installation

Prerequisites

You will need to be ready with following prerequisites before Devtron installation

Installing Devtron

Installation status

Run following command

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

The install commands initiates Devtron-operator which spins up all the Devtron micro-services one by one in about 30 mins. You can use the above command to check the status of the installation if the installation is still in progress, it will print Downloaded. When the installation is complete, it prints Applied.

Access devtron dashboard

Login credentials

For login use username:admin and for password run command mentioned below.

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

Access grafana

Grafana URL

grafana is available at BASE_URL/grafana

Login credentials

To log into grafana use username: admin and for password run command mentioned below.

kubectl -n devtroncd get secret devtron-grafana-cred-secret -o jsonpath='{.data.admin-password}' | base64 -d

Configuration

Configure Secrets

For helm installation this section referes to secrets.env section of values.yaml. For kubectl based installation it refers to kind: secret in install/devtron-operator-configs.yaml.

Following properties should be configured

Parameter

Description

Default

POSTGRESQL_PASSWORD

password for postgres database, should be base64 encoded (required)

change-me

WEBHOOK_TOKEN

If you want to continue using jenkins for CI then please provide this for authentication of requests, should be base64 encoded

Configure ConfigMaps

For helm installation this section referes to configs section of values.yaml. For kubectl based installation it refers to kind: ConfigMap in install/devtron-operator-configs.yaml.

Following properties should be configured

Parameter

Description

Default

BASE_URL_SCHEME

either of http or https (required)

http

BASE_URL

url without scheme and trailing slash, this is the domain pointing to the cluster on which devtron platform is being installed. For example if you have directed domain devtron.example.com to the cluster and ingress controller is listening on port 32080 then url will be devtron.example.com:32080 (required)

change-me

DEX_CONFIG

dex config if you want to integrate login with SSO (optional) for more information check Argocd documentation

EXTERNAL_SECRET_AMAZON_REGION

AWS region for secret manager to pick (required)

PROMETHEUS_URL

url of prometheus where all cluster data is stored, if this is wrong, you will not be able to see application metrics like cpu, ram, http status code, latency and throughput (required)

Storage for Logs and Cache

AWS SPECIFIC

Parameter

Description

Default

DEFAULT_CD_LOGS_BUCKET_REGION

AWS region of bucket to store CD logs, this should be created before hand (required)

DEFAULT_CACHE_BUCKET

AWS bucket to store docker cache, this should be created before hand (required)

DEFAULT_CACHE_BUCKET_REGION

AWS region of cache bucket defined in previous step (required)

DEFAULT_BUILD_LOGS_BUCKET

AWS bucket to store build logs, this should be created before hand (required)

AZURE SPECIFIC

Parameter

Description

Default

AZURE_ACCOUNT_NAME

AZURE Blob storage account name

AZURE_BLOB_CONTAINER_CI_LOG

AZURE Blob storage container for storing ci-logs

AZURE_BLOB_CONTAINER_CI_CACHE

AZURE Blob storage container for storing ci cache

To convert string to base64 use

echo -n "string" | base64 -d

Please Note: 1) Ensure that the cluster has read and write access to the S3 buckets/Azure Blob storage container mentioned in DEFAULT_CACHE_BUCKET, DEFAULT_BUILD_LOGS_BUCKET or AZURE_BLOB_CONTAINER_CI_LOG, AZURE_BLOB_CONTAINER_CI_CACHE 2) Ensure that cluster has read access to AWS secrets backends (SSM & secrets manager)

Cleanup

Run following commands to delete all the components installed by devtron

cd devtron-installation-script/
kubectl delete -n devtroncd -f yamls/
kubectl delete -n devtroncd -f charts/devtron/templates/devtron-installer.yaml
kubectl delete -n devtroncd -f charts/devtron/templates/install.yaml
kubectl delete -n devtroncd -f charts/devtron/crds
kubectl delete ns devtroncd

Trouble shooting steps

1. How do I know when installation is complete?

Run following command

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

Once installation process is complete, above command will print Applied It may take around 30 mins for installation to complete

2. How do I track progress of installation?

Run following command to check 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. devtron installer logs have error and I want to restart installation.

Run following 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"}]'

In case you are still facing issues please feel free to reach out to us on discord