{"action":"created","issue":{"url":"https://api.github.com/repos/open-craft/opencraft/issues/147","repository_url":"https://api.github.com/repos/open-craft/opencraft","labels_url":"https://api.github.com/repos/open-craft/opencraft/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/open-craft/opencraft/issues/147/comments","events_url":"https://api.github.com/repos/open-craft/opencraft/issues/147/events","html_url":"https://github.com/open-craft/opencraft/pull/147","id":185508403,"number":147,"title":"Add secret key generation to OpenCraft IM","user":{"login":"haikuginger","id":7773758,"avatar_url":"https://avatars.githubusercontent.com/u/7773758?v=3","gravatar_id":"","url":"https://api.github.com/users/haikuginger","html_url":"https://github.com/haikuginger","followers_url":"https://api.github.com/users/haikuginger/followers","following_url":"https://api.github.com/users/haikuginger/following{/other_user}","gists_url":"https://api.github.com/users/haikuginger/gists{/gist_id}","starred_url":"https://api.github.com/users/haikuginger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haikuginger/subscriptions","organizations_url":"https://api.github.com/users/haikuginger/orgs","repos_url":"https://api.github.com/users/haikuginger/repos","events_url":"https://api.github.com/users/haikuginger/events{/privacy}","received_events_url":"https://api.github.com/users/haikuginger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-26T20:58:38Z","updated_at":"2016-10-30T12:10:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/open-craft/opencraft/pulls/147","html_url":"https://github.com/open-craft/opencraft/pull/147","diff_url":"https://github.com/open-craft/opencraft/pull/147.diff","patch_url":"https://github.com/open-craft/opencraft/pull/147.patch"},"body":"This PR adds logic to automatically generate secret keys for a variety of services populated by OpenCraft IM.\r\n\r\n**Dependencies**: None\r\n\r\n**Testing instructions**:\r\n\r\n1. Using a copy of OCIM as it exists right now, set up an instance and spawn an appserver. There's no need to wait for the appserver to provision; just look at the appserver's vars and observe that items like `EDXAPP_EDXAPP_SECRET_KEY` are not present.\r\n\r\n2. Pull this branch into your existing OCIM instance and migrate it.\r\n\r\n3. Spawn a new appserver on the existing instance. Again, no need to wait for it to provision; just look at the vars in OCIM and observe that items like `EDXAPP_EDXAPP_SECRET_KEY` are still missing - for instances that don't have a master secret key set, we don't want to change things.\r\n\r\n4. Create a new instance and spawn an appserver. Observe that variables like `EDXAPP_EDXAPP_SECRET_KEY` and `FORUM_API_KEY` are populated with seemingly-random values.\r\n\r\n5. Spawn a new appserver on the same instance; observe that its secret key vars have the same values as the first one.\r\n\r\n**Author notes and concerns**:\r\n\r\n1. The current setup is a little awkward. Because the secret keys are derived based on the variable names, we need to have those names in source, not just in a template. I explored other options, but the current setup is robust and allowed me to get the code deployed. I am very open to suggestions on how to improve it - one thought I had was by feeding in the secret keys we're interested in filling as environment variables and building the YAML string entirely in Python, but that seems a bit obfuscated.\r\n\r\n**Reviewers**\r\n- [ ] @bradenmacdonald \r\n"},"comment":{"url":"https://api.github.com/repos/open-craft/opencraft/issues/comments/257147439","html_url":"https://github.com/open-craft/opencraft/pull/147#issuecomment-257147439","issue_url":"https://api.github.com/repos/open-craft/opencraft/issues/147","id":257147439,"user":{"login":"haikuginger","id":7773758,"avatar_url":"https://avatars.githubusercontent.com/u/7773758?v=3","gravatar_id":"","url":"https://api.github.com/users/haikuginger","html_url":"https://github.com/haikuginger","followers_url":"https://api.github.com/users/haikuginger/followers","following_url":"https://api.github.com/users/haikuginger/following{/other_user}","gists_url":"https://api.github.com/users/haikuginger/gists{/gist_id}","starred_url":"https://api.github.com/users/haikuginger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haikuginger/subscriptions","organizations_url":"https://api.github.com/users/haikuginger/orgs","repos_url":"https://api.github.com/users/haikuginger/repos","events_url":"https://api.github.com/users/haikuginger/events{/privacy}","received_events_url":"https://api.github.com/users/haikuginger/received_events","type":"User","site_admin":false},"created_at":"2016-10-30T12:10:44Z","updated_at":"2016-10-30T12:10:44Z","body":"Rebased and squashed from 2ef71a22c494afa414cbb3311e5cf40bf558f8ba, which had a green build. @bradenmacdonald, formal 👍 please."}}
{"actor":{"display_login":"haikuginger"}}