{"action":"created","issue":{"url":"https://api.github.com/repos/JeroenSoeters/wheel/issues/15","repository_url":"https://api.github.com/repos/JeroenSoeters/wheel","labels_url":"https://api.github.com/repos/JeroenSoeters/wheel/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/JeroenSoeters/wheel/issues/15/comments","events_url":"https://api.github.com/repos/JeroenSoeters/wheel/issues/15/events","html_url":"https://github.com/JeroenSoeters/wheel/issues/15","id":205295596,"number":15,"title":"Create DC/OS users","user":{"login":"JeroenSoeters","id":2222966,"avatar_url":"https://avatars.githubusercontent.com/u/2222966?v=3","gravatar_id":"","url":"https://api.github.com/users/JeroenSoeters","html_url":"https://github.com/JeroenSoeters","followers_url":"https://api.github.com/users/JeroenSoeters/followers","following_url":"https://api.github.com/users/JeroenSoeters/following{/other_user}","gists_url":"https://api.github.com/users/JeroenSoeters/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroenSoeters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroenSoeters/subscriptions","organizations_url":"https://api.github.com/users/JeroenSoeters/orgs","repos_url":"https://api.github.com/users/JeroenSoeters/repos","events_url":"https://api.github.com/users/JeroenSoeters/events{/privacy}","received_events_url":"https://api.github.com/users/JeroenSoeters/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-03T23:15:51Z","updated_at":"2017-02-06T22:06:20Z","closed_at":null,"body":"The way we did this before is by putting the users directly into ZK (which is what DC/OS uses under the covers). ZK is currently not exposed (it lives on the Mesos master on port 2181). We could expose it and create the users directly for now and implement a more secure way of doing this later, or if anyone knows a good approach for doing this secure from the start please go ahead."},"comment":{"url":"https://api.github.com/repos/JeroenSoeters/wheel/issues/comments/277829406","html_url":"https://github.com/JeroenSoeters/wheel/issues/15#issuecomment-277829406","issue_url":"https://api.github.com/repos/JeroenSoeters/wheel/issues/15","id":277829406,"user":{"login":"JeroenSoeters","id":2222966,"avatar_url":"https://avatars.githubusercontent.com/u/2222966?v=3","gravatar_id":"","url":"https://api.github.com/users/JeroenSoeters","html_url":"https://github.com/JeroenSoeters","followers_url":"https://api.github.com/users/JeroenSoeters/followers","following_url":"https://api.github.com/users/JeroenSoeters/following{/other_user}","gists_url":"https://api.github.com/users/JeroenSoeters/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroenSoeters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroenSoeters/subscriptions","organizations_url":"https://api.github.com/users/JeroenSoeters/orgs","repos_url":"https://api.github.com/users/JeroenSoeters/repos","events_url":"https://api.github.com/users/JeroenSoeters/events{/privacy}","received_events_url":"https://api.github.com/users/JeroenSoeters/received_events","type":"User","site_admin":false},"created_at":"2017-02-06T22:06:20Z","updated_at":"2017-02-06T22:06:20Z","body":"Seems like the following might be a feasible way of implementing this:\r\n\r\nWe can change the CloudFormation template to download Ansible and execute an Ansible playbook that we make publicly available somewhere. That playbook can be parameterized with the users that should be created, which can be configured in Wheel and injected into the CloudFormation template as parameters. \r\n\r\nThis is the task we created before to insert the users into ZK:\r\n\r\n` 1 - name: Install Python pip\r\n  2   yum: name=python-pip state=installed\r\n  3\r\n  4 - name: Install Python kazoo module\r\n  5   pip: name=kazoo\r\n  6\r\n  7 - name: Waiting for zookeper to be available\r\n  8   wait_for: host={{ item }} port=2181\r\n  9   with_items: \"{{ groups['dcos-mesos-master'] }}\"\r\n 10\r\n 11 - name: Provision dcos user\r\n 12   znode:\r\n 13     hosts: \"{{ groups['dcos-mesos-master'][0] | regex_replace('^(.*)$', '\\\\1:2181') }}\"\r\n 14     name: \"/dcos/users/{{ item }}\"\r\n 15     value: \"{{ item }}\"\r\n 16     state: present\r\n 17   with_items: \"{{ dcos_users }}\"`"}}
{"actor":{"display_login":"JeroenSoeters"}}