{"action":"created","comment":{"url":"https://api.github.com/repos/minishift/minishift/pulls/comments/91299142","pull_request_review_id":11806851,"id":91299142,"diff_hunk":"@@ -0,0 +1,293 @@\n+/*\n+Copyright (C) 2016 Red Hat, Inc.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+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+// This provisioner only for RHEL/CentOS iso which created to consume\n+// with minishift\n+\n+package cluster\n+\n+import (\n+\t\"bytes\"\n+\t\"bufio\"\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"text/template\"\n+\t\"strings\"\n+\t\"path\"\n+\t\"os\"\n+\t\"syscall\"\n+\n+\t\"github.com/docker/machine/libmachine/auth\"\n+\t\"github.com/docker/machine/libmachine/drivers\"\n+\t\"github.com/docker/machine/libmachine/engine\"\n+\t\"github.com/docker/machine/libmachine/log\"\n+\t\"github.com/docker/machine/libmachine/mcnutils\"\n+\t\"github.com/docker/machine/libmachine/provision/pkgaction\"\n+\t\"github.com/docker/machine/libmachine/swarm\"\n+\t\"github.com/docker/machine/libmachine/provision\"\n+\n+\t\"golang.org/x/crypto/ssh/terminal\"\n+)\n+\n+var (\n+\tengineConfigTemplateRHEL = `[Unit]\n+Description=Docker Application Container Engine\n+After=network.target rc-local.service\n+Requires=rhel-push-plugin.socket\n+\n+[Service]\n+Type=notify\n+ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:{{.DockerPort}} -H unix:///var/run/docker.sock \\\n+           --authorization-plugin rhel-push-plugin\n+           --storage-driver devicemapper --tlsverify --tlscacert {{.AuthOptions.CaCertRemotePath}} \\\n+           --tlscert {{.AuthOptions.ServerCertRemotePath}} --tlskey {{.AuthOptions.ServerKeyRemotePath}} \\\n+           {{ range .EngineOptions.Labels }}--label {{.}} {{ end }}{{ range .EngineOptions.InsecureRegistry }}--insecure-registry {{.}} {{ end }}{{ range .EngineOptions.RegistryMirror }}--registry-mirror {{.}} {{ end }}{{ range .EngineOptions.ArbitraryFlags }}--{{.}} {{ end }}\n+ExecReload=/bin/kill -s HUP $MAINPID\n+MountFlags=slave\n+LimitNOFILE=infinity\n+LimitNPROC=infinity\n+LimitCORE=infinity\n+TimeoutStartSec=0\n+Delegate=yes\n+KillMode=process\n+Environment={{range .EngineOptions.Env}}{{ printf \"%q\" . }} {{end}}\n+\n+[Install]\n+WantedBy=multi-user.target\n+`\n+\tengineConfigTemplateCentOS = `[Unit]\n+Description=Docker Application Container Engine\n+After=network.target rc-local.service\n+\n+[Service]\n+Type=notify\n+ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:{{.DockerPort}} -H unix:///var/run/docker.sock \\\n+           --storage-driver devicemapper --tlsverify --tlscacert {{.AuthOptions.CaCertRemotePath}} \\\n+           --tlscert {{.AuthOptions.ServerCertRemotePath}} --tlskey {{.AuthOptions.ServerKeyRemotePath}} \\\n+           {{ range .EngineOptions.Labels }}--label {{.}} {{ end }}{{ range .EngineOptions.InsecureRegistry }}--insecure-registry {{.}} {{ end }}{{ range .EngineOptions.RegistryMirror }}--registry-mirror {{.}} {{ end }}{{ range .EngineOptions.ArbitraryFlags }}--{{.}} {{ end }}\n+ExecReload=/bin/kill -s HUP $MAINPID\n+MountFlags=slave\n+LimitNOFILE=infinity\n+LimitNPROC=infinity\n+LimitCORE=infinity\n+TimeoutStartSec=0\n+Delegate=yes\n+KillMode=process\n+Environment={{range .EngineOptions.Env}}{{ printf \"%q\" . }} {{end}}\n+\n+[Install]\n+WantedBy=multi-user.target\n+`\n+)\n+\n+func init() {","path":"pkg/minikube/cluster/cluster_provisioner.go","position":96,"original_position":96,"commit_id":"7c743fd5386aa870aa3ff6ba51e7b45c7af9a5ae","original_commit_id":"7c743fd5386aa870aa3ff6ba51e7b45c7af9a5ae","user":{"login":"hferentschik","id":296354,"avatar_url":"https://avatars.githubusercontent.com/u/296354?v=3","gravatar_id":"","url":"https://api.github.com/users/hferentschik","html_url":"https://github.com/hferentschik","followers_url":"https://api.github.com/users/hferentschik/followers","following_url":"https://api.github.com/users/hferentschik/following{/other_user}","gists_url":"https://api.github.com/users/hferentschik/gists{/gist_id}","starred_url":"https://api.github.com/users/hferentschik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hferentschik/subscriptions","organizations_url":"https://api.github.com/users/hferentschik/orgs","repos_url":"https://api.github.com/users/hferentschik/repos","events_url":"https://api.github.com/users/hferentschik/events{/privacy}","received_events_url":"https://api.github.com/users/hferentschik/received_events","type":"User","site_admin":false},"body":"> Best to only use init for side-effect imports, otherwise do explicit call to register it in a public function.\r\n\r\n+1","created_at":"2016-12-07T14:08:57Z","updated_at":"2016-12-07T14:08:57Z","html_url":"https://github.com/minishift/minishift/pull/181#discussion_r91299142","pull_request_url":"https://api.github.com/repos/minishift/minishift/pulls/181","_links":{"self":{"href":"https://api.github.com/repos/minishift/minishift/pulls/comments/91299142"},"html":{"href":"https://github.com/minishift/minishift/pull/181#discussion_r91299142"},"pull_request":{"href":"https://api.github.com/repos/minishift/minishift/pulls/181"}}},"pull_request":{"url":"https://api.github.com/repos/minishift/minishift/pulls/181","id":96913221,"html_url":"https://github.com/minishift/minishift/pull/181","diff_url":"https://github.com/minishift/minishift/pull/181.diff","patch_url":"https://github.com/minishift/minishift/pull/181.patch","issue_url":"https://api.github.com/repos/minishift/minishift/issues/181","number":181,"state":"open","locked":false,"title":"[WIP] Add custom provisioner for minishift iso based on RHEL/CentOS","user":{"login":"praveenkumar","id":410007,"avatar_url":"https://avatars.githubusercontent.com/u/410007?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenkumar","html_url":"https://github.com/praveenkumar","followers_url":"https://api.github.com/users/praveenkumar/followers","following_url":"https://api.github.com/users/praveenkumar/following{/other_user}","gists_url":"https://api.github.com/users/praveenkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenkumar/subscriptions","organizations_url":"https://api.github.com/users/praveenkumar/orgs","repos_url":"https://api.github.com/users/praveenkumar/repos","events_url":"https://api.github.com/users/praveenkumar/events{/privacy}","received_events_url":"https://api.github.com/users/praveenkumar/received_events","type":"User","site_admin":false},"body":"Fix for issue #136\r\n\r\nThis patch will add a custom provisioner for our minishift/rhel iso. I will include test around it also. Currently it's just to get feedback about the approach. \r\n\r\nTODO\r\n=====\r\n\r\n- Have to add subscription username/password as command line arguments\r\n- Put some test in place (mostly docker machine have some test around provisioner)\r\n- Provide images to test this PR\r\n     - For CentOS you can create images using https://github.com/minishift/minishift-centos-iso \r\n- Modification as per review.","created_at":"2016-12-07T12:21:13Z","updated_at":"2016-12-07T14:08:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ad4d1814ff6df4cf650c25a9b516a90d53ef419","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/minishift/minishift/pulls/181/commits","review_comments_url":"https://api.github.com/repos/minishift/minishift/pulls/181/comments","review_comment_url":"https://api.github.com/repos/minishift/minishift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minishift/minishift/issues/181/comments","statuses_url":"https://api.github.com/repos/minishift/minishift/statuses/7c743fd5386aa870aa3ff6ba51e7b45c7af9a5ae","head":{"label":"praveenkumar:fix_136","ref":"fix_136","sha":"7c743fd5386aa870aa3ff6ba51e7b45c7af9a5ae","user":{"login":"praveenkumar","id":410007,"avatar_url":"https://avatars.githubusercontent.com/u/410007?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenkumar","html_url":"https://github.com/praveenkumar","followers_url":"https://api.github.com/users/praveenkumar/followers","following_url":"https://api.github.com/users/praveenkumar/following{/other_user}","gists_url":"https://api.github.com/users/praveenkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenkumar/subscriptions","organizations_url":"https://api.github.com/users/praveenkumar/orgs","repos_url":"https://api.github.com/users/praveenkumar/repos","events_url":"https://api.github.com/users/praveenkumar/events{/privacy}","received_events_url":"https://api.github.com/users/praveenkumar/received_events","type":"User","site_admin":false},"repo":{"id":74443040,"name":"minishift","full_name":"praveenkumar/minishift","owner":{"login":"praveenkumar","id":410007,"avatar_url":"https://avatars.githubusercontent.com/u/410007?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenkumar","html_url":"https://github.com/praveenkumar","followers_url":"https://api.github.com/users/praveenkumar/followers","following_url":"https://api.github.com/users/praveenkumar/following{/other_user}","gists_url":"https://api.github.com/users/praveenkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenkumar/subscriptions","organizations_url":"https://api.github.com/users/praveenkumar/orgs","repos_url":"https://api.github.com/users/praveenkumar/repos","events_url":"https://api.github.com/users/praveenkumar/events{/privacy}","received_events_url":"https://api.github.com/users/praveenkumar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/praveenkumar/minishift","description":null,"fork":true,"url":"https://api.github.com/repos/praveenkumar/minishift","forks_url":"https://api.github.com/repos/praveenkumar/minishift/forks","keys_url":"https://api.github.com/repos/praveenkumar/minishift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praveenkumar/minishift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praveenkumar/minishift/teams","hooks_url":"https://api.github.com/repos/praveenkumar/minishift/hooks","issue_events_url":"https://api.github.com/repos/praveenkumar/minishift/issues/events{/number}","events_url":"https://api.github.com/repos/praveenkumar/minishift/events","assignees_url":"https://api.github.com/repos/praveenkumar/minishift/assignees{/user}","branches_url":"https://api.github.com/repos/praveenkumar/minishift/branches{/branch}","tags_url":"https://api.github.com/repos/praveenkumar/minishift/tags","blobs_url":"https://api.github.com/repos/praveenkumar/minishift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praveenkumar/minishift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praveenkumar/minishift/git/refs{/sha}","trees_url":"https://api.github.com/repos/praveenkumar/minishift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praveenkumar/minishift/statuses/{sha}","languages_url":"https://api.github.com/repos/praveenkumar/minishift/languages","stargazers_url":"https://api.github.com/repos/praveenkumar/minishift/stargazers","contributors_url":"https://api.github.com/repos/praveenkumar/minishift/contributors","subscribers_url":"https://api.github.com/repos/praveenkumar/minishift/subscribers","subscription_url":"https://api.github.com/repos/praveenkumar/minishift/subscription","commits_url":"https://api.github.com/repos/praveenkumar/minishift/commits{/sha}","git_commits_url":"https://api.github.com/repos/praveenkumar/minishift/git/commits{/sha}","comments_url":"https://api.github.com/repos/praveenkumar/minishift/comments{/number}","issue_comment_url":"https://api.github.com/repos/praveenkumar/minishift/issues/comments{/number}","contents_url":"https://api.github.com/repos/praveenkumar/minishift/contents/{+path}","compare_url":"https://api.github.com/repos/praveenkumar/minishift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praveenkumar/minishift/merges","archive_url":"https://api.github.com/repos/praveenkumar/minishift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praveenkumar/minishift/downloads","issues_url":"https://api.github.com/repos/praveenkumar/minishift/issues{/number}","pulls_url":"https://api.github.com/repos/praveenkumar/minishift/pulls{/number}","milestones_url":"https://api.github.com/repos/praveenkumar/minishift/milestones{/number}","notifications_url":"https://api.github.com/repos/praveenkumar/minishift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praveenkumar/minishift/labels{/name}","releases_url":"https://api.github.com/repos/praveenkumar/minishift/releases{/id}","deployments_url":"https://api.github.com/repos/praveenkumar/minishift/deployments","created_at":"2016-11-22T06:46:12Z","updated_at":"2016-11-22T06:46:15Z","pushed_at":"2016-12-07T12:16:53Z","git_url":"git://github.com/praveenkumar/minishift.git","ssh_url":"git@github.com:praveenkumar/minishift.git","clone_url":"https://github.com/praveenkumar/minishift.git","svn_url":"https://github.com/praveenkumar/minishift","homepage":null,"size":131981,"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":"minishift:cluster-up","ref":"cluster-up","sha":"b44ad66cf5984b12cf61b0d446171dfcff16cfba","user":{"login":"minishift","id":23212309,"avatar_url":"https://avatars.githubusercontent.com/u/23212309?v=3","gravatar_id":"","url":"https://api.github.com/users/minishift","html_url":"https://github.com/minishift","followers_url":"https://api.github.com/users/minishift/followers","following_url":"https://api.github.com/users/minishift/following{/other_user}","gists_url":"https://api.github.com/users/minishift/gists{/gist_id}","starred_url":"https://api.github.com/users/minishift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minishift/subscriptions","organizations_url":"https://api.github.com/users/minishift/orgs","repos_url":"https://api.github.com/users/minishift/repos","events_url":"https://api.github.com/users/minishift/events{/privacy}","received_events_url":"https://api.github.com/users/minishift/received_events","type":"Organization","site_admin":false},"repo":{"id":62728051,"name":"minishift","full_name":"minishift/minishift","owner":{"login":"minishift","id":23212309,"avatar_url":"https://avatars.githubusercontent.com/u/23212309?v=3","gravatar_id":"","url":"https://api.github.com/users/minishift","html_url":"https://github.com/minishift","followers_url":"https://api.github.com/users/minishift/followers","following_url":"https://api.github.com/users/minishift/following{/other_user}","gists_url":"https://api.github.com/users/minishift/gists{/gist_id}","starred_url":"https://api.github.com/users/minishift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minishift/subscriptions","organizations_url":"https://api.github.com/users/minishift/orgs","repos_url":"https://api.github.com/users/minishift/repos","events_url":"https://api.github.com/users/minishift/events{/privacy}","received_events_url":"https://api.github.com/users/minishift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minishift/minishift","description":"Run OpenShift locally","fork":false,"url":"https://api.github.com/repos/minishift/minishift","forks_url":"https://api.github.com/repos/minishift/minishift/forks","keys_url":"https://api.github.com/repos/minishift/minishift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minishift/minishift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minishift/minishift/teams","hooks_url":"https://api.github.com/repos/minishift/minishift/hooks","issue_events_url":"https://api.github.com/repos/minishift/minishift/issues/events{/number}","events_url":"https://api.github.com/repos/minishift/minishift/events","assignees_url":"https://api.github.com/repos/minishift/minishift/assignees{/user}","branches_url":"https://api.github.com/repos/minishift/minishift/branches{/branch}","tags_url":"https://api.github.com/repos/minishift/minishift/tags","blobs_url":"https://api.github.com/repos/minishift/minishift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minishift/minishift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minishift/minishift/git/refs{/sha}","trees_url":"https://api.github.com/repos/minishift/minishift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minishift/minishift/statuses/{sha}","languages_url":"https://api.github.com/repos/minishift/minishift/languages","stargazers_url":"https://api.github.com/repos/minishift/minishift/stargazers","contributors_url":"https://api.github.com/repos/minishift/minishift/contributors","subscribers_url":"https://api.github.com/repos/minishift/minishift/subscribers","subscription_url":"https://api.github.com/repos/minishift/minishift/subscription","commits_url":"https://api.github.com/repos/minishift/minishift/commits{/sha}","git_commits_url":"https://api.github.com/repos/minishift/minishift/git/commits{/sha}","comments_url":"https://api.github.com/repos/minishift/minishift/comments{/number}","issue_comment_url":"https://api.github.com/repos/minishift/minishift/issues/comments{/number}","contents_url":"https://api.github.com/repos/minishift/minishift/contents/{+path}","compare_url":"https://api.github.com/repos/minishift/minishift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minishift/minishift/merges","archive_url":"https://api.github.com/repos/minishift/minishift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minishift/minishift/downloads","issues_url":"https://api.github.com/repos/minishift/minishift/issues{/number}","pulls_url":"https://api.github.com/repos/minishift/minishift/pulls{/number}","milestones_url":"https://api.github.com/repos/minishift/minishift/milestones{/number}","notifications_url":"https://api.github.com/repos/minishift/minishift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minishift/minishift/labels{/name}","releases_url":"https://api.github.com/repos/minishift/minishift/releases{/id}","deployments_url":"https://api.github.com/repos/minishift/minishift/deployments","created_at":"2016-07-06T14:37:20Z","updated_at":"2016-12-07T11:35:08Z","pushed_at":"2016-12-07T12:21:13Z","git_url":"git://github.com/minishift/minishift.git","ssh_url":"git@github.com:minishift/minishift.git","clone_url":"https://github.com/minishift/minishift.git","svn_url":"https://github.com/minishift/minishift","homepage":"","size":132003,"stargazers_count":97,"watchers_count":97,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":27,"mirror_url":null,"open_issues_count":56,"forks":27,"open_issues":56,"watchers":97,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minishift/minishift/pulls/181"},"html":{"href":"https://github.com/minishift/minishift/pull/181"},"issue":{"href":"https://api.github.com/repos/minishift/minishift/issues/181"},"comments":{"href":"https://api.github.com/repos/minishift/minishift/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/minishift/minishift/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/minishift/minishift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minishift/minishift/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/minishift/minishift/statuses/7c743fd5386aa870aa3ff6ba51e7b45c7af9a5ae"}}}}
{"actor":{"display_login":"hferentschik"}}