This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 1dbb4c3c8 [INLONG-5104][Docker] Update Flink address environment for
Sort Flink plugin (#5105)
1dbb4c3c8 is described below
commit 1dbb4c3c82eb6c1ec1ad8c04bdf3b5964b37fb51
Author: Charles Zhang <[email protected]>
AuthorDate: Mon Jul 18 22:01:57 2022 +0800
[INLONG-5104][Docker] Update Flink address environment for Sort Flink
plugin (#5105)
---
docker/docker-compose/docker-compose.yml | 1 +
docker/kubernetes/templates/manager-statefulset.yaml | 2 ++
docker/kubernetes/values.yaml | 1 +
inlong-manager/manager-docker/Dockerfile | 6 ++++++
inlong-manager/manager-docker/manager-docker.sh | 6 ++++--
5 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/docker/docker-compose/docker-compose.yml
b/docker/docker-compose/docker-compose.yml
index 6c40e36b3..6124afcbb 100644
--- a/docker/docker-compose/docker-compose.yml
+++ b/docker/docker-compose/docker-compose.yml
@@ -57,6 +57,7 @@ services:
- ZK_URL=tubemq-server:2181
- FLINK_HOST=localhost
- FLINK_PORT=8081
+ - AUDIT_PROXY_URL=audit:10081
webisite:
image: inlong/dashboard
diff --git a/docker/kubernetes/templates/manager-statefulset.yaml
b/docker/kubernetes/templates/manager-statefulset.yaml
index 0369297a6..7d674de26 100644
--- a/docker/kubernetes/templates/manager-statefulset.yaml
+++ b/docker/kubernetes/templates/manager-statefulset.yaml
@@ -99,6 +99,8 @@ spec:
value: {{ .Values.external.flink.hostname | quote }}
- name: FLINK_PORT
value: {{ .Values.external.flink.port | quote }}
+ - name: AUDIT_PROXY_URL
+ value: "{{ template "inlong.audit.hostname" . }}:{{
.Values.audit.port }}"
{{- range $key, $value := .Values.manager.env }}
- name: {{ $key }}
value: {{ $value | quote }}
diff --git a/docker/kubernetes/values.yaml b/docker/kubernetes/values.yaml
index 1f77eab2a..610ed446b 100644
--- a/docker/kubernetes/values.yaml
+++ b/docker/kubernetes/values.yaml
@@ -324,6 +324,7 @@ manager:
-XX:-UseAdaptiveSizePolicy
ACTIVE_PROFILE: "prod"
PLUGINS_URL: "default"
+ FLINK_PARALLELISM: 1
audit:
component: "audit"
diff --git a/inlong-manager/manager-docker/Dockerfile
b/inlong-manager/manager-docker/Dockerfile
index 99403b694..9ce14af57 100644
--- a/inlong-manager/manager-docker/Dockerfile
+++ b/inlong-manager/manager-docker/Dockerfile
@@ -29,6 +29,12 @@ ENV PASSWORD=inlong
ENV ZK_URL=127.0.0.1:2181
# support download plugins from remote address.
ENV PLUGINS_URL=default
+# for flink-sort-plugin.properties
+ENV FLINK_HOST=127.0.0.1
+ENV FLINK_PORT=8081
+ENV FLINK_PARALLELISM=1
+ENV AUDIT_PROXY_URL=127.0.0.1:10081
+# JVM env
ENV MANAGER_JVM_HEAP_OPTS="-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0 -XX:MaxRAMPercentage=80.0
-XX:-UseAdaptiveSizePolicy"
WORKDIR /opt/inlong-manager
diff --git a/inlong-manager/manager-docker/manager-docker.sh
b/inlong-manager/manager-docker/manager-docker.sh
index a61a61405..91289b79d 100644
--- a/inlong-manager/manager-docker/manager-docker.sh
+++ b/inlong-manager/manager-docker/manager-docker.sh
@@ -28,14 +28,16 @@ fi
conf_file="${file_path}"/conf/application-"${ACTIVE_PROFILE}".properties
flink_conf_file="${file_path}"/plugins/flink-sort-plugin.properties
-# replace the configuration
+# application-prod/dev.properties
sed -i
"s/spring.profiles.active=.*$/spring.profiles.active=${ACTIVE_PROFILE}/g"
"${file_path}"/conf/application.properties
sed -i "s/127.0.0.1:3306/${JDBC_URL}/g" "${conf_file}"
sed -i
"s/datasource.druid.username=.*$/datasource.druid.username=${USERNAME}/g"
"${conf_file}"
sed -i
"s/datasource.druid.password=.*$/datasource.druid.password=${PASSWORD}/g"
"${conf_file}"
-
+# flink-sort-plugin.properties
sed -i "s/flink.rest.address=.*$/flink.rest.address=${FLINK_HOST}/g"
"${flink_conf_file}"
sed -i "s/flink.rest.port=.*$/flink.rest.port=${FLINK_PORT}/g"
"${flink_conf_file}"
+sed -i "s/flink.parallelism=.*$/flink.parallelism=${FLINK_PARALLELISM}/g"
"${flink_conf_file}"
+sed -i
"s/metrics.audit.proxy.hosts=.*$/metrics.audit.proxy.hosts=${AUDIT_PROXY_URL}/g"
"${flink_conf_file}"
# startup the application
JAVA_OPTS="-Dspring.profiles.active=${ACTIVE_PROFILE}"