德鲁伊 Docker 不同于本地德鲁伊
Druid Docker different than Local Druid
目标:
我正在测试 Apache Druid 的不同发行版。我的目标是最终在 docker-compose 设置中使用 Druid。
预期结果:
Druid 0.21.1 安装和 运行 本地(start-micro-quickstart
)与 Druid 0.21.1 运行 和 docker-compose
.
相同
实际结果:
Druid 安装和 运行 在本地有一个数据摄取页面,如下所示:
Druid 存储库中的 docker-compose.yml
并不 运行 因为它引用了 druid:0.22.0 图像,而 0.21.1 是最新的可用图像。当对 0.22.0 的引用更改为 0.21.0 时,docker-compose
成功,但数据摄取页面如下所示:
请特别注意缺少对我正在使用的 Apache Kafka 数据摄取的本机支持。
问题:
为什么本地构建和 docker 构建不同?有什么方法可以在 docker 中获得 start-micro-quickstart
版本?
docker-compose.yml:
#
# 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.
#
version: "2.2"
volumes:
metadata_data: {}
middle_var: {}
historical_var: {}
broker_var: {}
coordinator_var: {}
router_var: {}
druid_shared: {}
services:
postgres:
container_name: postgres
image: postgres:latest
volumes:
- metadata_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=FoolishPassword
- POSTGRES_USER=druid
- POSTGRES_DB=druid
# Need 3.5 or later for container nodes
zookeeper:
container_name: zookeeper
image: zookeeper:3.5
ports:
- "2181:2181"
environment:
- ZOO_MY_ID=1
coordinator:
image: apache/druid:0.21.1
container_name: coordinator
volumes:
- druid_shared:/opt/shared
- coordinator_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
ports:
- "8081:8081"
command:
- coordinator
env_file:
- environment
broker:
image: apache/druid:0.21.1
container_name: broker
volumes:
- broker_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8082:8082"
command:
- broker
env_file:
- environment
historical:
image: apache/druid:0.21.1
container_name: historical
volumes:
- druid_shared:/opt/shared
- historical_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8083:8083"
command:
- historical
env_file:
- environment
middlemanager:
image: apache/druid:0.21.1
container_name: middlemanager
volumes:
- druid_shared:/opt/shared
- middle_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8091:8091"
- "8100-8105:8100-8105"
command:
- middleManager
env_file:
- environment
router:
image: apache/druid:0.21.1
container_name: router
volumes:
- router_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8888:8888"
command:
- router
env_file:
- environment
编辑:重新启动 docker 容器后,它现在与本地 Druid 构建相匹配。我不知道为什么一开始我得到了另一个版本,但如果你遇到这个问题,请尝试重新启动容器。
如果有人有真正的答案,请添加,但我不想让它开放。
目标:
我正在测试 Apache Druid 的不同发行版。我的目标是最终在 docker-compose 设置中使用 Druid。
预期结果:
Druid 0.21.1 安装和 运行 本地(start-micro-quickstart
)与 Druid 0.21.1 运行 和 docker-compose
.
实际结果:
Druid 安装和 运行 在本地有一个数据摄取页面,如下所示:
Druid 存储库中的 docker-compose.yml
并不 运行 因为它引用了 druid:0.22.0 图像,而 0.21.1 是最新的可用图像。当对 0.22.0 的引用更改为 0.21.0 时,docker-compose
成功,但数据摄取页面如下所示:
请特别注意缺少对我正在使用的 Apache Kafka 数据摄取的本机支持。
问题:
为什么本地构建和 docker 构建不同?有什么方法可以在 docker 中获得 start-micro-quickstart
版本?
docker-compose.yml:
#
# 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.
#
version: "2.2"
volumes:
metadata_data: {}
middle_var: {}
historical_var: {}
broker_var: {}
coordinator_var: {}
router_var: {}
druid_shared: {}
services:
postgres:
container_name: postgres
image: postgres:latest
volumes:
- metadata_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=FoolishPassword
- POSTGRES_USER=druid
- POSTGRES_DB=druid
# Need 3.5 or later for container nodes
zookeeper:
container_name: zookeeper
image: zookeeper:3.5
ports:
- "2181:2181"
environment:
- ZOO_MY_ID=1
coordinator:
image: apache/druid:0.21.1
container_name: coordinator
volumes:
- druid_shared:/opt/shared
- coordinator_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
ports:
- "8081:8081"
command:
- coordinator
env_file:
- environment
broker:
image: apache/druid:0.21.1
container_name: broker
volumes:
- broker_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8082:8082"
command:
- broker
env_file:
- environment
historical:
image: apache/druid:0.21.1
container_name: historical
volumes:
- druid_shared:/opt/shared
- historical_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8083:8083"
command:
- historical
env_file:
- environment
middlemanager:
image: apache/druid:0.21.1
container_name: middlemanager
volumes:
- druid_shared:/opt/shared
- middle_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8091:8091"
- "8100-8105:8100-8105"
command:
- middleManager
env_file:
- environment
router:
image: apache/druid:0.21.1
container_name: router
volumes:
- router_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8888:8888"
command:
- router
env_file:
- environment
编辑:重新启动 docker 容器后,它现在与本地 Druid 构建相匹配。我不知道为什么一开始我得到了另一个版本,但如果你遇到这个问题,请尝试重新启动容器。
如果有人有真正的答案,请添加,但我不想让它开放。