{"action":"created","comment":{"url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/comments/84155333","pull_request_review_id":4950606,"id":84155333,"diff_hunk":"@@ -0,0 +1,80 @@\n+# Using named cluster configurations\n+\n+Oshinko uses a ConfigMap to store named cluster configurations.\n+This document describes how to add or edit named configurations and\n+how to use them with oshinko-rest.\n+\n+## The oshinko-cluster-configs ConfigMap\n+\n+The `tools/server-ui-template.yaml` creates a ConfigMap\n+named `oshinko-cluster-configs` which is read by oshinko-rest.\n+Any named cluster configuration defined in the ConfigMap\n+can be used to create or scale a cluster.\n+\n+The default ConfigMap contains one named configuration as\n+an example. The `small` configuration specifies a cluster\n+that has three worker nodes. The yaml for the ConfigMap\n+looks something like this:\n+\n+    kind: ConfigMap\n+    apiVersion: v1\n+    data:\n+      small.workercount: \"3\"\n+    metadata:\n+      name: oshinko-cluster-configs\n+\n+Named configurations are defined in the data section of the\n+ConfigMap. Currently `workercount` is the only parameter\n+which may be set for a configuration (`mastercount` may actually\n+be set but is constrained to a value of \"1\"). A parameter is set\n+using the name of the configuration followed by a dot and the name\n+of the parameter.\n+\n+To add a configuration called `large` with a `workercount` of\n+ten, the ConfigMap would be modified to look like this:\n+\n+    kind: ConfigMap\n+    apiVersion: v1\n+    data:\n+      small.workercount: \"3\"\n+      large.workercount: \"10\"\n+    metadata:\n+      name: oshinko-cluster-configs\n+\n+## Editing oshinko-cluster-configs\n+\n+The simplest way to edit oshinko-cluster-configs for a particular\n+project is to use the CLI:\n+\n+    $ oc edit configmap oshinko-cluster-configs\n+\n+From the OpenShift console oshinko-cluster-configs may be edited\n+by going to \"Resources -> other resources\" and selecting ConfigMap\n+as the resource type.\n+\n+There may be a short delay before configuration changes are visible\n+to the oshinko-rest pod.\n+\n+## The default configuration\n+\n+There is a default configuration named `default` which specifies a cluster\n+with one spark master and one spark worker. All cluster configurations\n+start with the values from `default` and then optionally update values. So\n+the `small` configuration shown above inherits values from `default` and\n+then modifies its own `workercount` to be three.\n+\n+Note, the `default` configuration itself can be modified in a project by\n+editing `oshinko-cluster-configs` and adding a definition for `default`.\n+\n+## Where configuration names may be used\n+\n+The name of a configuration may be passed as the OSHINKO_NAMED_CONFIG\n+environment variable when a spark application is launched from the\n+oshinko templates. If no name is given, the `default` configuration\n+will be used.\n+\n+The name of a configuration may also be passed in the json object\n+used to create or update a cluster through the REST endpoint,","path":"docs/ClusterConfigs.md","position":null,"original_position":77,"commit_id":"c26aa5c63961dd2c8f23e249041aeae0b447c7c1","original_commit_id":"2d6e5e9acbcac705be08563c928711c8897c4572","user":{"login":"tmckayus","id":1172537,"avatar_url":"https://avatars.githubusercontent.com/u/1172537?v=3","gravatar_id":"","url":"https://api.github.com/users/tmckayus","html_url":"https://github.com/tmckayus","followers_url":"https://api.github.com/users/tmckayus/followers","following_url":"https://api.github.com/users/tmckayus/following{/other_user}","gists_url":"https://api.github.com/users/tmckayus/gists{/gist_id}","starred_url":"https://api.github.com/users/tmckayus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmckayus/subscriptions","organizations_url":"https://api.github.com/users/tmckayus/orgs","repos_url":"https://api.github.com/users/tmckayus/repos","events_url":"https://api.github.com/users/tmckayus/events{/privacy}","received_events_url":"https://api.github.com/users/tmckayus/received_events","type":"User","site_admin":false},"body":"done","created_at":"2016-10-19T20:04:34Z","updated_at":"2016-10-19T20:04:34Z","html_url":"https://github.com/radanalyticsio/oshinko-rest/pull/83#discussion_r84155333","pull_request_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83","_links":{"self":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/comments/84155333"},"html":{"href":"https://github.com/radanalyticsio/oshinko-rest/pull/83#discussion_r84155333"},"pull_request":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83","id":87951177,"html_url":"https://github.com/radanalyticsio/oshinko-rest/pull/83","diff_url":"https://github.com/radanalyticsio/oshinko-rest/pull/83.diff","patch_url":"https://github.com/radanalyticsio/oshinko-rest/pull/83.patch","issue_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/issues/83","number":83,"state":"open","locked":false,"title":"Initial implementation for named cluster configs","user":{"login":"tmckayus","id":1172537,"avatar_url":"https://avatars.githubusercontent.com/u/1172537?v=3","gravatar_id":"","url":"https://api.github.com/users/tmckayus","html_url":"https://github.com/tmckayus","followers_url":"https://api.github.com/users/tmckayus/followers","following_url":"https://api.github.com/users/tmckayus/following{/other_user}","gists_url":"https://api.github.com/users/tmckayus/gists{/gist_id}","starred_url":"https://api.github.com/users/tmckayus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmckayus/subscriptions","organizations_url":"https://api.github.com/users/tmckayus/orgs","repos_url":"https://api.github.com/users/tmckayus/repos","events_url":"https://api.github.com/users/tmckayus/events{/privacy}","received_events_url":"https://api.github.com/users/tmckayus/received_events","type":"User","site_admin":false},"body":"This change adds a \"config\" object to the NewCluster model which\r\nnow contains the master and worker counts along with a name field.\r\nIf the name is set, oshinko will look for the named configuration at\r\n/etc/oshinko-cluster-configs and use that as the configuration for\r\nthe cluster with master and worker counts applied if they are\r\nnon-zero. For full details, see the cluster-configs.md spec\r\nin the oshinko-specs repo.","created_at":"2016-10-04T18:46:48Z","updated_at":"2016-10-19T20:04:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87c3ff4f809ca4c048053eec5db4fb574fe643dd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83/commits","review_comments_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83/comments","review_comment_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/issues/83/comments","statuses_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/statuses/c26aa5c63961dd2c8f23e249041aeae0b447c7c1","head":{"label":"tmckayus:configs","ref":"configs","sha":"c26aa5c63961dd2c8f23e249041aeae0b447c7c1","user":{"login":"tmckayus","id":1172537,"avatar_url":"https://avatars.githubusercontent.com/u/1172537?v=3","gravatar_id":"","url":"https://api.github.com/users/tmckayus","html_url":"https://github.com/tmckayus","followers_url":"https://api.github.com/users/tmckayus/followers","following_url":"https://api.github.com/users/tmckayus/following{/other_user}","gists_url":"https://api.github.com/users/tmckayus/gists{/gist_id}","starred_url":"https://api.github.com/users/tmckayus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmckayus/subscriptions","organizations_url":"https://api.github.com/users/tmckayus/orgs","repos_url":"https://api.github.com/users/tmckayus/repos","events_url":"https://api.github.com/users/tmckayus/events{/privacy}","received_events_url":"https://api.github.com/users/tmckayus/received_events","type":"User","site_admin":false},"repo":{"id":68620565,"name":"oshinko-rest","full_name":"tmckayus/oshinko-rest","owner":{"login":"tmckayus","id":1172537,"avatar_url":"https://avatars.githubusercontent.com/u/1172537?v=3","gravatar_id":"","url":"https://api.github.com/users/tmckayus","html_url":"https://github.com/tmckayus","followers_url":"https://api.github.com/users/tmckayus/followers","following_url":"https://api.github.com/users/tmckayus/following{/other_user}","gists_url":"https://api.github.com/users/tmckayus/gists{/gist_id}","starred_url":"https://api.github.com/users/tmckayus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmckayus/subscriptions","organizations_url":"https://api.github.com/users/tmckayus/orgs","repos_url":"https://api.github.com/users/tmckayus/repos","events_url":"https://api.github.com/users/tmckayus/events{/privacy}","received_events_url":"https://api.github.com/users/tmckayus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmckayus/oshinko-rest","description":"REST api for a spark cluster management app","fork":true,"url":"https://api.github.com/repos/tmckayus/oshinko-rest","forks_url":"https://api.github.com/repos/tmckayus/oshinko-rest/forks","keys_url":"https://api.github.com/repos/tmckayus/oshinko-rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmckayus/oshinko-rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmckayus/oshinko-rest/teams","hooks_url":"https://api.github.com/repos/tmckayus/oshinko-rest/hooks","issue_events_url":"https://api.github.com/repos/tmckayus/oshinko-rest/issues/events{/number}","events_url":"https://api.github.com/repos/tmckayus/oshinko-rest/events","assignees_url":"https://api.github.com/repos/tmckayus/oshinko-rest/assignees{/user}","branches_url":"https://api.github.com/repos/tmckayus/oshinko-rest/branches{/branch}","tags_url":"https://api.github.com/repos/tmckayus/oshinko-rest/tags","blobs_url":"https://api.github.com/repos/tmckayus/oshinko-rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmckayus/oshinko-rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmckayus/oshinko-rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmckayus/oshinko-rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmckayus/oshinko-rest/statuses/{sha}","languages_url":"https://api.github.com/repos/tmckayus/oshinko-rest/languages","stargazers_url":"https://api.github.com/repos/tmckayus/oshinko-rest/stargazers","contributors_url":"https://api.github.com/repos/tmckayus/oshinko-rest/contributors","subscribers_url":"https://api.github.com/repos/tmckayus/oshinko-rest/subscribers","subscription_url":"https://api.github.com/repos/tmckayus/oshinko-rest/subscription","commits_url":"https://api.github.com/repos/tmckayus/oshinko-rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmckayus/oshinko-rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmckayus/oshinko-rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmckayus/oshinko-rest/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmckayus/oshinko-rest/contents/{+path}","compare_url":"https://api.github.com/repos/tmckayus/oshinko-rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmckayus/oshinko-rest/merges","archive_url":"https://api.github.com/repos/tmckayus/oshinko-rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmckayus/oshinko-rest/downloads","issues_url":"https://api.github.com/repos/tmckayus/oshinko-rest/issues{/number}","pulls_url":"https://api.github.com/repos/tmckayus/oshinko-rest/pulls{/number}","milestones_url":"https://api.github.com/repos/tmckayus/oshinko-rest/milestones{/number}","notifications_url":"https://api.github.com/repos/tmckayus/oshinko-rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmckayus/oshinko-rest/labels{/name}","releases_url":"https://api.github.com/repos/tmckayus/oshinko-rest/releases{/id}","deployments_url":"https://api.github.com/repos/tmckayus/oshinko-rest/deployments","created_at":"2016-09-19T15:45:46Z","updated_at":"2016-09-19T15:45:48Z","pushed_at":"2016-10-19T20:04:00Z","git_url":"git://github.com/tmckayus/oshinko-rest.git","ssh_url":"git@github.com:tmckayus/oshinko-rest.git","clone_url":"https://github.com/tmckayus/oshinko-rest.git","svn_url":"https://github.com/tmckayus/oshinko-rest","homepage":null,"size":26512,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"radanalyticsio:master","ref":"master","sha":"a92a2c3400c541147c385b8d3af0b28be50cea16","user":{"login":"radanalyticsio","id":8729017,"avatar_url":"https://avatars.githubusercontent.com/u/8729017?v=3","gravatar_id":"","url":"https://api.github.com/users/radanalyticsio","html_url":"https://github.com/radanalyticsio","followers_url":"https://api.github.com/users/radanalyticsio/followers","following_url":"https://api.github.com/users/radanalyticsio/following{/other_user}","gists_url":"https://api.github.com/users/radanalyticsio/gists{/gist_id}","starred_url":"https://api.github.com/users/radanalyticsio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radanalyticsio/subscriptions","organizations_url":"https://api.github.com/users/radanalyticsio/orgs","repos_url":"https://api.github.com/users/radanalyticsio/repos","events_url":"https://api.github.com/users/radanalyticsio/events{/privacy}","received_events_url":"https://api.github.com/users/radanalyticsio/received_events","type":"Organization","site_admin":false},"repo":{"id":56718689,"name":"oshinko-rest","full_name":"radanalyticsio/oshinko-rest","owner":{"login":"radanalyticsio","id":8729017,"avatar_url":"https://avatars.githubusercontent.com/u/8729017?v=3","gravatar_id":"","url":"https://api.github.com/users/radanalyticsio","html_url":"https://github.com/radanalyticsio","followers_url":"https://api.github.com/users/radanalyticsio/followers","following_url":"https://api.github.com/users/radanalyticsio/following{/other_user}","gists_url":"https://api.github.com/users/radanalyticsio/gists{/gist_id}","starred_url":"https://api.github.com/users/radanalyticsio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radanalyticsio/subscriptions","organizations_url":"https://api.github.com/users/radanalyticsio/orgs","repos_url":"https://api.github.com/users/radanalyticsio/repos","events_url":"https://api.github.com/users/radanalyticsio/events{/privacy}","received_events_url":"https://api.github.com/users/radanalyticsio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/radanalyticsio/oshinko-rest","description":"REST api for a spark cluster management app","fork":false,"url":"https://api.github.com/repos/radanalyticsio/oshinko-rest","forks_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/forks","keys_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/teams","hooks_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/hooks","issue_events_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/issues/events{/number}","events_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/events","assignees_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/assignees{/user}","branches_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/branches{/branch}","tags_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/tags","blobs_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/statuses/{sha}","languages_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/languages","stargazers_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/stargazers","contributors_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/contributors","subscribers_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/subscribers","subscription_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/subscription","commits_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/issues/comments{/number}","contents_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/contents/{+path}","compare_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/merges","archive_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/downloads","issues_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/issues{/number}","pulls_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls{/number}","milestones_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/milestones{/number}","notifications_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/labels{/name}","releases_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/releases{/id}","deployments_url":"https://api.github.com/repos/radanalyticsio/oshinko-rest/deployments","created_at":"2016-04-20T20:26:50Z","updated_at":"2016-10-11T16:01:16Z","pushed_at":"2016-10-19T20:04:01Z","git_url":"git://github.com/radanalyticsio/oshinko-rest.git","ssh_url":"git@github.com:radanalyticsio/oshinko-rest.git","clone_url":"https://github.com/radanalyticsio/oshinko-rest.git","svn_url":"https://github.com/radanalyticsio/oshinko-rest","homepage":null,"size":26615,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":10,"forks":4,"open_issues":10,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83"},"html":{"href":"https://github.com/radanalyticsio/oshinko-rest/pull/83"},"issue":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/issues/83"},"comments":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/radanalyticsio/oshinko-rest/statuses/c26aa5c63961dd2c8f23e249041aeae0b447c7c1"}}}}
{"actor":{"display_login":"tmckayus"}}