{"action":"created","comment":{"url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/comments/35995315","id":35995315,"diff_hunk":"@@ -0,0 +1,160 @@\n+# Scale Out\n+\n+Scaling out allows adding new service clusters to the existing deployment and adding new node to the management cluster. When new service clusters are added, the new requests for user databases will be distributed among the existing and new service clusters. On one hand, scaling out allows user databases span among more servers; on the other hand, it enables RDPG to flexibly increase user database capacity.\n+\n+## Add New Service Clusters\n+\n+Assume we already have two service clusters and we want to add the third one. The steps to modify `rdpg-warden-manifest.yml` and testing are as follows.\n+\n+### Modify the Manifest\n+\n+Copy and paste `rdpgsc2` job block.\n+\n+Modify name from `rdpgsc2` to `rdpgsc3`:\n+\n+  ```\n+  yaml\n+    - instances: 2\n+      name: rdpgsc3\n+  ```\n+\n+Modify Network ips to what you use here, in this example we are modifing `10.244.2.22` and `10.244.2.26` into `10.244.2.30` and `10.244.2.34`.\n+\n+``` \n+yaml\n+    networks:\n+  - default:\n+    - dns\n+    - gateway\n+    name: rdpg\n+    static_ips:\n+    - 10.244.2.30\n+    - 10.244.2.34\n+```\n+\n+Modify the cluster_name for rdpgd_service in properties from `rdpgsc2` into `rdpgsc3`.\n+\n+```\n+yaml\n+    rdpgd_service:\n+      cluster_name: rdpgsc3\n+```\n+\n+Modify networks fields as follows.\n+\n+```\n+yaml\n+   - cloud_properties:\n+      name: random\n+    range: 10.244.2.28/30\n+    reserved:\n+     - 10.244.2.29\n+    static:\n+     - 10.244.2.30\n+   - cloud_properties:\n+      name: random\n+    range: 10.244.2.32/30\n+    reserved:\n+     - 10.244.2.33\n+    static:\n+     - 10.244.2.34 \n+```\n+\n+Increase resources_pools size accordingly, in this example it is 2 (from 7 to 9) since we add one service cluster.\n+\n+```\n+yaml\n+    resource_pools:\n+     - cloud_properties:\n+       name: random\n+     name: rdpg\n+     network: rdpg\n+     size: 9\n+```\n+\n+### Testing \n+\n+Run `bosh vms`, you should be able to see the new service clusters nodes running.\n+\n+Go to `10.244.2.2:8500` in your favorite browser, you should be able to see the new service cluster master node and replica node show up. Also the `postgres`, `haproxy` and `pgbouncer` services should have increased four passing count.\n+\n+Connect to management administrative database, you should be able to see pre-created databases in `cfsb.instances` table from the new added service cluster.\n+\n+\n+## Add New Node to the Management Cluster\n+\n+We already have three nodes in the management cluster. This example shows you how to more management nodes by adding one more management node. Note that the management cluster should have odd number of nodes. The steps to modify `rdpg-warden-manifest.yml` and testing are as follows.\n+\n+### Modify the Manifest\n+\n+Modify the existing rdpgmc job block.\n+\n+Modify the number of instance from 3 to 4. \n+\n+```\n+  yaml\n+    - instances: 4\n+      name: rdpgmc\n+  ```\n+\n+Modify Network ips to what you use here, in this example we are adding `10.244.2.38`.\n+``` \n+yaml\n+    networks:\n+  - default:\n+    - dns\n+    - gateway\n+    name: rdpg\n+    static_ips:\n+     - 10.244.2.2\n+     - 10.244.2.6\n+     - 10.244.2.10\n+     - 10.244.2.38\n+```\n+\n+Modify the consul configure by adding the IP for the new node, here it is `10.244.2.38`.\n+```\n+yaml\n+    consul:\n+      debug: \"true\"\n+      join_node: 10.244.2.2\n+      join_nodes:\n+       - 10.244.2.2\n+       - 10.244.2.6\n+       - 10.244.2.10\n+       - 10.244.2.38\n+```\n+\n+Modify networks fields as follows.\n+\n+```\n+yaml\n+      - cloud_properties:\n+      name: random\n+    range: 10.244.2.36/30\n+    reserved:\n+     - 10.244.2.37\n+    static:\n+     - 10.244.2.38\n+```\n+\n+Increase resources_pools size accordingly, in this example we increase one (from 9 to 10) since we add one management node.\n+\n+```\n+yaml\n+    resource_pools:\n+     - cloud_properties:\n+       name: random\n+     name: rdpg\n+     network: rdpg\n+     size: 10\n+```\n+\n+### Testing ","path":"docs/scale-out.md","position":153,"original_position":153,"commit_id":"ab3e47b350dd7a47d20f2add07329049a8c006cd","original_commit_id":"ab3e47b350dd7a47d20f2add07329049a8c006cd","user":{"login":"wayneeseguin","id":18,"avatar_url":"https://avatars.githubusercontent.com/u/18?v=3","gravatar_id":"","url":"https://api.github.com/users/wayneeseguin","html_url":"https://github.com/wayneeseguin","followers_url":"https://api.github.com/users/wayneeseguin/followers","following_url":"https://api.github.com/users/wayneeseguin/following{/other_user}","gists_url":"https://api.github.com/users/wayneeseguin/gists{/gist_id}","starred_url":"https://api.github.com/users/wayneeseguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayneeseguin/subscriptions","organizations_url":"https://api.github.com/users/wayneeseguin/orgs","repos_url":"https://api.github.com/users/wayneeseguin/repos","events_url":"https://api.github.com/users/wayneeseguin/events{/privacy}","received_events_url":"https://api.github.com/users/wayneeseguin/received_events","type":"User","site_admin":false},"body":"Same comment.","created_at":"2015-07-31T17:27:08Z","updated_at":"2015-07-31T17:27:08Z","html_url":"https://github.com/starkandwayne/rdpg-boshrelease/pull/14#discussion_r35995315","pull_request_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/comments/35995315"},"html":{"href":"https://github.com/starkandwayne/rdpg-boshrelease/pull/14#discussion_r35995315"},"pull_request":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14","id":41195575,"html_url":"https://github.com/starkandwayne/rdpg-boshrelease/pull/14","diff_url":"https://github.com/starkandwayne/rdpg-boshrelease/pull/14.diff","patch_url":"https://github.com/starkandwayne/rdpg-boshrelease/pull/14.patch","issue_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/14","number":14,"state":"open","locked":false,"title":"refactoring scale out doc: using an example to explain it now","user":{"login":"xiujiao","id":4612749,"avatar_url":"https://avatars.githubusercontent.com/u/4612749?v=3","gravatar_id":"","url":"https://api.github.com/users/xiujiao","html_url":"https://github.com/xiujiao","followers_url":"https://api.github.com/users/xiujiao/followers","following_url":"https://api.github.com/users/xiujiao/following{/other_user}","gists_url":"https://api.github.com/users/xiujiao/gists{/gist_id}","starred_url":"https://api.github.com/users/xiujiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiujiao/subscriptions","organizations_url":"https://api.github.com/users/xiujiao/orgs","repos_url":"https://api.github.com/users/xiujiao/repos","events_url":"https://api.github.com/users/xiujiao/events{/privacy}","received_events_url":"https://api.github.com/users/xiujiao/received_events","type":"User","site_admin":false},"body":"refactor scale out document, using an successful example to explain it now","created_at":"2015-07-30T03:42:17Z","updated_at":"2015-07-31T17:27:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83adb6baf959c44623effa4117c1c52e16729b61","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14/commits","review_comments_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14/comments","review_comment_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/comments{/number}","comments_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/14/comments","statuses_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/statuses/ab3e47b350dd7a47d20f2add07329049a8c006cd","head":{"label":"starkandwayne:US38297-ScaleOut-Doc","ref":"US38297-ScaleOut-Doc","sha":"ab3e47b350dd7a47d20f2add07329049a8c006cd","user":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"repo":{"id":34574126,"name":"rdpg-boshrelease","full_name":"starkandwayne/rdpg-boshrelease","owner":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/starkandwayne/rdpg-boshrelease","description":"PG + BDR BOSH Release","fork":false,"url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease","forks_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/forks","keys_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/teams","hooks_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/hooks","issue_events_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/events{/number}","events_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/events","assignees_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/assignees{/user}","branches_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/branches{/branch}","tags_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/tags","blobs_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/refs{/sha}","trees_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/statuses/{sha}","languages_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/languages","stargazers_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/stargazers","contributors_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/contributors","subscribers_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/subscribers","subscription_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/subscription","commits_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/commits{/sha}","git_commits_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/commits{/sha}","comments_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/comments{/number}","issue_comment_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/comments{/number}","contents_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/contents/{+path}","compare_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/merges","archive_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/downloads","issues_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues{/number}","pulls_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls{/number}","milestones_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/milestones{/number}","notifications_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/labels{/name}","releases_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/releases{/id}","created_at":"2015-04-25T15:35:03Z","updated_at":"2015-07-29T02:33:36Z","pushed_at":"2015-07-30T14:30:00Z","git_url":"git://github.com/starkandwayne/rdpg-boshrelease.git","ssh_url":"git@github.com:starkandwayne/rdpg-boshrelease.git","clone_url":"https://github.com/starkandwayne/rdpg-boshrelease.git","svn_url":"https://github.com/starkandwayne/rdpg-boshrelease","homepage":null,"size":1628,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":4,"default_branch":"master"}},"base":{"label":"starkandwayne:master","ref":"master","sha":"4367af667d9f0a515867c9828b6b0d15147aff4e","user":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"repo":{"id":34574126,"name":"rdpg-boshrelease","full_name":"starkandwayne/rdpg-boshrelease","owner":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/starkandwayne/rdpg-boshrelease","description":"PG + BDR BOSH Release","fork":false,"url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease","forks_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/forks","keys_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/teams","hooks_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/hooks","issue_events_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/events{/number}","events_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/events","assignees_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/assignees{/user}","branches_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/branches{/branch}","tags_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/tags","blobs_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/refs{/sha}","trees_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/statuses/{sha}","languages_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/languages","stargazers_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/stargazers","contributors_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/contributors","subscribers_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/subscribers","subscription_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/subscription","commits_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/commits{/sha}","git_commits_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/git/commits{/sha}","comments_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/comments{/number}","issue_comment_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/comments{/number}","contents_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/contents/{+path}","compare_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/merges","archive_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/downloads","issues_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues{/number}","pulls_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls{/number}","milestones_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/milestones{/number}","notifications_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/labels{/name}","releases_url":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/releases{/id}","created_at":"2015-04-25T15:35:03Z","updated_at":"2015-07-29T02:33:36Z","pushed_at":"2015-07-30T14:30:00Z","git_url":"git://github.com/starkandwayne/rdpg-boshrelease.git","ssh_url":"git@github.com:starkandwayne/rdpg-boshrelease.git","clone_url":"https://github.com/starkandwayne/rdpg-boshrelease.git","svn_url":"https://github.com/starkandwayne/rdpg-boshrelease","homepage":null,"size":1628,"stargazers_count":4,"watchers_count":4,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14"},"html":{"href":"https://github.com/starkandwayne/rdpg-boshrelease/pull/14"},"issue":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/14"},"comments":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/starkandwayne/rdpg-boshrelease/statuses/ab3e47b350dd7a47d20f2add07329049a8c006cd"}}}}