Browse Source

Modify docker-compose and kubernetes config

1. Move kubernetes to docker directory
2. Change docker-compose directory's name, and move docker-compose to docker directory
3. Modify docker-compose config and kubernetes config
4. Modify startup.sh in dockerfile
pull/3/MERGE
liwenhe1993 5 years ago committed by gaojun2048
parent
commit
78f2fe253e
  1. 16
      docker/docker-swarm/docker-compose.yml
  2. 26
      docker/docker-swarm/dolphinscheduler_env.sh
  3. 0
      docker/kubernetes/dolphinscheduler/Chart.yaml
  4. 0
      docker/kubernetes/dolphinscheduler/README.md
  5. 0
      docker/kubernetes/dolphinscheduler/requirements.yaml
  6. 0
      docker/kubernetes/dolphinscheduler/templates/NOTES.txt
  7. 0
      docker/kubernetes/dolphinscheduler/templates/_helpers.tpl
  8. 0
      docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-alert.yaml
  9. 0
      docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-master.yaml
  10. 0
      docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-worker.yaml
  11. 14
      docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml
  12. 12
      docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml
  13. 0
      docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-frontend.yaml
  14. 0
      docker/kubernetes/dolphinscheduler/templates/ingress.yaml
  15. 0
      docker/kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-alert.yaml
  16. 0
      docker/kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-api.yaml
  17. 0
      docker/kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-frontend.yaml
  18. 0
      docker/kubernetes/dolphinscheduler/templates/secret-external-postgresql.yaml
  19. 6
      docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
  20. 8
      docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
  21. 0
      docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-api.yaml
  22. 0
      docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-frontend.yaml
  23. 0
      docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-master-headless.yaml
  24. 0
      docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-worker-headless.yaml
  25. 0
      docker/kubernetes/dolphinscheduler/values.yaml
  26. 4
      dockerfile/startup.sh

16
docker-compose/docker-compose.yml → docker/docker-swarm/docker-compose.yml

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
version: "3"
version: "3.4"
networks:
dolphinscheduler-postgresql:
@ -41,7 +41,10 @@ volumes:
dolphinscheduler-master:
dolphinscheduler-worker-data:
dolphinscheduler-worker-logs:
configs:
dolphinscheduler-worker-task-env:
file: ./dolphinscheduler_env.sh
services:
@ -136,6 +139,7 @@ services:
volumes:
- dolphinscheduler-frontend:/var/log/nginx
networks:
- dolphinscheduler-frontend
- dolphinscheduler-api
dolphinscheduler-alert:
@ -209,7 +213,8 @@ services:
- dolphinscheduler-zookeeper
volumes:
- dolphinscheduler-master:/opt/dolphinscheduler/logs
networks:
networks:
- dolphinscheduler-master
- dolphinscheduler-postgresql
- dolphinscheduler-zookeeper
@ -247,7 +252,10 @@ services:
volumes:
- dolphinscheduler-worker-data:/tmp/dolphinscheduler
- dolphinscheduler-worker-logs:/opt/dolphinscheduler/logs
- dolphinscheduler-worker-task-env:/opt/dolphinscheduler/conf/env/
networks:
configs:
- source: dolphinscheduler-worker-task-env
target: /opt/dolphinscheduler/conf/env/dolphinscheduler_env.sh
networks:
- dolphinscheduler-worker
- dolphinscheduler-postgresql
- dolphinscheduler-zookeeper

26
docker/docker-swarm/dolphinscheduler_env.sh

@ -0,0 +1,26 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
export HADOOP_HOME=/opt/soft/hadoop
export HADOOP_CONF_DIR=/opt/soft/hadoop/etc/hadoop
export SPARK_HOME1=/opt/soft/spark1
export SPARK_HOME2=/opt/soft/spark2
export PYTHON_HOME=/opt/soft/python
export JAVA_HOME=/opt/soft/java
export HIVE_HOME=/opt/soft/hive
export FLINK_HOME=/opt/soft/flink
export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$PATH

0
kubernetes/dolphinscheduler/Chart.yaml → docker/kubernetes/dolphinscheduler/Chart.yaml

0
kubernetes/dolphinscheduler/README.md → docker/kubernetes/dolphinscheduler/README.md

0
kubernetes/dolphinscheduler/requirements.yaml → docker/kubernetes/dolphinscheduler/requirements.yaml

0
kubernetes/dolphinscheduler/templates/NOTES.txt → docker/kubernetes/dolphinscheduler/templates/NOTES.txt

0
kubernetes/dolphinscheduler/templates/_helpers.tpl → docker/kubernetes/dolphinscheduler/templates/_helpers.tpl

0
kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-alert.yaml → docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-alert.yaml

0
kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-master.yaml → docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-master.yaml

