{"action":"closed","number":50,"pull_request":{"url":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/50","id":49834947,"html_url":"https://github.com/alphagov/multicloud-deploy/pull/50","diff_url":"https://github.com/alphagov/multicloud-deploy/pull/50.diff","patch_url":"https://github.com/alphagov/multicloud-deploy/pull/50.patch","issue_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/50","number":50,"state":"closed","locked":false,"title":"[#106184714] deploy tsuru trial on aws","user":{"login":"mtekel","id":483891,"avatar_url":"https://avatars.githubusercontent.com/u/483891?v=3","gravatar_id":"","url":"https://api.github.com/users/mtekel","html_url":"https://github.com/mtekel","followers_url":"https://api.github.com/users/mtekel/followers","following_url":"https://api.github.com/users/mtekel/following{/other_user}","gists_url":"https://api.github.com/users/mtekel/gists{/gist_id}","starred_url":"https://api.github.com/users/mtekel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtekel/subscriptions","organizations_url":"https://api.github.com/users/mtekel/orgs","repos_url":"https://api.github.com/users/mtekel/repos","events_url":"https://api.github.com/users/mtekel/events{/privacy}","received_events_url":"https://api.github.com/users/mtekel/received_events","type":"User","site_admin":false},"body":"## What?\r\n\r\nWe would like to deploy tsuru trial environment using jenkins. Whenever CI smoke tests succeed, indicating that the (latest) changes applied didn't break CI, we want to update TRIAL environment as well.\r\n\r\n## How?\r\n\r\nThis is achieved by doing these changes and adjustments:\r\n* terraform deploy job is parametrized to work on only one cloud provider (this enables us to have TRIAL environment in AWS only)\r\n* existing terraform jobs are split into two - one for AWS, one for GCE deployment\r\n* terraform job is updated to be triggerable by other jobs\r\n* trial jobs are created and pipeline configured (CI smoketests -> TRIAL TF -> TRIAL ansible)\r\n\r\n## Testing\r\n\r\nUse vagrant (`make vagrant-up` or simply `vagrant up`). Be aware that if you really want to test the jobs they will actually build the trial environment which can take some time. You just need to enable all the jobs of the pipeline (see few lines above) and start the CI smoke test job.\r\n\r\n## Who?\r\n\r\nAnyone from the team can review and merge this PR but @Jonty or @mtekel.\r\n\r\n# DEPLOYING TO JENKINS\r\n\r\nAfter merging this PR, the changes should be applied against our jenkins server. Do it in this order:\r\n\r\n1. run ansible. This will create the new jobs.\r\n2. copy terraform state files from old terraform jobs to new ones:\r\n  -  CI terraform/aws/ci-terraform.tfstate to CI terraform-aws/aws/ci-terraform.tfstate\r\n  -  CI terraform/gce/ci-terraform.tfstate to CI terraform-gce/gce/ci-terraform.tfstate\r\n  -  In case demo environment exists at the time of the merge, do the same for DEMO terraform job\r\n3. Remove terraform job definitions from dsl job - delete:\r\n  -   `/var/lib/jenkins/jobs/default-dsl-job/workspace/jobs/ci-terraform-deploy`\r\n  -   `/var/lib/jenkins/jobs/default-dsl-job/workspace/jobs/demo-terraform-deploy`\r\nOtherwise the jobs would get re-created every time you run the dsl job (which is at least every time you run ansible).\r\n4. Verify that terraform state files have been transferred correctly by running new TF jobs. They should do no changes to the environments.\r\n5. You can now delete old CI and DEMO terraform jobs directly from jenkins.\r\n\r\n**MAKE SURE YOU DON'T LOSE STATE OF EXISTING ENVIRONMENTS**\r\nA good suggestion is to make additional backup of the state files.","created_at":"2015-11-05T15:05:53Z","updated_at":"2015-11-05T16:45:01Z","closed_at":"2015-11-05T16:45:01Z","merged_at":"2015-11-05T16:45:01Z","merge_commit_sha":"ec05db2ef958eaf27588ce0046277586c366179a","assignee":{"login":"actionjack","id":485400,"avatar_url":"https://avatars.githubusercontent.com/u/485400?v=3","gravatar_id":"","url":"https://api.github.com/users/actionjack","html_url":"https://github.com/actionjack","followers_url":"https://api.github.com/users/actionjack/followers","following_url":"https://api.github.com/users/actionjack/following{/other_user}","gists_url":"https://api.github.com/users/actionjack/gists{/gist_id}","starred_url":"https://api.github.com/users/actionjack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/actionjack/subscriptions","organizations_url":"https://api.github.com/users/actionjack/orgs","repos_url":"https://api.github.com/users/actionjack/repos","events_url":"https://api.github.com/users/actionjack/events{/privacy}","received_events_url":"https://api.github.com/users/actionjack/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/50/commits","review_comments_url":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/50/comments","review_comment_url":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/50/comments","statuses_url":"https://api.github.com/repos/alphagov/multicloud-deploy/statuses/2ecfd2339b32ffff394f9860e71b5ea360759f3e","head":{"label":"alphagov:106184714-deploy-tsuru-trial-aws","ref":"106184714-deploy-tsuru-trial-aws","sha":"2ecfd2339b32ffff394f9860e71b5ea360759f3e","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":35106902,"name":"multicloud-deploy","full_name":"alphagov/multicloud-deploy","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/multicloud-deploy","description":"","fork":false,"url":"https://api.github.com/repos/alphagov/multicloud-deploy","forks_url":"https://api.github.com/repos/alphagov/multicloud-deploy/forks","keys_url":"https://api.github.com/repos/alphagov/multicloud-deploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/multicloud-deploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/multicloud-deploy/teams","hooks_url":"https://api.github.com/repos/alphagov/multicloud-deploy/hooks","issue_events_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/multicloud-deploy/events","assignees_url":"https://api.github.com/repos/alphagov/multicloud-deploy/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/multicloud-deploy/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/multicloud-deploy/tags","blobs_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/multicloud-deploy/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/multicloud-deploy/languages","stargazers_url":"https://api.github.com/repos/alphagov/multicloud-deploy/stargazers","contributors_url":"https://api.github.com/repos/alphagov/multicloud-deploy/contributors","subscribers_url":"https://api.github.com/repos/alphagov/multicloud-deploy/subscribers","subscription_url":"https://api.github.com/repos/alphagov/multicloud-deploy/subscription","commits_url":"https://api.github.com/repos/alphagov/multicloud-deploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/multicloud-deploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/multicloud-deploy/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/multicloud-deploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/multicloud-deploy/merges","archive_url":"https://api.github.com/repos/alphagov/multicloud-deploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/multicloud-deploy/downloads","issues_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/multicloud-deploy/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/multicloud-deploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/multicloud-deploy/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/multicloud-deploy/releases{/id}","created_at":"2015-05-05T15:06:52Z","updated_at":"2015-07-24T21:23:44Z","pushed_at":"2015-11-05T16:45:01Z","git_url":"git://github.com/alphagov/multicloud-deploy.git","ssh_url":"git@github.com:alphagov/multicloud-deploy.git","clone_url":"https://github.com/alphagov/multicloud-deploy.git","svn_url":"https://github.com/alphagov/multicloud-deploy","homepage":null,"size":1100,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"cb3ca24a8504386b670677614517a361ec7a9aa9","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":35106902,"name":"multicloud-deploy","full_name":"alphagov/multicloud-deploy","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/multicloud-deploy","description":"","fork":false,"url":"https://api.github.com/repos/alphagov/multicloud-deploy","forks_url":"https://api.github.com/repos/alphagov/multicloud-deploy/forks","keys_url":"https://api.github.com/repos/alphagov/multicloud-deploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/multicloud-deploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/multicloud-deploy/teams","hooks_url":"https://api.github.com/repos/alphagov/multicloud-deploy/hooks","issue_events_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/multicloud-deploy/events","assignees_url":"https://api.github.com/repos/alphagov/multicloud-deploy/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/multicloud-deploy/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/multicloud-deploy/tags","blobs_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/multicloud-deploy/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/multicloud-deploy/languages","stargazers_url":"https://api.github.com/repos/alphagov/multicloud-deploy/stargazers","contributors_url":"https://api.github.com/repos/alphagov/multicloud-deploy/contributors","subscribers_url":"https://api.github.com/repos/alphagov/multicloud-deploy/subscribers","subscription_url":"https://api.github.com/repos/alphagov/multicloud-deploy/subscription","commits_url":"https://api.github.com/repos/alphagov/multicloud-deploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/multicloud-deploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/multicloud-deploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/multicloud-deploy/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/multicloud-deploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/multicloud-deploy/merges","archive_url":"https://api.github.com/repos/alphagov/multicloud-deploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/multicloud-deploy/downloads","issues_url":"https://api.github.com/repos/alphagov/multicloud-deploy/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/multicloud-deploy/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/multicloud-deploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/multicloud-deploy/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/multicloud-deploy/releases{/id}","created_at":"2015-05-05T15:06:52Z","updated_at":"2015-07-24T21:23:44Z","pushed_at":"2015-11-05T16:45:01Z","git_url":"git://github.com/alphagov/multicloud-deploy.git","ssh_url":"git@github.com:alphagov/multicloud-deploy.git","clone_url":"https://github.com/alphagov/multicloud-deploy.git","svn_url":"https://github.com/alphagov/multicloud-deploy","homepage":null,"size":1100,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/50"},"html":{"href":"https://github.com/alphagov/multicloud-deploy/pull/50"},"issue":{"href":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/50"},"comments":{"href":"https://api.github.com/repos/alphagov/multicloud-deploy/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/multicloud-deploy/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/multicloud-deploy/statuses/2ecfd2339b32ffff394f9860e71b5ea360759f3e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"actionjack","id":485400,"avatar_url":"https://avatars.githubusercontent.com/u/485400?v=3","gravatar_id":"","url":"https://api.github.com/users/actionjack","html_url":"https://github.com/actionjack","followers_url":"https://api.github.com/users/actionjack/followers","following_url":"https://api.github.com/users/actionjack/following{/other_user}","gists_url":"https://api.github.com/users/actionjack/gists{/gist_id}","starred_url":"https://api.github.com/users/actionjack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/actionjack/subscriptions","organizations_url":"https://api.github.com/users/actionjack/orgs","repos_url":"https://api.github.com/users/actionjack/repos","events_url":"https://api.github.com/users/actionjack/events{/privacy}","received_events_url":"https://api.github.com/users/actionjack/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":4,"additions":56,"deletions":27,"changed_files":3}}