{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/comments/196817890","pull_request_review_id":130442010,"id":196817890,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjgxNzg5MA==","diff_hunk":"@@ -17,192 +17,14 @@ MIME-Version: 1.0\n --==BOUNDARY==\n MIME-Version: 1.0\n Content-Type: text/cloud-config; charset=\"us-ascii\"\n-#cloud-config\n repo_update: true\n repo_upgrade: all\n \n --==BOUNDARY==\n MIME-Version: 1.0\n Content-Type: text/x-shellscript; charset=\"us-ascii\"\n-#!/bin/bash\n-sudo yum install perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https -y\n-sudo yum -y install perl-Digest-SHA perl-URI perl-libwww-perl perl-MIME-tools perl-Crypt-SSLeay perl-XML-LibXML unzip curl\n-mkdir -p /home/ec2-user/scripts\n-cd /home/ec2-user/scripts\n-curl https://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip -O\n-unzip CloudWatchMonitoringScripts-1.2.2.zip\n-rm CloudWatchMonitoringScripts-1.2.2.zip\n-mv aws-scripts-mon /home/ec2-user/scripts/mon\n-\n---==BOUNDARY==\n-MIME-Version: 1.0\n-Content-Type: text/x-shellscript; charset=\"us-ascii\"\n-#!/bin/bash\n-# Set up daily security updates\n-# Make sure the updates are done in a staggered manner during the night\n-# as we are updating the ECS agent too which requires docker daemon restart\n-\n-cat <<'EOF' > ./crontab\n-SHELL=/bin/bash\n-PATH=/sbin:/bin:/usr/sbin:/usr/bin\n-MAILTO=root\n-HOME=/\n-\n-# For details see man 4 crontabs\n-\n-# Example of job definition:\n-# .---------------- minute (0 - 59)\n-# |  .------------- hour (0 - 23)\n-# |  |  .---------- day of month (1 - 31)\n-# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...\n-# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat\n-# |  |  |  |  |\n-# *  *  *  *  * user-name command to be executed\n-\n-* * * * * root /home/ec2-user/scripts/mon/mon-put-instance-data.pl --mem-used --from-cron --mem-avail --swap-used --mem-used-incl-cache-buff\n-42 * * * * root   run-parts /etc/cron.hourly\n-12 ${count.index + 1} * * * root   run-parts /etc/cron.daily\n-\n-EOF\n-\n-sudo cp ./crontab /etc/crontab\n-\n-cat <<'EOF' > ./security-updates\n-#!/bin/bash\n-sudo yum update -y --security\n-sudo yum update -y ecs-init\n-sudo service docker restart\n-sleep 5\n-sudo start ecs\n-# Forcefully restart the instance if the docker daemon has failed to restart\n-# see https://github.com/docker/docker/issues/25382\n-docker ps || sudo reboot\n-\n-EOF\n-\n-chmod +x ./security-updates\n-sudo cp ./security-updates /etc/cron.daily\n-\n---==BOUNDARY==\n-MIME-Version: 1.0\n-Content-Type: text/x-shellscript; charset=\"us-ascii\"\n-#!/bin/bash\n-# Add extra users\n-\n-oldIFS=$IFS\n-IFS='|' read -r -a userlist <<< \"${join(\"|\", var.users)}\"\n-\n-for credentials in \"$${userlist[@]}\"; do\n-  IFS=';' read -r -a credsarray <<< $credentials\n-  username=\"$${credsarray[0]}\"\n-  sshkey=\"$${credsarray[1]}\"\n-\n-  sudo adduser \"$username\"\n-  sudo mkdir \"/home/$username/.ssh\"\n-  sudo chown \"$username:$username\" \"/home/$username/.ssh\"\n-  echo \"$sshkey\" > ./tempkey\n-  sudo mv ./tempkey \"/home/$username/.ssh/authorized_keys\"\n-  sudo chown \"$username:$username\" \"/home/$username/.ssh/authorized_keys\"\n-  sudo chmod 600 \"/home/$username/.ssh/authorized_keys\"\n-\n-done\n-\n-IFS=$oldIFS\n-\n---==BOUNDARY==\n-MIME-Version: 1.0\n-Content-Type: text/x-shellscript; charset=\"us-ascii\"\n-#!/bin/bash\n-# Set cluster name\n echo ECS_CLUSTER=${var.Env-Name}-frontend-cluster >> /etc/ecs/ecs.config","path":"govwifi-frontend/instances.tf","position":101,"original_position":101,"commit_id":"e74dfbcba0594cbfd87dbc3f9482816985ef7748","original_commit_id":"e74dfbcba0594cbfd87dbc3f9482816985ef7748","user":{"login":"adrianclay","id":976274,"node_id":"MDQ6VXNlcjk3NjI3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/976274?v=4","gravatar_id":"","url":"https://api.github.com/users/adrianclay","html_url":"https://github.com/adrianclay","followers_url":"https://api.github.com/users/adrianclay/followers","following_url":"https://api.github.com/users/adrianclay/following{/other_user}","gists_url":"https://api.github.com/users/adrianclay/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianclay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianclay/subscriptions","organizations_url":"https://api.github.com/users/adrianclay/orgs","repos_url":"https://api.github.com/users/adrianclay/repos","events_url":"https://api.github.com/users/adrianclay/events{/privacy}","received_events_url":"https://api.github.com/users/adrianclay/received_events","type":"User","site_admin":false},"body":"I'd leave a note about why you kept this around.","created_at":"2018-06-20T15:03:43Z","updated_at":"2018-06-20T15:03:43Z","html_url":"https://github.com/alphagov/govwifi-terraform/pull/74#discussion_r196817890","pull_request_url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/comments/196817890"},"html":{"href":"https://github.com/alphagov/govwifi-terraform/pull/74#discussion_r196817890"},"pull_request":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74","id":196171555,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MTcxNTU1","html_url":"https://github.com/alphagov/govwifi-terraform/pull/74","diff_url":"https://github.com/alphagov/govwifi-terraform/pull/74.diff","patch_url":"https://github.com/alphagov/govwifi-terraform/pull/74.patch","issue_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/74","number":74,"state":"open","locked":false,"title":"Move userdata to Ansible","user":{"login":"emileswarts","id":1215147,"node_id":"MDQ6VXNlcjEyMTUxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1215147?v=4","gravatar_id":"","url":"https://api.github.com/users/emileswarts","html_url":"https://github.com/emileswarts","followers_url":"https://api.github.com/users/emileswarts/followers","following_url":"https://api.github.com/users/emileswarts/following{/other_user}","gists_url":"https://api.github.com/users/emileswarts/gists{/gist_id}","starred_url":"https://api.github.com/users/emileswarts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emileswarts/subscriptions","organizations_url":"https://api.github.com/users/emileswarts/orgs","repos_url":"https://api.github.com/users/emileswarts/repos","events_url":"https://api.github.com/users/emileswarts/events{/privacy}","received_events_url":"https://api.github.com/users/emileswarts/received_events","type":"User","site_admin":false},"body":"In order to minimise downtime, we have moved the instance bootstrapping\r\nto Ansible.  This commit cleans up the userdata for the frontends which\r\nnow exists here: https://github.com/alphagov/govwifi-ansible","created_at":"2018-06-20T14:58:25Z","updated_at":"2018-06-20T15:03:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18d6929224e81e0a8ab91c93dce2be8abea27026","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74/commits","review_comments_url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74/comments","review_comment_url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/74/comments","statuses_url":"https://api.github.com/repos/alphagov/govwifi-terraform/statuses/e74dfbcba0594cbfd87dbc3f9482816985ef7748","head":{"label":"alphagov:clean_user_data","ref":"clean_user_data","sha":"e74dfbcba0594cbfd87dbc3f9482816985ef7748","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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":83412971,"node_id":"MDEwOlJlcG9zaXRvcnk4MzQxMjk3MQ==","name":"govwifi-terraform","full_name":"alphagov/govwifi-terraform","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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/govwifi-terraform","description":"Terraform scripts to provision the GovWifi infrastructure on AWS","fork":false,"url":"https://api.github.com/repos/alphagov/govwifi-terraform","forks_url":"https://api.github.com/repos/alphagov/govwifi-terraform/forks","keys_url":"https://api.github.com/repos/alphagov/govwifi-terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govwifi-terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govwifi-terraform/teams","hooks_url":"https://api.github.com/repos/alphagov/govwifi-terraform/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govwifi-terraform/events","assignees_url":"https://api.github.com/repos/alphagov/govwifi-terraform/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govwifi-terraform/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govwifi-terraform/tags","blobs_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govwifi-terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govwifi-terraform/languages","stargazers_url":"https://api.github.com/repos/alphagov/govwifi-terraform/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govwifi-terraform/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govwifi-terraform/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govwifi-terraform/subscription","commits_url":"https://api.github.com/repos/alphagov/govwifi-terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govwifi-terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govwifi-terraform/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govwifi-terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govwifi-terraform/merges","archive_url":"https://api.github.com/repos/alphagov/govwifi-terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govwifi-terraform/downloads","issues_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govwifi-terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govwifi-terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govwifi-terraform/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govwifi-terraform/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govwifi-terraform/deployments","created_at":"2017-02-28T09:16:12Z","updated_at":"2018-06-19T14:04:49Z","pushed_at":"2018-06-20T15:00:21Z","git_url":"git://github.com/alphagov/govwifi-terraform.git","ssh_url":"git@github.com:alphagov/govwifi-terraform.git","clone_url":"https://github.com/alphagov/govwifi-terraform.git","svn_url":"https://github.com/alphagov/govwifi-terraform","homepage":null,"size":137,"stargazers_count":1,"watchers_count":1,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"16fdf95b85a50045acedb5522c151b1486e00e12","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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":83412971,"node_id":"MDEwOlJlcG9zaXRvcnk4MzQxMjk3MQ==","name":"govwifi-terraform","full_name":"alphagov/govwifi-terraform","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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/govwifi-terraform","description":"Terraform scripts to provision the GovWifi infrastructure on AWS","fork":false,"url":"https://api.github.com/repos/alphagov/govwifi-terraform","forks_url":"https://api.github.com/repos/alphagov/govwifi-terraform/forks","keys_url":"https://api.github.com/repos/alphagov/govwifi-terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govwifi-terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govwifi-terraform/teams","hooks_url":"https://api.github.com/repos/alphagov/govwifi-terraform/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govwifi-terraform/events","assignees_url":"https://api.github.com/repos/alphagov/govwifi-terraform/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govwifi-terraform/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govwifi-terraform/tags","blobs_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govwifi-terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govwifi-terraform/languages","stargazers_url":"https://api.github.com/repos/alphagov/govwifi-terraform/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govwifi-terraform/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govwifi-terraform/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govwifi-terraform/subscription","commits_url":"https://api.github.com/repos/alphagov/govwifi-terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govwifi-terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govwifi-terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govwifi-terraform/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govwifi-terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govwifi-terraform/merges","archive_url":"https://api.github.com/repos/alphagov/govwifi-terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govwifi-terraform/downloads","issues_url":"https://api.github.com/repos/alphagov/govwifi-terraform/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govwifi-terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govwifi-terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govwifi-terraform/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govwifi-terraform/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govwifi-terraform/deployments","created_at":"2017-02-28T09:16:12Z","updated_at":"2018-06-19T14:04:49Z","pushed_at":"2018-06-20T15:00:21Z","git_url":"git://github.com/alphagov/govwifi-terraform.git","ssh_url":"git@github.com:alphagov/govwifi-terraform.git","clone_url":"https://github.com/alphagov/govwifi-terraform.git","svn_url":"https://github.com/alphagov/govwifi-terraform","homepage":null,"size":137,"stargazers_count":1,"watchers_count":1,"language":"HCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74"},"html":{"href":"https://github.com/alphagov/govwifi-terraform/pull/74"},"issue":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/74"},"comments":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govwifi-terraform/statuses/e74dfbcba0594cbfd87dbc3f9482816985ef7748"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"adrianclay"}}