0
kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-worker.yaml → docker/kubernetes/dolphinscheduler/templates/configmap-dolphinscheduler-worker.yaml

14
kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml → docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml

@ -166,19 +166,19 @@ spec:
value: {{ template "dolphinscheduler.postgresql.fullname" . }}
{{- else }}
value: {{ .Values.externalDatabase.host | quote }}
{{- end }}
{{- end }}
- name: POSTGRESQL_PORT
{{- if .Values.postgresql.enabled }}
value: "5432"
{{- else }}
value: {{ .Values.externalDatabase.port }}
{{- end }}
{{- end }}
- name: POSTGRESQL_USERNAME
{{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlUsername }}
{{- else }}
value: {{ .Values.externalDatabase.username | quote }}
{{- end }}
{{- end }}
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
@ -188,7 +188,13 @@ spec:
{{- else }}
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password
{{- end }}
{{- end }}
- name: POSTGRESQL_DATABASE
{{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlDatabase }}
{{- else }}
value: {{ .Values.externalDatabase.database | quote }}
{{- end }}
{{- if .Values.alert.livenessProbe.enabled }}
livenessProbe:
exec:

12
kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml → docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml

@ -99,19 +99,19 @@ spec:
value: {{ template "dolphinscheduler.postgresql.fullname" . }}
{{- else }}
value: {{ .Values.externalDatabase.host | quote }}
{{- end }}
{{- end }}
- name: POSTGRESQL_PORT
{{- if .Values.postgresql.enabled }}
value: "5432"
{{- else }}
value: {{ .Values.externalDatabase.port }}
{{- end }}
{{- end }}
- name: POSTGRESQL_USERNAME
{{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlUsername }}
{{- else }}
value: {{ .Values.externalDatabase.username | quote }}
{{- end }}
{{- end }}
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
@ -122,6 +122,12 @@ spec:
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password
{{- end }}
- name: POSTGRESQL_DATABASE
{{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlDatabase }}
{{- else }}
value: {{ .Values.externalDatabase.database | quote }}
{{- end }}
- name: ZOOKEEPER_QUORUM
{{- if .Values.zookeeper.enabled }}
value: "{{ template "dolphinscheduler.zookeeper.quorum" . }}"

0
kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-frontend.yaml → docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-frontend.yaml

0
kubernetes/dolphinscheduler/templates/ingress.yaml → docker/kubernetes/dolphinscheduler/templates/ingress.yaml

0
kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-alert.yaml → docker/kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-alert.yaml

0
kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-api.yaml → docker/kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-api.yaml

0
kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-frontend.yaml → docker/kubernetes/dolphinscheduler/templates/pvc-dolphinscheduler-frontend.yaml

0
kubernetes/dolphinscheduler/templates/secret-external-postgresql.yaml → docker/kubernetes/dolphinscheduler/templates/secret-external-postgresql.yaml

6
kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml → docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml

@ -188,6 +188,12 @@ spec:
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password
{{- end }}
- name: POSTGRESQL_DATABASE
{{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlDatabase }}
{{- else }}
value: {{ .Values.externalDatabase.database | quote }}
{{- end }}
- name: ZOOKEEPER_QUORUM
{{- if .Values.zookeeper.enabled }}
value: {{ template "dolphinscheduler.zookeeper.quorum" . }}

8
kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml → docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml

@ -184,7 +184,13 @@ spec:
{{- else }}
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password
{{- end }}
{{- end }}
- name: POSTGRESQL_DATABASE
{{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlDatabase }}
{{- else }}
value: {{ .Values.externalDatabase.database | quote }}
{{- end }}
- name: ZOOKEEPER_QUORUM
{{- if .Values.zookeeper.enabled }}
value: "{{ template "dolphinscheduler.zookeeper.quorum" . }}"

0
kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-api.yaml → docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-api.yaml

0
kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-frontend.yaml → docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-frontend.yaml

0
kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-master-headless.yaml → docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-master-headless.yaml

0
kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-worker-headless.yaml → docker/kubernetes/dolphinscheduler/templates/svc-dolphinscheduler-worker-headless.yaml

0
kubernetes/dolphinscheduler/values.yaml → docker/kubernetes/dolphinscheduler/values.yaml

4
dockerfile/startup.sh

@ -70,10 +70,10 @@ initZK() {
while ! nc -z ${line%:*} ${line#*:}; do
counter=$((counter+1))
if [ $counter == 30 ]; then
log "Error: Couldn't connect to zookeeper."
echo "Error: Couldn't connect to zookeeper."
exit 1
fi
log "Trying to connect to zookeeper at ${line}. Attempt $counter."
echo "Trying to connect to zookeeper at ${line}. Attempt $counter."
sleep 5
done
done

Loading…
Cancel
Save