sijie closed pull request #1134: Docker compose files for pulsar URL: https://github.com/apache/incubator-pulsar/pull/1134
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tests/compose/README.md b/tests/compose/README.md new file mode 100644 index 0000000000..63c97e5f8e --- /dev/null +++ b/tests/compose/README.md @@ -0,0 +1,9 @@ +This are docker compose files to quickly bring up a pulsar +cluster. They use the pulsar testing docker image. To generate this, +run ```mvn install -DskipTests -Pdocker``` in the top-level directory +of the project. + +To run, change directory into multi or simple, and run: +``` +docker-compose up +``` diff --git a/tests/compose/multi/docker-compose.yml b/tests/compose/multi/docker-compose.yml new file mode 100644 index 0000000000..3a5258f188 --- /dev/null +++ b/tests/compose/multi/docker-compose.yml @@ -0,0 +1,167 @@ +# +# 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.1' +networks: + pulsar: + driver: bridge + +services: + conf-eu: + hostname: conf-eu + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-global-zk.sh + environment: + ZOOKEEPER_SERVERS: conf-eu,conf-us + networks: + pulsar: + + zk-eu: + hostname: zk-eu + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-local-zk.sh + environment: + ZOOKEEPER_SERVERS: zk-eu + networks: + pulsar: + + init-eu: + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/init-cluster.sh + environment: + clusterName: eu + zkServers: zk-eu + configurationStore: conf-eu:2184,conf-us:2184 + pulsarNode: pulsar1-eu + networks: + pulsar: + + bk1-eu: + hostname: bk1-eu + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-bookie.sh + environment: + clusterName: eu + zkServers: zk-eu + networks: + pulsar: + + bk2-eu: + hostname: bk2-eu + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-bookie.sh + environment: + clusterName: eu + zkServers: zk-eu + networks: + pulsar: + + pulsar1-eu: + hostname: pulsar1-eu + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-broker.sh + environment: + clusterName: eu + zookeeperServers: zk-eu + configurationStoreServers: conf-eu:2184 + networks: + pulsar: + + proxy-eu: + hostname: proxy-eu + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-proxy.sh + environment: + clusterName: eu + zookeeperServers: zk-eu + configurationStoreServers: conf-eu:2184 + networks: + pulsar: + + conf-us: + hostname: conf-us + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-global-zk.sh + environment: + ZOOKEEPER_SERVERS: conf-eu,conf-us + networks: + pulsar: + + zk-us: + hostname: zk-us + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-local-zk.sh + environment: + ZOOKEEPER_SERVERS: zk-us + networks: + pulsar: + + init-us: + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/init-cluster.sh + environment: + clusterName: us + zkServers: zk-us + configurationStore: conf-eu:2184,conf-us:2184 + pulsarNode: pulsar1-us + networks: + pulsar: + + bk1-us: + hostname: bk1-us + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-bookie.sh + environment: + clusterName: us + zkServers: zk-us + networks: + pulsar: + + bk2-us: + hostname: bk2-us + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-bookie.sh + environment: + clusterName: us + zkServers: zk-us + networks: + pulsar: + + pulsar1-us: + hostname: pulsar1-us + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-broker.sh + environment: + clusterName: us + zookeeperServers: zk-us + configurationStoreServers: conf-us:2184 + networks: + pulsar: + + proxy-us: + hostname: proxy-us + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-proxy.sh + environment: + clusterName: us + zookeeperServers: zk-us + configurationStoreServers: conf-us:2184 + networks: + pulsar: + diff --git a/tests/compose/simple/docker-compose.yml b/tests/compose/simple/docker-compose.yml new file mode 100644 index 0000000000..99647e5a1e --- /dev/null +++ b/tests/compose/simple/docker-compose.yml @@ -0,0 +1,86 @@ +# +# 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.1' +networks: + pulsar: + driver: bridge + +services: + zk: + hostname: zk + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-local-zk.sh + environment: + ZOOKEEPER_SERVERS: zk + networks: + pulsar: + + init: + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/init-cluster.sh + environment: + clusterName: test + zkServers: zk + configurationStore: zk:2181 + pulsarNode: pulsar1 + networks: + pulsar: + + bk1: + hostname: bk1 + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-bookie.sh + environment: + clusterName: test + zkServers: zk + networks: + pulsar: + + bk2: + hostname: bk2 + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-bookie.sh + environment: + clusterName: test + zkServers: zk + networks: + pulsar: + + bk3: + hostname: bk3 + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-bookie.sh + environment: + clusterName: test + zkServers: zk + networks: + pulsar: + + pulsar1: + hostname: pulsar1 + image: apachepulsar/pulsar-test-latest-version:latest + command: bin/run-broker.sh + environment: + clusterName: test + zookeeperServers: zk + configurationStoreServers: zk:2181 + networks: + pulsar: + ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
