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/2/head
liwenhe1993 5 years ago
parent
commit
7eecfe45ea
  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 # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
version: "3" version: "3.4"
networks: networks:
dolphinscheduler-postgresql: dolphinscheduler-postgresql:
@ -41,7 +41,10 @@ volumes:
dolphinscheduler-master: dolphinscheduler-master:
dolphinscheduler-worker-data: dolphinscheduler-worker-data:
dolphinscheduler-worker-logs: dolphinscheduler-worker-logs:
configs:
dolphinscheduler-worker-task-env: dolphinscheduler-worker-task-env:
file: ./dolphinscheduler_env.sh
services: services:
@ -136,6 +139,7 @@ services:
volumes: volumes:
- dolphinscheduler-frontend:/var/log/nginx - dolphinscheduler-frontend:/var/log/nginx
networks: networks:
- dolphinscheduler-frontend
- dolphinscheduler-api - dolphinscheduler-api
dolphinscheduler-alert: dolphinscheduler-alert:
@ -209,7 +213,8 @@ services:
- dolphinscheduler-zookeeper - dolphinscheduler-zookeeper
volumes: volumes:
- dolphinscheduler-master:/opt/dolphinscheduler/logs - dolphinscheduler-master:/opt/dolphinscheduler/logs
networks: networks:
- dolphinscheduler-master
- dolphinscheduler-postgresql - dolphinscheduler-postgresql
- dolphinscheduler-zookeeper - dolphinscheduler-zookeeper
@ -247,7 +252,10 @@ services:
volumes: volumes:
- dolphinscheduler-worker-data:/tmp/dolphinscheduler - dolphinscheduler-worker-data:/tmp/dolphinscheduler
- dolphinscheduler-worker-logs:/opt/dolphinscheduler/logs - dolphinscheduler-worker-logs:/opt/dolphinscheduler/logs
- dolphinscheduler-worker-task-env:/opt/dolphinscheduler/conf/env/ configs:
networks: - source: dolphinscheduler-worker-task-env
target: /opt/dolphinscheduler/conf/env/dolphinscheduler_env.sh
networks:
- dolphinscheduler-worker
- dolphinscheduler-postgresql - dolphinscheduler-postgresql
- dolphinscheduler-zookeeper - 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" . }} value: {{ template "dolphinscheduler.postgresql.fullname" . }}
{{- else }} {{- else }}
value: {{ .Values.externalDatabase.host | quote }} value: {{ .Values.externalDatabase.host | quote }}
{{- end }} {{- end }}
- name: POSTGRESQL_PORT - name: POSTGRESQL_PORT
{{- if .Values.postgresql.enabled }} {{- if .Values.postgresql.enabled }}
value: "5432" value: "5432"
{{- else }} {{- else }}
value: {{ .Values.externalDatabase.port }} value: {{ .Values.externalDatabase.port }}
{{- end }} {{- end }}
- name: POSTGRESQL_USERNAME - name: POSTGRESQL_USERNAME
{{- if .Values.postgresql.enabled }} {{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlUsername }} value: {{ .Values.postgresql.postgresqlUsername }}
{{- else }} {{- else }}
value: {{ .Values.externalDatabase.username | quote }} value: {{ .Values.externalDatabase.username | quote }}
{{- end }} {{- end }}
- name: POSTGRESQL_PASSWORD - name: POSTGRESQL_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -188,7 +188,13 @@ spec:
{{- else }} {{- else }}
name: {{ printf "%s-%s" .Release.Name "externaldb" }} name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password 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 }} {{- if .Values.alert.livenessProbe.enabled }}
livenessProbe: livenessProbe:
exec: 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" . }} value: {{ template "dolphinscheduler.postgresql.fullname" . }}
{{- else }} {{- else }}
value: {{ .Values.externalDatabase.host | quote }} value: {{ .Values.externalDatabase.host | quote }}
{{- end }} {{- end }}
- name: POSTGRESQL_PORT - name: POSTGRESQL_PORT
{{- if .Values.postgresql.enabled }} {{- if .Values.postgresql.enabled }}
value: "5432" value: "5432"
{{- else }} {{- else }}
value: {{ .Values.externalDatabase.port }} value: {{ .Values.externalDatabase.port }}
{{- end }} {{- end }}
- name: POSTGRESQL_USERNAME - name: POSTGRESQL_USERNAME
{{- if .Values.postgresql.enabled }} {{- if .Values.postgresql.enabled }}
value: {{ .Values.postgresql.postgresqlUsername }} value: {{ .Values.postgresql.postgresqlUsername }}
{{- else }} {{- else }}
value: {{ .Values.externalDatabase.username | quote }} value: {{ .Values.externalDatabase.username | quote }}
{{- end }} {{- end }}
- name: POSTGRESQL_PASSWORD - name: POSTGRESQL_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -122,6 +122,12 @@ spec:
name: {{ printf "%s-%s" .Release.Name "externaldb" }} name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password 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 - name: ZOOKEEPER_QUORUM
{{- if .Values.zookeeper.enabled }} {{- if .Values.zookeeper.enabled }}
value: "{{ template "dolphinscheduler.zookeeper.quorum" . }}" 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" }} name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password 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 - name: ZOOKEEPER_QUORUM
{{- if .Values.zookeeper.enabled }} {{- if .Values.zookeeper.enabled }}
value: {{ template "dolphinscheduler.zookeeper.quorum" . }} 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 }} {{- else }}
name: {{ printf "%s-%s" .Release.Name "externaldb" }} name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password 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 - name: ZOOKEEPER_QUORUM
{{- if .Values.zookeeper.enabled }} {{- if .Values.zookeeper.enabled }}
value: "{{ template "dolphinscheduler.zookeeper.quorum" . }}" 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 while ! nc -z ${line%:*} ${line#*:}; do
counter=$((counter+1)) counter=$((counter+1))
if [ $counter == 30 ]; then if [ $counter == 30 ]; then
log "Error: Couldn't connect to zookeeper." echo "Error: Couldn't connect to zookeeper."
exit 1 exit 1
fi fi
log "Trying to connect to zookeeper at ${line}. Attempt $counter." echo "Trying to connect to zookeeper at ${line}. Attempt $counter."
sleep 5 sleep 5
done done
done done

Loading…
Cancel
Save