Skip to content

Commit

Permalink
Merge pull request #1239 from agarwal-ruchi1206/SPRINT-73-ODIM-7341
Browse files Browse the repository at this point in the history
Upgrading Kafka and zookeeper version to the latest
  • Loading branch information
ashraf-vazeer authored Jun 11, 2023
2 parents 21101df + bd2cb24 commit d413849
Show file tree
Hide file tree
Showing 20 changed files with 72 additions and 72 deletions.
8 changes: 4 additions & 4 deletions build/Kafka/Dockerfiles/Dockerfile.kafka
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# This is Dockerfile to build kafka image
FROM ubuntu:20.04 as kafka-build

LABEL version="2.0"
LABEL version="3.0"
LABEL ubuntuVersion="20.04"
LABEL kafkaVersion="3.1.0"
LABEL kafkaVersion="3.4.0"
LABEL description="Kafka docker image built on top of ubuntu:20.04"

WORKDIR /kafka/
Expand All @@ -35,8 +35,8 @@ RUN apt-get update -q=3 && apt-get -q install -q=3 -y \

RUN if [ -z "$ODIMRA_USER_ID" ] || [ -z "$ODIMRA_GROUP_ID" ]; then echo "\n[$(date)] -- ERROR -- ODIMRA_USER_ID or ODIMRA_GROUP_ID is not set\n"; exit 1; fi \
&& mkdir -p /opt/kafka/conf /opt/kafka/data /opt/kafka/scripts /kafka/tmp \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.1.0/kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.4.0/kafka_2.12-3.4.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.4.0.tgz \
&& wget -q $KAFKA_IMAGE_URL -P /kafka/ \
&& tar -xzf /kafka/${KAFKA_IMAGE_NAME} --strip-components 1 -C /kafka/tmp \
&& mv -f /kafka/tmp/* /opt/kafka/ \
Expand Down
12 changes: 6 additions & 6 deletions build/Kafka/Dockerfiles/Dockerfile.zookeeper
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# This is Dockerfile to build zookeeper image
FROM ubuntu:18.04 as zookeeper-build

LABEL version="2.0"
LABEL version="3.0"
LABEL ubuntuVersion="20.04"
LABEL kafkaVersion="3.1.0"
LABEL zookeeperVersion="3.7.0"
LABEL description="Zookeeper docker image built on top of ubuntu:20.04 using kafka:3.1.0 bundle"
LABEL kafkaVersion="3.4.0"
LABEL zookeeperVersion="3.8.1"
LABEL description="Zookeeper docker image built on top of ubuntu:20.04 using kafka:3.4.0 bundle"

WORKDIR /zookeeper/

Expand All @@ -37,8 +37,8 @@ RUN apt-get update -q=3 && apt-get -q install -q=3 -y \

RUN if [ -z "$ODIMRA_USER_ID" ] || [ -z "$ODIMRA_GROUP_ID" ]; then echo "\n[$(date)] -- ERROR -- ODIMRA_USER_ID or ODIMRA_GROUP_ID is not set\n"; exit 1; fi \
&& mkdir -p /opt/zookeeper/data /opt/zookeeper/conf /opt/zookeeper/scripts /zookeeper/tmp \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.1.0/kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.4.0/kafka_2.12-3.4.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.4.0.tgz \
&& wget -q $KAFKA_IMAGE_URL -P /zookeeper/ \
&& tar -xzf /zookeeper/${KAFKA_IMAGE_NAME} --strip-components 1 -C /zookeeper/tmp \
&& mv -f /zookeeper/tmp/* /opt/zookeeper/ \
Expand Down
4 changes: 2 additions & 2 deletions build/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ services:
http_proxy: $http_proxy
https_proxy: $https_proxy
container_name: odim_zookeeper
image: odim_zookeeper:2.0
image: odim_zookeeper:3.0
hostname: zookeeper
restart: on-failure
ports:
Expand Down Expand Up @@ -122,7 +122,7 @@ services:
http_proxy: $http_proxy
https_proxy: $https_proxy
container_name: odim_kafka
image: odim_kafka:2.0
image: odim_kafka:3.0
hostname: kafka
ports:
- '9092:9092'
Expand Down
4 changes: 2 additions & 2 deletions build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.od
# third party docker images
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.etcd -t etcd:1.16 ." "etcd"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.redis -t redis:4.0 ." "redis"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.kafka -t kafka:2.0 ." "kafka"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.zookeeper -t zookeeper:2.0 ." "zookeeper"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.kafka -t kafka:3.0 ." "kafka"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.zookeeper -t zookeeper:3.0 ." "zookeeper"

# ODIMRA services image
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.accountSession -t account-session:4.0 ." "account session"
Expand Down
4 changes: 2 additions & 2 deletions docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ declare -A images_list=(\
["etcd"]="1.16" \
["events"]="5.0" \
["fabrics"]="4.0" \
["kafka"]="2.0" \
["kafka"]="3.0" \
["managers"]="5.0" \
["redis"]="4.0" \
["systems"]="5.0" \
["task"]="4.0" \
["telemetry"]="3.0"\
["update"]="4.0" \
["zookeeper"]="2.0" \
["zookeeper"]="3.0" \
["licenses"]="2.0" \
)

Expand Down
8 changes: 4 additions & 4 deletions install/Docker/dockerfiles/Dockerfile.kafka
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# This is Dockerfile to build kafka image
FROM ubuntu:20.04 as kafka-build

LABEL version="2.0"
LABEL version="3.0"
LABEL ubuntuVersion="20.04"
LABEL kafkaVersion="3.1.0"
LABEL kafkaVersion="3.4.0"
LABEL description="Kafka docker image built on top of ubuntu:20.04"

WORKDIR /kafka/
Expand All @@ -33,8 +33,8 @@ RUN apt-get update -q=3 && apt-get install -q=3 -y \

RUN if [ -z "$ODIMRA_USER_ID" ] || [ -z "$ODIMRA_GROUP_ID" ]; then echo "\n[$(date)] -- ERROR -- ODIMRA_USER_ID or ODIMRA_GROUP_ID is not set\n"; exit 1; fi \
&& mkdir -p /opt/kafka/conf /opt/kafka/data /opt/kafka/scripts /kafka/tmp \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.1.0/kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.4.0/kafka_2.12-3.4.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.4.0.tgz \
&& wget -q $KAFKA_IMAGE_URL -P /kafka/ \
&& tar -xzf /kafka/${KAFKA_IMAGE_NAME} --strip-components 1 -C /kafka/tmp \
&& mv -f /kafka/tmp/* /opt/kafka/ \
Expand Down
12 changes: 6 additions & 6 deletions install/Docker/dockerfiles/Dockerfile.zookeeper
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# This is Dockerfile to build zookeeper image
FROM ubuntu:20.04 as zookeeper-build

LABEL version="2.0"
LABEL version="3.0"
LABEL ubuntuVersion="20.04"
LABEL kafkaVersion="3.1.0"
LABEL zookeeperVersion="3.7.0"
LABEL description="Zookeeper docker image built on top of ubuntu:20.04 using kafka:3.1.0 bundle"
LABEL kafkaVersion="3.4.0"
LABEL zookeeperVersion="3.8.1"
LABEL description="Zookeeper docker image built on top of ubuntu:20.04 using kafka:3.4.0 bundle"

WORKDIR /zookeeper/

Expand All @@ -34,8 +34,8 @@ RUN apt-get update -q=3 && apt-get install -q=3 -y \

RUN if [ -z "$ODIMRA_USER_ID" ] || [ -z "$ODIMRA_GROUP_ID" ]; then echo "\n[$(date)] -- ERROR -- ODIMRA_USER_ID or ODIMRA_GROUP_ID is not set\n"; exit 1; fi \
&& mkdir -p /opt/zookeeper/data /opt/zookeeper/conf /opt/zookeeper/scripts /zookeeper/tmp \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.1.0/kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.1.0.tgz \
&& export KAFKA_IMAGE_URL=https://archive.apache.org/dist/kafka/3.4.0/kafka_2.12-3.4.0.tgz \
&& export KAFKA_IMAGE_NAME=kafka_2.12-3.4.0.tgz \
&& wget -q $KAFKA_IMAGE_URL -P /zookeeper/ \
&& tar -xzf /zookeeper/${KAFKA_IMAGE_NAME} --strip-components 1 -C /zookeeper/tmp \
&& mv -f /zookeeper/tmp/* /opt/zookeeper/ \
Expand Down
4 changes: 2 additions & 2 deletions odim-controller/helmcharts/kafka-ha/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: kafka-ha-3.1.0
name: kafka-ha-3.4.0
description: A Helm chart for kafka

# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion odim-controller/helmcharts/kafka-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ odimra:
namespace:
groupID:
kafkaDirPath:
kafkaImageTag: "2.0"
kafkaImageTag: "3.0"
kafkaNodePort:
4 changes: 2 additions & 2 deletions odim-controller/helmcharts/kafka-secret/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 2.0.0
appVersion: 3.0.0
6 changes: 3 additions & 3 deletions odim-controller/helmcharts/kafka/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: kafka-3.1.0
name: kafka-3.4.0
description: A Helm chart for kafka

# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.2.0
appVersion: 0.3.0
20 changes: 10 additions & 10 deletions odim-controller/helmcharts/kafka/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "kafka-3.1.0.name" -}}
{{- define "kafka-3.4.0.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kafka-3.1.0.fullname" -}}
{{- define "kafka-3.4.0.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kafka-3.1.0.chart" -}}
{{- define "kafka-3.4.0.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "kafka-3.1.0.labels" -}}
helm.sh/chart: {{ include "kafka-3.1.0.chart" . }}
{{ include "kafka-3.1.0.selectorLabels" . }}
{{- define "kafka-3.4.0.labels" -}}
helm.sh/chart: {{ include "kafka-3.4.0.chart" . }}
{{ include "kafka-3.4.0.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "kafka-3.1.0.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kafka-3.1.0.name" . }}
{{- define "kafka-3.4.0.selectorLabels" -}}
app.kubernetes.io/name: {{ include "kafka-3.4.0.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "kafka-3.1.0.serviceAccountName" -}}
{{- define "kafka-3.4.0.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "kafka-3.1.0.fullname" .) .Values.serviceAccount.name }}
{{- default (include "kafka-3.4.0.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion odim-controller/helmcharts/kafka/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
odimra:
namespace:
groupID:
kafkaImageTag: "2.0"
kafkaImageTag: "3.0"
kafkaNodePort:
4 changes: 2 additions & 2 deletions odim-controller/helmcharts/zookeeper-ha/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: zookeeper-ha-3.7.0
name: zookeeper-ha-3.8.1
description: A Helm chart for zookeeper

# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion odim-controller/helmcharts/zookeeper-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ odimra:
namespace:
groupID:
zookeeperDirPath:
zookeeperImageTag: "2.0"
zookeeperImageTag: "3.0"
4 changes: 2 additions & 2 deletions odim-controller/helmcharts/zookeeper-secret/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 2.0.0
appVersion: 3.0.0
6 changes: 3 additions & 3 deletions odim-controller/helmcharts/zookeeper/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: zookeeper-3.7.0
name: zookeeper-3.8.1
description: A Helm chart for zookeeper

# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.2.0
appVersion: 0.3.0
20 changes: 10 additions & 10 deletions odim-controller/helmcharts/zookeeper/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "zookeeper-3.7.0.name" -}}
{{- define "zookeeper-3.8.1.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "zookeeper-3.7.0.fullname" -}}
{{- define "zookeeper-3.8.1.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "zookeeper-3.7.0.chart" -}}
{{- define "zookeeper-3.8.1.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "zookeeper-3.7.0.labels" -}}
helm.sh/chart: {{ include "zookeeper-3.7.0.chart" . }}
{{ include "zookeeper-3.7.0.selectorLabels" . }}
{{- define "zookeeper-3.8.1.labels" -}}
helm.sh/chart: {{ include "zookeeper-3.8.1.chart" . }}
{{ include "zookeeper-3.8.1.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "zookeeper-3.7.0.selectorLabels" -}}
app.kubernetes.io/name: {{ include "zookeeper-3.7.0.name" . }}
{{- define "zookeeper-3.8.1.selectorLabels" -}}
app.kubernetes.io/name: {{ include "zookeeper-3.8.1.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "zookeeper-3.7.0.serviceAccountName" -}}
{{- define "zookeeper-3.8.1.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "zookeeper-3.7.0.fullname" .) .Values.serviceAccount.name }}
{{- default (include "zookeeper-3.8.1.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion odim-controller/helmcharts/zookeeper/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
odimra:
namespace:
groupID:
zookeeperImageTag: "2.0"
zookeeperImageTag: "3.0"
Loading

0 comments on commit d413849

Please sign in to comment.