Skip to content

Commit 35fb1ac

Browse files
authored
RELEASE: PR for v0.4.0 (#1585)
* Updated latest image of devtron in the installer * Updated latest image of ci-runner in the installer * Updated latest image of dashboard in the installer * Updated latest image of lens in the installer * Updated latest image of imge-scanner in the installer * Updated latest image of git-sensor in the installer * Updated latest image of kubewatch in the installer * Update installation-script * Create devtron-bom.yaml * Create devtron-upgrade-0.3.x-0.4.x.md * Update SUMMARY.md * Update install-devtron-helm-3.md
1 parent 97938de commit 35fb1ac

File tree

13 files changed

+159
-42
lines changed

13 files changed

+159
-42
lines changed

docs/SUMMARY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
* [Setup](setup/install/setup.md)
88
* [Installing Devtron](setup/install/README.md)
99
* [Install using Helm3](setup/install/install-devtron-helm-3.md)
10-
* [Install using Helm2](setup/install/install-devtron-helm-2.md)
11-
* [Install using Kubectl](setup/install/install-devtron-using-kubectl.md)
1210
* [Installation Configurations](setup/install/installation-configuration.md)
1311
* [Override Configurations](setup/install/override-default-devtron-installation-configs.md)
1412
* [Ingress setup for devtron installation](setup/install/ingress-setup.md)
@@ -27,6 +25,7 @@
2725
* [Devtron Upgrade](setup/upgrade/README.md)
2826
* [0.2.x-0.3.x](setup/upgrade/devtron-upgrade-0.2.x-0.3.x.md)
2927
* [0.3.x-0.3.x](setup/upgrade/devtron-upgrade-0.3.x-0.3.x.md)
28+
* [0.3.x-0.4.x](setup/upgrade/devtron-upgrade-0.3.x-0.4.x.md)
3029
* [User Guide](user-guide/creating-application/userguide.md)
3130
* [Creating Application](user-guide/creating-application/README.md)
3231
* [Git Repository](user-guide/creating-application/git-material.md)

docs/setup/install/install-devtron-helm-3.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ This installation will use Minio for storing build logs and cache.
88

99
```bash
1010
helm repo add devtron https://helm.devtron.ai
11-
helm install devtron devtron/devtron-operator --create-namespace --namespace devtroncd
11+
12+
helm install devtron devtron/devtron-operator --create-namespace --namespace devtroncd \
13+
-f https://raw.githubusercontent.com/devtron-labs/devtron/main/manifests/devtron-bom.yaml \
14+
--set installer.modules={cicd}
1215
```
1316
{% endtab %}
1417

@@ -18,6 +21,8 @@ This installation will use AWS s3 buckets for storing build logs and cache
1821
```bash
1922
helm repo add devtron https://helm.devtron.ai
2023
helm install devtron devtron/devtron-operator --create-namespace --namespace devtroncd \
24+
-f https://raw.githubusercontent.com/devtron-labs/devtron/main/manifests/devtron-bom.yaml \
25+
--set installer.modules={cicd} \
2126
--set configs.BLOB_STORAGE_PROVIDER=S3 \
2227
--set configs.DEFAULT_CACHE_BUCKET=demo-s3-bucket \
2328
--set configs.DEFAULT_CACHE_BUCKET_REGION=us-east-1 \
@@ -32,6 +37,8 @@ This installation will use Azure Blob Storage for storing build logs and cache
3237
```bash
3338
helm repo add devtron https://helm.devtron.ai
3439
helm install devtron devtron/devtron-operator --create-namespace --namespace devtroncd \
40+
-f https://raw.githubusercontent.com/devtron-labs/devtron/main/manifests/devtron-bom.yaml \
41+
--set installer.modules={cicd} \
3542
--set secrets.AZURE_ACCOUNT_KEY=xxxxxxxxxx \
3643
--set configs.BLOB_STORAGE_PROVIDER=AZURE \
3744
--set configs.AZURE_ACCOUNT_NAME=test-account \
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Upgrading Devtron 0.3.x to 0.4.x
2+
3+
If you want to check the current version of Devtron you are using, please use the following command.
4+
5+
```
6+
kubectl -n devtroncd get installers installer-devtron -o jsonpath='{.status.sync.data}' | grep "^LTAG=" | cut -d"=" -f2-
7+
```
8+
9+
## Follow the below mentioned steps to upgrade the Devtron version using Helm
10+
11+
### 1. Check the devtron release name
12+
```bash
13+
helm list --namespace devtroncd
14+
```
15+
16+
### 2. Set release name in the variable
17+
```bash
18+
RELEASE_NAME=devtron
19+
```
20+
21+
### 3. Annotate all the Devtron resources
22+
23+
```bash
24+
kubectl -n devtroncd label secret --all "app.kubernetes.io/managed-by=Helm"
25+
kubectl -n devtroncd annotate secret --all "meta.helm.sh/release-name=$RELEASE_NAME" "meta.helm.sh/release-namespace=devtroncd"
26+
kubectl -n devtroncd label cm --all "app.kubernetes.io/managed-by=Helm"
27+
kubectl -n devtroncd annotate cm --all "meta.helm.sh/release-name=$RELEASE_NAME" "meta.helm.sh/release-namespace=devtroncd"
28+
```
29+
30+
### 4. Fetch the latest Devtron helm chart
31+
32+
```bash
33+
helm repo update
34+
```
35+
36+
### 5. Upgrade Devtron
37+
38+
5.1 Upgrade Devtron to latest version
39+
40+
```bash
41+
helm upgrade devtron devtron/devtron-operator --namespace devtroncd \
42+
-f https://raw.githubusercontent.com/devtron-labs/devtron/main/manifests/devtron-bom.yaml \
43+
--set installer.modules={cicd} --reuse-values
44+
```
45+
OR
46+
47+
5.2 Upgrade Devtron to a custom version. You can find the latest releases from Devtron on Github https://github.com/devtron-labs/devtron/releases
48+
49+
```bash
50+
DEVTRON_TARGET_VERSION=v0.4.x
51+
52+
helm upgrade devtron devtron/devtron-operator --namespace devtroncd \
53+
-f https://raw.githubusercontent.com/devtron-labs/devtron/$DEVTRON_TARGET_VERSION/manifests/devtron-bom.yaml \
54+
--set installer.modules={cicd} --reuse-values
55+
```

manifests/devtron-bom.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
installer:
2+
release: "v0.4.0"
3+
image: "quay.io/devtron/inception"
4+
tag: "acb623ff-185-7117"
5+
6+
components:
7+
dashboard:
8+
image: "quay.io/devtron/dashboard:384cdd21-325-8278"
9+
devtron:
10+
image: "quay.io/devtron/hyperion:a5f55594-280-8271"
11+
argocdDexServer:
12+
image: "quay.io/dexidp/dex:v2.25.0"
13+
kubelink:
14+
image: "quay.io/devtron/kubelink:1be465ec-318-7966"
15+
postgres:
16+
image: "quay.io/devtron/postgres:11.3.0-debian-9-r28"
17+
18+
migrator:
19+
image: "quay.io/devtron/migrator:6687f572-133-2208"
20+
envVars:
21+
devtron:
22+
GIT_BRANCH: "main"
23+
GIT_HASH: "a5f55594f7e1c41fc77e5915b9e6f6df537da4da"
24+
casbin:
25+
GIT_BRANCH: "main"
26+
GIT_HASH: "a5f55594f7e1c41fc77e5915b9e6f6df537da4da"

manifests/install/devtron-installer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ metadata:
44
name: installer-devtron
55
namespace: devtroncd
66
spec:
7-
url: https://raw.githubusercontent.com/devtron-labs/devtron/v0.3.27/manifests/installation-script
7+
url: https://raw.githubusercontent.com/devtron-labs/devtron/v0.4.0/manifests/installation-script

manifests/installation-script

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LTAG="v0.3.27";
1+
LTAG="v0.4.0";
22
REPO_RAW_URL="https://raw.githubusercontent.com/devtron-labs/devtron/";
33

44
operatorSecret = kubectl get secret -n devtroncd devtron-operator-secret;
@@ -10,6 +10,7 @@ grafanaPassword = jsonSelect(operatorSecret, "data.GRAFANA_PASSWORD");
1010
azureAccountKey = jsonSelect(operatorSecret, "data.AZURE_ACCOUNT_KEY");
1111
postgresSecret = kubectl get secret -n devtroncd postgresql-postgresql;
1212
enableLegacyApi = jsonSelect(operatorConfigMap, "data.ENABLE_LEGACY_API");
13+
helmInstallation = jsonSelect(operatorConfigMap, "data.INSTALLATION_THROUGH_HELM");
1314

1415
baseURLScheme = jsonSelect(operatorConfigMap, "data.BASE_URL_SCHEME");
1516
baseURL = jsonSelect(operatorConfigMap, "data.BASE_URL");
@@ -455,9 +456,26 @@ log("executed migrator setup command");
455456
## log("executed nats operator setup");
456457
ignore = shellScript sleep50;
457458
natsServer = kubectl apply -n devtroncd natsServer -u natsServerOverride;
459+
hasNatsServerPod = kubectl get pod -n devtroncd devtron-nats-0;
460+
if hasNatsServerPod {
461+
natsPodDelete = kubectl delete -n devtroncd po "devtron-nats-0";
462+
}
463+
log(hasNatsServerPod);
458464
log("executed nats server setup");
459465
## natsStreaming = kubectl apply -n devtroncd natsStreaming -u natsStreamingOverride;
460466
##log("executed nats streaming setup");
467+
hasNatsStreaming = kubectl get statefulset -n devtroncd devtron-stan;
468+
if hasNatsStreaming {
469+
natsStreamingDelete = kubectl delete -n devtroncd sts devtron-stan;
470+
natsStreamingConfigDelete = kubectl delete -n devtroncd cm devtron-stan-config;
471+
natsStreamingServiceDelete = kubectl delete -n devtroncd svc devtron-stan;
472+
natsStreamingPVC = kubectl get pvc -n devtroncd devtron-stan-pvc-devtron-stan-0;
473+
natsStreamingPV = jsonSelect(natsStreamingPVC, "spec.volumeName");
474+
natsStreamingPVCDelete = kubectl delete -n devtroncd pvc devtron-stan-pvc-devtron-stan-0;
475+
natsStreamingPVDelete = kubectl delete -n devtroncd pv natsStreamingPV;
476+
log("devtron-stan was found and all it's resources deleted deleted");
477+
}
478+
log(hasNatsStreaming);
461479

462480
#guard
463481
makeCertsDir = `#!/bin/bash
@@ -577,48 +595,60 @@ externaSecretRegion = `env:
577595

578596
kubeYamlEdit(devtron, `data.dt-k8s-external-secrets\.yaml`, externaSecretRegion, `/ConfigMap//devtron-cluster-components`);
579597

580-
if !setupDevtronIngress {
581-
kubeYamlEdit(devtron, "spec.type", "LoadBalancer", `/Service//devtron-service`);
598+
if helmInstallation {
599+
kubeYamlDelete(devtron, filter=`/Service//devtron-service`);
600+
}
601+
602+
if !helmInstallation {
603+
if !setupDevtronIngress {
604+
kubeYamlEdit(devtron, "spec.type", "LoadBalancer", `/Service//devtron-service`);
605+
}
582606
}
583607

584608
devtron = kubectl apply -n devtroncd devtron -u devtronOverride;
585609
log("executed devtron setup");
586610

587-
if devtronIngressAnnotations {
588-
log("editing ingress");
589-
kubeYamlEdit(devtronIngress, "metadata.annotations", devtronIngressAnnotations, `extensions/Ingress//devtron-ingress`, "asObject");
590-
}
611+
if !helmInstallation {
612+
if devtronIngressAnnotations {
613+
log("editing ingress");
614+
kubeYamlEdit(devtronIngress, "metadata.annotations", devtronIngressAnnotations, `extensions/Ingress//devtron-ingress`, "asObject");
615+
}
591616

592-
if setupDevtronIngress {
593-
log("fetch ingress");
594-
existingIngress = kubectl get -n devtroncd ing devtron-ingress;
595-
}
617+
if setupDevtronIngress {
618+
log("fetch ingress");
619+
existingIngress = kubectl get -n devtroncd ing devtron-ingress;
620+
}
596621

597-
if existingIngress {
598-
annotations = jsonSelect(existingIngress, "metadata.annotations");
599-
}
622+
if existingIngress {
623+
annotations = jsonSelect(existingIngress, "metadata.annotations");
624+
}
600625

601-
if annotations {
602-
kubeYamlEdit(devtronIngress, "metadata.annotations", annotations, `extensions/Ingress//devtron-ingress`, "asObject");
603-
}
626+
if annotations {
627+
kubeYamlEdit(devtronIngress, "metadata.annotations", annotations, `extensions/Ingress//devtron-ingress`, "asObject");
628+
}
604629

605-
if setupDevtronIngress {
606-
log("setup ingress");
607-
log(devtronIngress);
608-
devtronIngress = kubectl apply -n devtroncd devtronIngress -u devtronIngressOverride;
609-
}
630+
if setupDevtronIngress {
631+
log("setup ingress");
632+
log(devtronIngress);
633+
devtronIngress = kubectl apply -n devtroncd devtronIngress -u devtronIngressOverride;
634+
}
610635

611-
log("executed devtron ingress setup");
636+
log("executed devtron ingress setup");
637+
}
612638
guard = kubectl apply -n devtroncd guard -u guardOverride;
613639
log("executed guard setup");
614-
dashboard = kubectl apply -n devtroncd dashboard -u dashboardOverride;
615-
log("executed dashboard setup");
640+
if !helmInstallation {
641+
dashboard = kubectl apply -n devtroncd dashboard -u dashboardOverride;
642+
log("executed dashboard setup");
643+
}
616644
gitSensor = kubectl apply -n devtroncd gitSensor -u gitSensorOverride;
617645
log("executed git sensor setup");
618646
imageScanner = kubectl apply -n devtroncd imageScanner -u imageScannerOverride;
619647
log("executed image scanner setup");
620-
kubelink = kubectl apply -n devtroncd kubelink -u kubelinkOverride;
621-
log("executed kubelink setup");
648+
if !helmInstallation {
649+
kubelink = kubectl apply -n devtroncd kubelink -u kubelinkOverride;
650+
log("executed kubelink setup");
651+
}
622652
kubewatch = kubectl apply -n devtroncd kubewatch -u kubewatchOverride;
623653
log("executed kubewatch setup");
624654
lens = kubectl apply -n devtroncd lens -u lensOverride;

manifests/yamls/dashboard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ spec:
231231
- name: envoy-config-volume
232232
mountPath: /etc/envoy-config/
233233
- name: dashboard
234-
image: "quay.io/devtron/dashboard:6399c34c-325-8094"
234+
image: "quay.io/devtron/dashboard:384cdd21-325-8278"
235235
imagePullPolicy: IfNotPresent
236236
ports:
237237
- name: app

manifests/yamls/devtron.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ data:
5454
CD_NODE_TAINTS_VALUE: "ci"
5555
CD_ARTIFACT_LOCATION_FORMAT: "%d/%d.zip"
5656
DEFAULT_CD_NAMESPACE: "devtron-cd"
57-
DEFAULT_CI_IMAGE: "quay.io/devtron/ci-runner:a92c1a6a-138-8006"
57+
DEFAULT_CI_IMAGE: "quay.io/devtron/ci-runner:095c7a6d-138-8277"
5858
DEFAULT_CD_TIMEOUT: "3600"
5959
WF_CONTROLLER_INSTANCE_ID: "devtron-runner"
6060
CI_LOGS_KEY_PREFIX: "ci-artifacts"
@@ -152,7 +152,7 @@ spec:
152152
serviceAccountName: devtron
153153
containers:
154154
- name: devtron
155-
image: "quay.io/devtron/devtron:d8b33fae-326-8095"
155+
image: "quay.io/devtron/devtron:97938de4-326-8276"
156156
imagePullPolicy: IfNotPresent
157157
ports:
158158
- name: devtron

manifests/yamls/gitsensor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
terminationGracePeriodSeconds: 10
5555
containers:
5656
- name: git-sensor
57-
image: "quay.io/devtron/git-sensor:19e82bba-304-7772"
57+
image: "quay.io/devtron/git-sensor:b80aa764-200-8281"
5858
ports:
5959
- containerPort: 8080
6060
name: sensor

manifests/yamls/image-scanner.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
restartPolicy: Always
7070
containers:
7171
- name: image-scanner
72-
image: "quay.io/devtron/imge-scanner:5901cb7f-141-8007"
72+
image: "quay.io/devtron/imge-scanner:e6c60465-334-8280"
7373
imagePullPolicy: IfNotPresent
7474
ports:
7575
- name: app

0 commit comments

Comments
 (0)