{"action":"created","comment":{"url":"https://api.github.com/repos/apache/rocketmq-externals/pulls/comments/206228751","pull_request_review_id":141603059,"id":206228751,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjIyODc1MQ==","diff_hunk":"@@ -0,0 +1,49 @@\n+#!/bin/sh\n+\n+# Licensed to the Apache Software Foundation (ASF) under one or more\n+# contributor license agreements.  See the NOTICE file distributed with\n+# this work for additional information regarding copyright ownership.\n+# The ASF licenses this file to You under the Apache License, Version 2.0\n+# (the \"License\"); you may not use this file except in compliance with\n+# the License.  You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+#===========================================================================================\n+# Java Environment Setting\n+#===========================================================================================\n+error_exit ()\n+{\n+    echo \"ERROR: $1 !!\"\n+    exit 1\n+}\n+\n+[ ! -e \"$JAVA_HOME/bin/java\" ] && JAVA_HOME=$HOME/jdk/java\n+[ ! -e \"$JAVA_HOME/bin/java\" ] && JAVA_HOME=/usr/java\n+[ ! -e \"$JAVA_HOME/bin/java\" ] && error_exit \"Please set the JAVA_HOME variable in your environment, We need java(x64)!\"\n+\n+export JAVA_HOME\n+export JAVA=\"$JAVA_HOME/bin/java\"\n+export BASE_DIR=$(dirname $0)/..\n+export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}\n+\n+#===========================================================================================\n+# JVM Configuration\n+#===========================================================================================\n+JAVA_OPT=\"${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m\"","path":"rocketmq-kubernetes/4.2.0-incubating/sample/namesrv/runserver-dev.sh","position":39,"original_position":39,"commit_id":"03388596cc791200b8d56ac0f058f6b151eb914c","original_commit_id":"03388596cc791200b8d56ac0f058f6b151eb914c","user":{"login":"XiaoZYang","id":8848479,"node_id":"MDQ6VXNlcjg4NDg0Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/8848479?v=4","gravatar_id":"","url":"https://api.github.com/users/XiaoZYang","html_url":"https://github.com/XiaoZYang","followers_url":"https://api.github.com/users/XiaoZYang/followers","following_url":"https://api.github.com/users/XiaoZYang/following{/other_user}","gists_url":"https://api.github.com/users/XiaoZYang/gists{/gist_id}","starred_url":"https://api.github.com/users/XiaoZYang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XiaoZYang/subscriptions","organizations_url":"https://api.github.com/users/XiaoZYang/orgs","repos_url":"https://api.github.com/users/XiaoZYang/repos","events_url":"https://api.github.com/users/XiaoZYang/events{/privacy}","received_events_url":"https://api.github.com/users/XiaoZYang/received_events","type":"User","site_admin":false},"body":"@vongosling as @huanwei mentioned in ISSUE #87, the `-Xms` and `-Xmx` parameter for JVM seems to break the default memory limit of Docker container, so @huanwei change these parameters to *256m*. Is that enough to execute properly for **namesrv** and **broker**?\r\n What about overriding the default option of Docker by providing the value of parameter `-m` such as `-m 1024m`.\r\nOr should we expose these two options for user to tune it?\r\n\r\nping @vongosling @huanwei ","created_at":"2018-07-30T16:01:33Z","updated_at":"2018-07-30T16:01:33Z","html_url":"https://github.com/apache/rocketmq-externals/pull/87#discussion_r206228751","pull_request_url":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/apache/rocketmq-externals/pulls/comments/206228751"},"html":{"href":"https://github.com/apache/rocketmq-externals/pull/87#discussion_r206228751"},"pull_request":{"href":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87","id":204119536,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MTE5NTM2","html_url":"https://github.com/apache/rocketmq-externals/pull/87","diff_url":"https://github.com/apache/rocketmq-externals/pull/87.diff","patch_url":"https://github.com/apache/rocketmq-externals/pull/87.patch","issue_url":"https://api.github.com/repos/apache/rocketmq-externals/issues/87","number":87,"state":"closed","locked":false,"title":"Rocketmq kubernetes","user":{"login":"huanwei","id":7498858,"node_id":"MDQ6VXNlcjc0OTg4NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/7498858?v=4","gravatar_id":"","url":"https://api.github.com/users/huanwei","html_url":"https://github.com/huanwei","followers_url":"https://api.github.com/users/huanwei/followers","following_url":"https://api.github.com/users/huanwei/following{/other_user}","gists_url":"https://api.github.com/users/huanwei/gists{/gist_id}","starred_url":"https://api.github.com/users/huanwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huanwei/subscriptions","organizations_url":"https://api.github.com/users/huanwei/orgs","repos_url":"https://api.github.com/users/huanwei/repos","events_url":"https://api.github.com/users/huanwei/events{/privacy}","received_events_url":"https://api.github.com/users/huanwei/received_events","type":"User","site_admin":false},"body":"## What is the purpose of the change\r\n\r\nThe original intention of this PR is to provide ideas and implementations\r\n for dockerized RocketMQ or RocketMQ clusters running on Kubernetes. \r\n\r\nSince the default bootstrap setting of `JAVA_OPT` of namesrv and broker I think is pretty high for most development environment. So we need to help those new RocketMQ developers to avoid problems like [issue #78  run rocketmq-broker using docker EXIT(137) ](https://github.com/apache/rocketmq-externals/issues/78). \r\n\r\nIn this PR I just want to share my implementation of \r\nadd the default configuration of \r\n\r\n## Brief changelog\r\n\r\nIn this PR I implemented the Kubernetes deployment for a single Master RocketMQ. Also to avoid [issue #78 ] I add a sample deployment on Kubernetes. \r\n\r\n## Verifying this change\r\n\r\nJust follow the README.md, build the namersrv and broker images, deployment them to Kubernetes,  and check it.\r\n\r\n```\r\ncd sample\r\n\r\nkubectl create -f development.yaml\r\n```\r\n\r\nHow to verify:\r\n\r\n```\r\n[root@k8s-master ~]# kubectl get pods -owide |grep rocketmq\r\nNAME                                  READY     STATUS    RESTARTS   AGE       IP                NODE\r\nrocketmq-69bff87d5d-q7kjr             2/2       Running   0          45m       192.168.196.33    k8s-node5\r\n```\r\n","created_at":"2018-07-26T12:02:12Z","updated_at":"2018-07-30T16:01:33Z","closed_at":"2018-07-29T02:58:42Z","merged_at":null,"merge_commit_sha":"2dd248311c1fcfb7d69b88a89a770f183eda757a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87/commits","review_comments_url":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87/comments","review_comment_url":"https://api.github.com/repos/apache/rocketmq-externals/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/rocketmq-externals/issues/87/comments","statuses_url":"https://api.github.com/repos/apache/rocketmq-externals/statuses/03388596cc791200b8d56ac0f058f6b151eb914c","head":{"label":"huanwei:rocketmq-kubernetes","ref":"rocketmq-kubernetes","sha":"03388596cc791200b8d56ac0f058f6b151eb914c","user":{"login":"huanwei","id":7498858,"node_id":"MDQ6VXNlcjc0OTg4NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/7498858?v=4","gravatar_id":"","url":"https://api.github.com/users/huanwei","html_url":"https://github.com/huanwei","followers_url":"https://api.github.com/users/huanwei/followers","following_url":"https://api.github.com/users/huanwei/following{/other_user}","gists_url":"https://api.github.com/users/huanwei/gists{/gist_id}","starred_url":"https://api.github.com/users/huanwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huanwei/subscriptions","organizations_url":"https://api.github.com/users/huanwei/orgs","repos_url":"https://api.github.com/users/huanwei/repos","events_url":"https://api.github.com/users/huanwei/events{/privacy}","received_events_url":"https://api.github.com/users/huanwei/received_events","type":"User","site_admin":false},"repo":{"id":142270749,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIyNzA3NDk=","name":"rocketmq-externals","full_name":"huanwei/rocketmq-externals","owner":{"login":"huanwei","id":7498858,"node_id":"MDQ6VXNlcjc0OTg4NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/7498858?v=4","gravatar_id":"","url":"https://api.github.com/users/huanwei","html_url":"https://github.com/huanwei","followers_url":"https://api.github.com/users/huanwei/followers","following_url":"https://api.github.com/users/huanwei/following{/other_user}","gists_url":"https://api.github.com/users/huanwei/gists{/gist_id}","starred_url":"https://api.github.com/users/huanwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huanwei/subscriptions","organizations_url":"https://api.github.com/users/huanwei/orgs","repos_url":"https://api.github.com/users/huanwei/repos","events_url":"https://api.github.com/users/huanwei/events{/privacy}","received_events_url":"https://api.github.com/users/huanwei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/huanwei/rocketmq-externals","description":"Mirror of Apache RocketMQ (Incubating)","fork":true,"url":"https://api.github.com/repos/huanwei/rocketmq-externals","forks_url":"https://api.github.com/repos/huanwei/rocketmq-externals/forks","keys_url":"https://api.github.com/repos/huanwei/rocketmq-externals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/huanwei/rocketmq-externals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/huanwei/rocketmq-externals/teams","hooks_url":"https://api.github.com/repos/huanwei/rocketmq-externals/hooks","issue_events_url":"https://api.github.com/repos/huanwei/rocketmq-externals/issues/events{/number}","events_url":"https://api.github.com/repos/huanwei/rocketmq-externals/events","assignees_url":"https://api.github.com/repos/huanwei/rocketmq-externals/assignees{/user}","branches_url":"https://api.github.com/repos/huanwei/rocketmq-externals/branches{/branch}","tags_url":"https://api.github.com/repos/huanwei/rocketmq-externals/tags","blobs_url":"https://api.github.com/repos/huanwei/rocketmq-externals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/huanwei/rocketmq-externals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/huanwei/rocketmq-externals/git/refs{/sha}","trees_url":"https://api.github.com/repos/huanwei/rocketmq-externals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/huanwei/rocketmq-externals/statuses/{sha}","languages_url":"https://api.github.com/repos/huanwei/rocketmq-externals/languages","stargazers_url":"https://api.github.com/repos/huanwei/rocketmq-externals/stargazers","contributors_url":"https://api.github.com/repos/huanwei/rocketmq-externals/contributors","subscribers_url":"https://api.github.com/repos/huanwei/rocketmq-externals/subscribers","subscription_url":"https://api.github.com/repos/huanwei/rocketmq-externals/subscription","commits_url":"https://api.github.com/repos/huanwei/rocketmq-externals/commits{/sha}","git_commits_url":"https://api.github.com/repos/huanwei/rocketmq-externals/git/commits{/sha}","comments_url":"https://api.github.com/repos/huanwei/rocketmq-externals/comments{/number}","issue_comment_url":"https://api.github.com/repos/huanwei/rocketmq-externals/issues/comments{/number}","contents_url":"https://api.github.com/repos/huanwei/rocketmq-externals/contents/{+path}","compare_url":"https://api.github.com/repos/huanwei/rocketmq-externals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/huanwei/rocketmq-externals/merges","archive_url":"https://api.github.com/repos/huanwei/rocketmq-externals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/huanwei/rocketmq-externals/downloads","issues_url":"https://api.github.com/repos/huanwei/rocketmq-externals/issues{/number}","pulls_url":"https://api.github.com/repos/huanwei/rocketmq-externals/pulls{/number}","milestones_url":"https://api.github.com/repos/huanwei/rocketmq-externals/milestones{/number}","notifications_url":"https://api.github.com/repos/huanwei/rocketmq-externals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/huanwei/rocketmq-externals/labels{/name}","releases_url":"https://api.github.com/repos/huanwei/rocketmq-externals/releases{/id}","deployments_url":"https://api.github.com/repos/huanwei/rocketmq-externals/deployments","created_at":"2018-07-25T08:28:08Z","updated_at":"2018-07-29T01:21:48Z","pushed_at":"2018-07-30T07:08:08Z","git_url":"git://github.com/huanwei/rocketmq-externals.git","ssh_url":"git@github.com:huanwei/rocketmq-externals.git","clone_url":"https://github.com/huanwei/rocketmq-externals.git","svn_url":"https://github.com/huanwei/rocketmq-externals","homepage":null,"size":11780,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"b53672116a95675e0ec040c7d687e438670c41a6","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":84916374,"node_id":"MDEwOlJlcG9zaXRvcnk4NDkxNjM3NA==","name":"rocketmq-externals","full_name":"apache/rocketmq-externals","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/rocketmq-externals","description":"Mirror of Apache RocketMQ (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/rocketmq-externals","forks_url":"https://api.github.com/repos/apache/rocketmq-externals/forks","keys_url":"https://api.github.com/repos/apache/rocketmq-externals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/rocketmq-externals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/rocketmq-externals/teams","hooks_url":"https://api.github.com/repos/apache/rocketmq-externals/hooks","issue_events_url":"https://api.github.com/repos/apache/rocketmq-externals/issues/events{/number}","events_url":"https://api.github.com/repos/apache/rocketmq-externals/events","assignees_url":"https://api.github.com/repos/apache/rocketmq-externals/assignees{/user}","branches_url":"https://api.github.com/repos/apache/rocketmq-externals/branches{/branch}","tags_url":"https://api.github.com/repos/apache/rocketmq-externals/tags","blobs_url":"https://api.github.com/repos/apache/rocketmq-externals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/rocketmq-externals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/rocketmq-externals/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/rocketmq-externals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/rocketmq-externals/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/rocketmq-externals/languages","stargazers_url":"https://api.github.com/repos/apache/rocketmq-externals/stargazers","contributors_url":"https://api.github.com/repos/apache/rocketmq-externals/contributors","subscribers_url":"https://api.github.com/repos/apache/rocketmq-externals/subscribers","subscription_url":"https://api.github.com/repos/apache/rocketmq-externals/subscription","commits_url":"https://api.github.com/repos/apache/rocketmq-externals/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/rocketmq-externals/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/rocketmq-externals/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/rocketmq-externals/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/rocketmq-externals/contents/{+path}","compare_url":"https://api.github.com/repos/apache/rocketmq-externals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/rocketmq-externals/merges","archive_url":"https://api.github.com/repos/apache/rocketmq-externals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/rocketmq-externals/downloads","issues_url":"https://api.github.com/repos/apache/rocketmq-externals/issues{/number}","pulls_url":"https://api.github.com/repos/apache/rocketmq-externals/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/rocketmq-externals/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/rocketmq-externals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/rocketmq-externals/labels{/name}","releases_url":"https://api.github.com/repos/apache/rocketmq-externals/releases{/id}","deployments_url":"https://api.github.com/repos/apache/rocketmq-externals/deployments","created_at":"2017-03-14T07:00:06Z","updated_at":"2018-07-30T04:03:29Z","pushed_at":"2018-07-30T07:08:10Z","git_url":"git://github.com/apache/rocketmq-externals.git","ssh_url":"git@github.com:apache/rocketmq-externals.git","clone_url":"https://github.com/apache/rocketmq-externals.git","svn_url":"https://github.com/apache/rocketmq-externals","homepage":null,"size":11765,"stargazers_count":746,"watchers_count":746,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":558,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":558,"open_issues":11,"watchers":746,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87"},"html":{"href":"https://github.com/apache/rocketmq-externals/pull/87"},"issue":{"href":"https://api.github.com/repos/apache/rocketmq-externals/issues/87"},"comments":{"href":"https://api.github.com/repos/apache/rocketmq-externals/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/rocketmq-externals/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/rocketmq-externals/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/apache/rocketmq-externals/statuses/03388596cc791200b8d56ac0f058f6b151eb914c"}},"author_association":"NONE"}}
{"actor":{"display_login":"XiaoZYang"}}