{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/12213","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/12213/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/12213/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/12213/events","html_url":"https://github.com/openshift/origin/issues/12213","id":194790287,"number":12213,"title":"Proposal: Multi-stage \"oc cluster up\" process","user":{"login":"jawnsy","id":52710,"avatar_url":"https://avatars.githubusercontent.com/u/52710?v=3","gravatar_id":"","url":"https://api.github.com/users/jawnsy","html_url":"https://github.com/jawnsy","followers_url":"https://api.github.com/users/jawnsy/followers","following_url":"https://api.github.com/users/jawnsy/following{/other_user}","gists_url":"https://api.github.com/users/jawnsy/gists{/gist_id}","starred_url":"https://api.github.com/users/jawnsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jawnsy/subscriptions","organizations_url":"https://api.github.com/users/jawnsy/orgs","repos_url":"https://api.github.com/users/jawnsy/repos","events_url":"https://api.github.com/users/jawnsy/events{/privacy}","received_events_url":"https://api.github.com/users/jawnsy/received_events","type":"User","site_admin":false},"labels":[{"id":210275096,"url":"https://api.github.com/repos/openshift/origin/labels/area/reliability","name":"area/reliability","color":"006b75","default":false},{"id":200493322,"url":"https://api.github.com/repos/openshift/origin/labels/component/cli","name":"component/cli","color":"0052cc","default":false},{"id":210152331,"url":"https://api.github.com/repos/openshift/origin/labels/priority/P3","name":"priority/P3","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"assignees":[{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-12-10T20:00:35Z","updated_at":"2016-12-12T16:12:58Z","closed_at":null,"body":"##### Background\r\n\r\n\"oc cluster up\" works by pulling an origin image and running openshift via a container engine, which could be on the same system (`DOCKER_HOST=/var/run/docker.sock`) or a remote host (`DOCKER_HOST=https://1.2.3.4:5678`). Since `oc cluster up` is intended as a development and test tool, a local docker daemon is the most likely scenario, but there is support for remote daemons as well. This remote capability could be useful when running `oc` on a low-power laptop, since it allows a comparatively more powerful remote server to do most of the work (although in that case, a workaround could be to `ssh` into the target system and run `oc cluster up` from there).\r\n\r\n##### Current Behaviour\r\n\r\nToday, the `oc` binary contains much of the logic to bootstrap the openshift-in-container configuration. It has some [careful handling](https://github.com/openshift/origin/blob/master/pkg/bootstrap/docker/up.go#L899-L907) to ensure that things work correctly in the remote-DOCKER_HOST case: \r\n\r\n```go\r\n// First, try to get the host from the DOCKER_HOST if communicating via tcp\r\nvar err error\r\nip := c.DockerHelper().HostIP()\r\nif ip != \"\" {\r\n\tglog.V(2).Infof(\"Testing Docker host IP (%s)\", ip)\r\n\tif err = c.OpenShiftHelper().TestIP(ip); err == nil {\r\n\t\treturn ip, nil\r\n\t}\r\n}\r\n```\r\n\r\n##### Proposed Behaviour\r\n\r\nThis proposal suggests running `oc cluster up` code in multiple stages:\r\n\r\nStage 1: Find the docker daemon and connect to it\r\nStage 2: Pull an image containing \"oc cluster up\" code and run on the daemon (whether local or remote)\r\n\r\n##### Pros\r\n\r\n* We execute a single process on the remote docker host\r\n  * This would be Go code, so has access to libraries or execution of other processes as needed\r\n  * May improve performance, since only one container needs to be executed (instead of one per command, e.g. running `uname` or `hostname` or small bash scripts)\r\n* By running `oc cluster up` inside a container, the distinction between \"running locally\" and \"running remotely\" is removed, simplifying branches in the code.  The local \"oc\" binary would be responsible for streaming output from the \"oc cluster up\" command.\r\n* The origin image is expected to be available, and getting another container image shouldn't be a big deal.\r\n\r\n##### Cons\r\n\r\n* This may impact development velocity for `oc cluster up` itself, since testing would require building an updated image.\r\n* I don't know how this may impact with things like `docker machine`."},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/266472605","html_url":"https://github.com/openshift/origin/issues/12213#issuecomment-266472605","issue_url":"https://api.github.com/repos/openshift/origin/issues/12213","id":266472605,"user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T16:12:58Z","updated_at":"2016-12-12T16:12:58Z","body":"> We would stop being able to do that if we switched to using cluster up on the container completely.\r\n\r\nwell, you could still do it, but the \"oc cluster up\" behavior you'd get would be tied to the version of openshift you were bringing up, since the \"oc cluster up\" container would also be versioned, right?\r\n"}}
{"actor":{"display_login":"bparees"}}