{"action":"created","issue":{"url":"https://api.github.com/repos/open-craft/opencraft/issues/63","repository_url":"https://api.github.com/repos/open-craft/opencraft","labels_url":"https://api.github.com/repos/open-craft/opencraft/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/open-craft/opencraft/issues/63/comments","events_url":"https://api.github.com/repos/open-craft/opencraft/issues/63/events","html_url":"https://github.com/open-craft/opencraft/pull/63","id":151552040,"number":63,"title":"OC-1541: Keep the old instance running while deploying a new one","user":{"login":"bradenmacdonald","id":945577,"avatar_url":"https://avatars.githubusercontent.com/u/945577?v=3","gravatar_id":"","url":"https://api.github.com/users/bradenmacdonald","html_url":"https://github.com/bradenmacdonald","followers_url":"https://api.github.com/users/bradenmacdonald/followers","following_url":"https://api.github.com/users/bradenmacdonald/following{/other_user}","gists_url":"https://api.github.com/users/bradenmacdonald/gists{/gist_id}","starred_url":"https://api.github.com/users/bradenmacdonald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradenmacdonald/subscriptions","organizations_url":"https://api.github.com/users/bradenmacdonald/orgs","repos_url":"https://api.github.com/users/bradenmacdonald/repos","events_url":"https://api.github.com/users/bradenmacdonald/events{/privacy}","received_events_url":"https://api.github.com/users/bradenmacdonald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-28T05:23:57Z","updated_at":"2016-05-07T09:43:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/open-craft/opencraft/pulls/63","html_url":"https://github.com/open-craft/opencraft/pull/63","diff_url":"https://github.com/open-craft/opencraft/pull/63.diff","patch_url":"https://github.com/open-craft/opencraft/pull/63.patch"},"body":"**This is WIP**. Everything is broken (on purpose).\r\n\r\nChanges:\r\n- Fix occasional pylint warning about undocumented Meta classes\r\n- Combine LogEntry classes\r\n    * ^ These two commits have been copied to #67 so they can be reviewed more easily and merged sooner\r\n- Separated `[OpenEdX]Instance` into `Instance` (long-lived, mutable, creates AppServers and marks one as active), and `AppServer` (immutable, owns one VM)\r\n- Factored Open edX specific code into `OpenEdXInstance` and `OpenEdXAppServer` respectively\r\n- Factored Open edX specific code out of the ansible mixin\r\n- Change the ansible mixin so it can optionally run multiple playbooks\r\n- Removed `instance.last_provisioning_started` since you can compute that from the most recent `AppServer.created` field\r\n- Combined `forum_version`, `notifier_version`, `xqueue_version`, and `certs_version` into a single `openedx_release` setting, since these were always set to the same value, and if one needs to be set differently it can be done using ansible_extra_settings anyways.\r\n- Separated PR-watching code to a separate app (`OpenEdXInstance` should not need to know about pull requests)\r\n- Updated API\r\n- Allows provisioning a new AppServer at any time\r\n\r\nTODO:\r\n- Update UI to use new API\r\n- Add back the auto-retry code when auto-provisioning a PR?\r\n- API for PR-related information\r\n- Update tests\r\n\r\n\r\nSuggestions for future work:\r\n- Allow stopping an AppServer build\r\n- Allow use of OpenCraft IM without specifying GitHub orgs/repos to watch), i.e. with the new `pr_watch` app disabled\r\n- Add Terminated state to the AppServer classes"},"comment":{"url":"https://api.github.com/repos/open-craft/opencraft/issues/comments/217623032","html_url":"https://github.com/open-craft/opencraft/pull/63#issuecomment-217623032","issue_url":"https://api.github.com/repos/open-craft/opencraft/issues/63","id":217623032,"user":{"login":"itsjeyd","id":961441,"avatar_url":"https://avatars.githubusercontent.com/u/961441?v=3","gravatar_id":"","url":"https://api.github.com/users/itsjeyd","html_url":"https://github.com/itsjeyd","followers_url":"https://api.github.com/users/itsjeyd/followers","following_url":"https://api.github.com/users/itsjeyd/following{/other_user}","gists_url":"https://api.github.com/users/itsjeyd/gists{/gist_id}","starred_url":"https://api.github.com/users/itsjeyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsjeyd/subscriptions","organizations_url":"https://api.github.com/users/itsjeyd/orgs","repos_url":"https://api.github.com/users/itsjeyd/repos","events_url":"https://api.github.com/users/itsjeyd/events{/privacy}","received_events_url":"https://api.github.com/users/itsjeyd/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T09:43:10Z","updated_at":"2016-05-07T09:43:10Z","body":"@bradenmacdonald Update: The new AppServer provisioned successfully and the DNS switched over afterwards :)"}}