hetu-core/hetu-samples/docker-swarm/deployment.yaml

117 lines
3.7 KiB
YAML

# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# Licensed 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.
# Assuming this machine has a local copy of the following in the same directory as the docker-compose.yml
# - A hdfs_configs directory containing default Hive connector configuration files
version: "3.7"
services:
# openLooKeng Engine - coordinator node
coordinator:
image: openlookeng:{{ imageTag }}
ports:
- "8080:8080"
# mount config files for hive connector
networks:
- openlk1
# configs:
# - source: hive_prop
# target: /usr/lib/hetu/etc/catalog/hive.properties
# - source: hive_core_site
# target: /opt/hdfs_configs/core-site.xml
# - source: hive_hdfs_site
# target: /opt/hdfs_configs/hdfs-site.xml
command: ["-t","coordinator","-nodeEnv","openlk1","-includeCoordinator","false"]
# coordinator1:
# image: openlookeng:{{ imageTag }}
# ports:
# - "8081:8080"
# # mount config files for hive connector
# networks:
# - openlk2
## configs:
## - source: hive_prop
## target: /usr/lib/hetu/etc/catalog/hive.properties
## - source: hive_core_site
## target: /opt/hdfs_configs/core-site.xml
## - source: hive_hdfs_site
## target: /opt/hdfs_configs/hdfs-site.xml
# command: ["-t","coordinator","-nodeEnv","openlk2","-includeCoordinator","false"]
# openLooKeng Engine - worker node
worker:
image: openlookeng:{{ imageTag }}
depends_on:
- coordinator
# mount config files for hive connector
networks:
- openlk1
# configs:
# - source: hive_prop
# target: /usr/lib/hetu/etc/catalog/hive.properties
# - source: hive_core_site
# target: /opt/hdfs_configs/core-site.xml
# - source: hive_hdfs_site
# target: /opt/hdfs_configs/hdfs-site.xml
deploy:
replicas: 2
# -discoveryURI need to be full path; hostname must align with the coordinator service node
command: ["-t", "worker","-nodeEnv","openlk1","-discoveryURI","http://coordinator:8080"]
# worker1:
# image: openlookeng:{{ imageTag }}
# depends_on:
# - coordinator1
# # mount config files for hive connector
# networks:
# - openlk2
## configs:
## - source: hive_prop
## target: /usr/lib/hetu/etc/catalog/hive.properties
## - source: hive_core_site
## target: /opt/hdfs_configs/core-site.xml
## - source: hive_hdfs_site
## target: /opt/hdfs_configs/hdfs-site.xml
# deploy:
# replicas: 2
# # -discoveryURI need to be full path; hostname must align with the coordinator service node
# command: ["-t", "worker","-nodeEnv","openlk2","-discoveryURI","http://coordinator1:8080"]
# # Hive
# # must be named as hadoop-master
# hadoop-master:
# image: prestodev/hdp2.6-hive:13
# # must align container port with the one in hdfs_configs/hive.properties
# ports:
# - "9083:9083"
# networks:
# - openlk1
# - openlk2
#configs:
# hive_prop:
# file: ${PWD}/hdfs_configs/hive.properties
# hive_core_site:
# file: ${PWD}/hdfs_configs/core-site.xml
# hive_hdfs_site:
# file: ${PWD}/hdfs_configs/hdfs-site.xml
networks:
openlk1:
driver: overlay
attachable: true
# openlk2:
# driver: overlay
# attachable: true