You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2017/12/28 02:49:32 UTC

[GitHub] rdhabalia commented on a change in pull request #950: Issue 924: Provide a json file for Marathon app groups to run Pulsar on DCOS

rdhabalia commented on a change in pull request #950: Issue 924: Provide a json file for Marathon app groups to run Pulsar on DCOS
URL: https://github.com/apache/incubator-pulsar/pull/950#discussion_r158891061
 
 

 ##########
 File path: deploy/dcos/PulsarGroups.json
 ##########
 @@ -0,0 +1,351 @@
+{
+  "id": "/pulsar",
+  "// Notice:" : "mem, cpus, volume size, zkServers, may need change according to your DC/OS deployment.",
+  "groups": [
+    {
+      "id": "/pulsar/bookkeeper",
+      "apps": [
+        {
+          "id": "/pulsar/bookkeeper/bookie",
+          "cpus": 1,
+          "mem": 1024,
+          "instances": 3,
+          "constraints": [["hostname", "UNIQUE"]],
+          "container": {
+            "type": "DOCKER",
+            "volumes": [
+              {
+                "containerPath": "/bookkeeper/data/journal",
+                "hostPath": "journal",
+                "mode": "RW"
+              },
+
+              {
+                "containerPath": "journal",
+                "mode": "RW",
+                "persistent": {
+                  "size": 7000
+                }
+              },
+
+              {
+                "containerPath": "/bookkeeper/data/index",
+                "hostPath": "index",
+                "mode": "RW"
+              },
+              {
+                "containerPath": "index",
+                "mode": "RW",
+                "persistent": {
+                  "size": 7000
+                }
+              },
+
+              {
+                "containerPath": "/bookkeeper/data/ledgers",
+                "hostPath": "ledgers",
+                "mode": "RW"
+              },
+              {
+                "containerPath": "ledgers",
+                "mode": "RW",
+                "persistent": {
+                  "size": 30000
+                }
+              }
+            ],
+
+            "docker": {
+              "image": "apachepulsar/pulsar:latest",
+              "network": "HOST"
+            }
+          },
+
+          "residency": {
+            "taskLostBehavior": "WAIT_FOREVER"
+          },
+
+
+          "portDefinitions": [
+            {
+              "protocol": "tcp",
+              "port": 3181
+            },
+            {
+              "port": 8000,
+              "protocol": "tcp",
+              "labels": {
+                "METRICS_PATH": "/metrics"
+              }
+            }
+          ],
+
+          "requirePorts": true,
+
+          "env": {
+            "// Notice": "add PULSAR_MEM, PULSAR_GC, according to your environment.",
+            "zkServers":  "master.mesos:2181",
+            "ledgerManagerType": "hierarchical",
+            "statsProviderClass": "org.apache.bookkeeper.stats.PrometheusMetricsProvider",
+            "journalDirectory": "/bookkeeper/data/journal",
+            "ledgerDirectories": "/bookkeeper/data/ledgers",
+            "indexDirectories": "/bookkeeper/data/index"
+          },
+
+          "args": ["sh", "-c", "python bin/apply-config-from-env.py conf/bookkeeper.conf && python bin/apply-config-from-env.py conf/pulsar_env.sh && bin/bookkeeper shell metaformat -n || true; bin/pulsar bookie"],
+
+          "healthChecks": [
+            {
+              "protocol": "TCP",
+              "portIndex": 0,
+              "gracePeriodSeconds": 300,
+              "intervalSeconds": 60,
+              "timeoutSeconds": 20,
+              "maxConsecutiveFailures": 0,
+              "ignoreHttp1xx": false
+            }
+          ],
+
+          "upgradeStrategy": {
+            "maximumOverCapacity": 0,
+            "minimumHealthCapacity": 0
+          }
+        },
+        {
+          "id": "/pulsar/bookkeeper/bookie-autorecovery",
+          "cpus": 1,
+          "mem": 1024,
+          "instances": 1,
+          "constraints": [["hostname", "UNIQUE"]],
+          "container": {
+            "type": "DOCKER",
+
+            "docker": {
+              "image": "apachepulsar/pulsar:latest",
+              "network": "HOST"
+            }
+          },
+
+          "env": {
+            "zkServers":  "master.mesos:2181",
+            "PULSAR_MEM": "\" -Xmx128m \"",
+            "PULSAR_GC": "\"  \""
+          },
+
+          "args": ["sh", "-c", "python bin/apply-config-from-env.py conf/bookkeeper.conf && bin/bookkeeper autorecovery"],
+
+          "upgradeStrategy": {
+            "maximumOverCapacity": 0,
+            "minimumHealthCapacity": 0
+          }
+        }
+      ]
+    },
+
+    {
+      "id": "/pulsar/brokers",
+      "dependencies": ["/pulsar/bookkeeper/bookie"],
+      "apps": [
+        {
+          "// Notice:" : "change mem, cpu, volume size, zkServers, according to your DC/OS deployment.",
+          "id": "/pulsar/brokers/broker",
+          "cpus": 1,
+          "mem": 1024,
+          "instances": 3,
+          "constraints": [["hostname", "UNIQUE"]],
+          "container": {
+            "type": "DOCKER",
+
+            "docker": {
+              "image": "apachepulsar/pulsar:latest",
+              "network": "HOST"
+            }
+          },
+
+          "portDefinitions": [
+            {
+              "protocol": "tcp",
+              "port": 6650
+            },
+            {
+              "protocol": "tcp",
+              "port": 8082,
+              "labels": {
+                "METRICS_PATH": "/metrics"
+              }
+            }
+          ],
+
+          "requirePorts": true,
+
+          "env": {
+            "// Notice": "add PULSAR_MEM, PULSAR_GC, according to your environment.",
+            "webServicePort": "8082",
+            "zookeeperServers":  "master.mesos:2181",
+            "globalZookeeperServers":  "master.mesos:2181",
+            "clusterName": "pulsar-dcos"
+          },
+
+          "args": ["sh", "-c", "python bin/apply-config-from-env.py conf/broker.conf && python bin/apply-config-from-env.py conf/pulsar_env.sh && bin/pulsar broker"],
+
+          "healthChecks": [
+            {
+              "protocol": "TCP",
+              "portIndex": 0,
+              "gracePeriodSeconds": 300,
+              "intervalSeconds": 60,
+              "timeoutSeconds": 20,
+              "maxConsecutiveFailures": 0,
+              "ignoreHttp1xx": false
+            }
+          ],
+
+          "upgradeStrategy": {
+            "maximumOverCapacity": 0,
+            "minimumHealthCapacity": 0
+          }
+        },
+        {
+          "id": "/pulsar/brokers/brokeradmin",
+          "cpus": 1,
+          "mem": 1024,
+          "instances": 1,
+          "constraints": [["hostname", "UNIQUE"]],
+          "container": {
+            "type": "DOCKER",
+
+            "docker": {
+              "image": "apachepulsar/pulsar:latest",
+              "network": "HOST"
+            }
+          },
+
+          "env": {
+            "webServicePort": "8082",
+            "zookeeperServers":  "master.mesos:2181",
+            "globalZookeeperServers":  "master.mesos:2181",
+            "clusterName": "pulsar-dcos",
+            "webServiceUrl": "http://broker.brokers.pulsar.marathon.mesos:8082",
+            "brokerServiceUrl":  "pulsar://broker.brokers.pulsar.marathon.mesos:6650"
+          },
+
+          "args": ["sh", "-c", "bin/apply-config-from-env.py conf/client.conf && sleep 10000000000"]
+        }
+      ]
+    },
+
+    {
+      "id": "/pulsar/monitor",
+      "dependencies": ["/pulsar/brokers/broker"],
+      "apps": [
+        {
+          "id": "/pulsar/monitor/prom",
+          "cpus": 0.5,
+          "mem": 512,
+          "instances": 1,
+          "constraints": [["hostname", "UNIQUE"]],
+          "container": {
+            "type": "DOCKER",
+
+            "docker": {
+              "image": "zhaijia/prometheus",
 
 Review comment:
   is there any thing additional present into docker image compare to `https://hub.docker.com/r/prom/prometheus/` ? If not then should we replace it with `prom/prometheus/`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services