{"action":"created","comment":{"url":"https://api.github.com/repos/koding/stacks/pulls/comments/84144018","pull_request_review_id":4940162,"id":84144018,"diff_hunk":"@@ -0,0 +1,310 @@\n+# Here is your stack preview\n+# You can make advanced changes like modifying your VM,\n+# installing packages, and running shell commands.\n+\n+provider:\n+  aws:\n+    access_key: '${var.aws_access_key}'\n+    secret_key: '${var.aws_secret_key}'\n+resource:\n+  aws_instance:\n+    master:\n+      instance_type: m4.2xlarge\n+      ami: ''\n+      root_block_device:\n+        volume_size: 50\n+      tags:\n+        Name: '${var.koding_user_username}-${var.koding_group_slug}'\n+      user_data: |-\n+        # :\n+        export DEBIAN_FRONTEND=noninteractive\n+        #setting the new source\n+        apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF\n+        DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')\n+        CODENAME=$(lsb_release -cs)\n+        echo \"deb http://repos.mesosphere.io/$DISTRO $CODENAME main\" | sudo tee \t/etc/apt/sources.list.d/mesosphere.list\n+        add-apt-repository ppa:openjdk-r/ppa\n+        \n+        #Updating packages\n+        apt-get update -y\n+        sleep 10\n+        apt-get install -y openjdk-8-jdk\n+        sleep 10\n+        update-alternatives --config java\n+        sleep 10\n+        update-alternatives --config javac\n+        sleep 10\n+        #installing Mesosphere\n+        sudo apt-get install -y mesosphere\n+        sleep 10\n+        #Getting the IP add\n+        IPVAR1=`ip addr | grep -Po '(?!(inet 127.\\d.\\d.1))(inet \\K(\\d{1,3}\\.){3}\\d{1,3})'`\n+        \n+        #modifying the Zookepper mesos file\n+        mkdir -p /var/zookeeper\n+        chown -R zookeeper /var/zookeeper\n+        echo \"zk://$IPVAR1:2181/mesos\" > /etc/mesos/zk\n+        echo \"1\" > /etc/zookeeper/conf/myid\n+        echo \"server.1=$IPVAR1:2888:3888\" > /etc/zookeeper/conf/zoo.cfg\n+        echo \"dataDir=/var/zookeeper\" >> /etc/zookeeper/conf/zoo.cfg\n+        echo \"clientPort=2181\" >> /etc/zookeeper/conf/zoo.cfg\n+\n+\n+        #Quorum Value Defaul=1\n+        #echo \"1\" > /etc/mesos-master/quorum\n+        echo $IPVAR1 > /etc/mesos-master/ip\n+        echo $IPVAR1 > /etc/mesos-master/hostname\n+        mkdir -p /etc/marathon/conf\n+        cp /etc/mesos-master/hostname /etc/marathon/conf\n+        cp /etc/mesos/zk /etc/marathon/conf/master\n+        sed 's/mesos/marathon/' /etc/marathon/conf/master > /etc/marathon/conf/zk\n+        echo 'docker,mesos' > /etc/mesos-slave/containerizers\n+        echo '5mins' > /etc/mesos-slave/executor_registration_timeout\n+        stop mesos-slave\n+        sleep 10\n+        echo \"manual\" | sudo tee /etc/init/mesos-slave.override\n+        stop zookeeper\n+        sleep 10\n+        start zookeeper\n+        sleep 10\n+        start mesos-master\n+        sleep 10\n+        start marathon\n+        \n+        apt-get install -y nginx\n+        rm /etc/nginx/sites-enabled/default\n+        echo \"server { listen 80; server_name ${var.koding_user_username}.mesosphere.live; location / { proxy_pass http://$IPVAR1:8080; }}\" >/etc/nginx/sites-enabled/marathon\n+        echo \"server { listen 80; server_name ${var.koding_user_username}-mesos.mesosphere.live; location / { proxy_pass http://$IPVAR1:5050; }}\" >/etc/nginx/sites-enabled/mesos\n+        service nginx restart\n+        \n+        PUBLIC_IP=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)\n+        \n+        wget https://github.com/mesosphere/mesos-dns/releases/download/v0.5.2/mesos-dns-v0.5.2-linux-amd64\n+        mv mesos-dns-v0.5.2-linux-amd64 /usr/local/sbin/mesos-dns\n+        chmod +x /usr/local/sbin/mesos-dns \n+        \n+        cat <<EOT >> /etc/mesos-dns-config.json\n+        {\n+          \"zk\": \"zk://$IPVAR1:2181/mesos\",\n+          \"masters\": [\"$IPVAR1:5050\"],\n+          \"refreshSeconds\": 60,\n+          \"ttl\": 60,\n+          \"domain\": \"mesos\",\n+          \"port\": 53,\n+          \"resolvers\": [\"8.8.8.8\"],\n+          \"timeout\": 5, \n+          \"httpon\": true,\n+          \"dnson\": true,\n+          \"httpport\": 8123,\n+          \"externalon\": true,\n+          \"listener\": \"0.0.0.0\",\n+          \"SOAMname\": \"ns1.mesos\",\n+          \"SOARname\": \"root.ns1.mesos\",\n+          \"SOARefresh\": 60,\n+          \"SOARetry\":   600,\n+          \"SOAExpire\":  86400,\n+          \"SOAMinttl\": 60,\n+          \"IPSources\": [\"mesos\", \"host\"]\n+        }\n+        EOT\n+        mesos-dns -config=/etc/mesos-dns-config.json & \n+        sed -i \"s/nameserver 10.0.0.2/nameserver $IPVAR1\\nnameserver 10.0.0.2/\" /etc/resolv.conf\n+        echo \"You can access the Marathon Web UI at http://${var.koding_user_username}.mesosphere.live\"\n+        echo \"\"\n+        echo \"You can access the Mesos Web UI at http://${var.koding_user_username}-mesos.mesosphere.live\"\n+        \n+        \n+    slave_1:","path":"mesos.yml","position":117,"original_position":117,"commit_id":"91ba256b337fd0d0af1556e46afe75e445957a18","original_commit_id":"bd9640b2253ce6a05e598b5e46d7e138b15f9b6e","user":{"login":"hectork01","id":20778330,"avatar_url":"https://avatars.githubusercontent.com/u/20778330?v=3","gravatar_id":"","url":"https://api.github.com/users/hectork01","html_url":"https://github.com/hectork01","followers_url":"https://api.github.com/users/hectork01/followers","following_url":"https://api.github.com/users/hectork01/following{/other_user}","gists_url":"https://api.github.com/users/hectork01/gists{/gist_id}","starred_url":"https://api.github.com/users/hectork01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hectork01/subscriptions","organizations_url":"https://api.github.com/users/hectork01/orgs","repos_url":"https://api.github.com/users/hectork01/repos","events_url":"https://api.github.com/users/hectork01/events{/privacy}","received_events_url":"https://api.github.com/users/hectork01/received_events","type":"User","site_admin":false},"body":"Yeah, it works flawlessly ","created_at":"2016-10-19T19:06:20Z","updated_at":"2016-10-19T19:06:20Z","html_url":"https://github.com/koding/stacks/pull/1#discussion_r84144018","pull_request_url":"https://api.github.com/repos/koding/stacks/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/koding/stacks/pulls/comments/84144018"},"html":{"href":"https://github.com/koding/stacks/pull/1#discussion_r84144018"},"pull_request":{"href":"https://api.github.com/repos/koding/stacks/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/koding/stacks/pulls/1","id":89305960,"html_url":"https://github.com/koding/stacks/pull/1","diff_url":"https://github.com/koding/stacks/pull/1.diff","patch_url":"https://github.com/koding/stacks/pull/1.patch","issue_url":"https://api.github.com/repos/koding/stacks/issues/1","number":1,"state":"open","locked":false,"title":"Just a few to start","user":{"login":"sibblegp","id":1026474,"avatar_url":"https://avatars.githubusercontent.com/u/1026474?v=3","gravatar_id":"","url":"https://api.github.com/users/sibblegp","html_url":"https://github.com/sibblegp","followers_url":"https://api.github.com/users/sibblegp/followers","following_url":"https://api.github.com/users/sibblegp/following{/other_user}","gists_url":"https://api.github.com/users/sibblegp/gists{/gist_id}","starred_url":"https://api.github.com/users/sibblegp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sibblegp/subscriptions","organizations_url":"https://api.github.com/users/sibblegp/orgs","repos_url":"https://api.github.com/users/sibblegp/repos","events_url":"https://api.github.com/users/sibblegp/events{/privacy}","received_events_url":"https://api.github.com/users/sibblegp/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-14T00:23:10Z","updated_at":"2016-10-19T19:06:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e23fdf4251b7809902b40bb53100549ad40d526","assignee":{"login":"gokmen","id":42368,"avatar_url":"https://avatars.githubusercontent.com/u/42368?v=3","gravatar_id":"","url":"https://api.github.com/users/gokmen","html_url":"https://github.com/gokmen","followers_url":"https://api.github.com/users/gokmen/followers","following_url":"https://api.github.com/users/gokmen/following{/other_user}","gists_url":"https://api.github.com/users/gokmen/gists{/gist_id}","starred_url":"https://api.github.com/users/gokmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gokmen/subscriptions","organizations_url":"https://api.github.com/users/gokmen/orgs","repos_url":"https://api.github.com/users/gokmen/repos","events_url":"https://api.github.com/users/gokmen/events{/privacy}","received_events_url":"https://api.github.com/users/gokmen/received_events","type":"User","site_admin":false},"assignees":[{"login":"gokmen","id":42368,"avatar_url":"https://avatars.githubusercontent.com/u/42368?v=3","gravatar_id":"","url":"https://api.github.com/users/gokmen","html_url":"https://github.com/gokmen","followers_url":"https://api.github.com/users/gokmen/followers","following_url":"https://api.github.com/users/gokmen/following{/other_user}","gists_url":"https://api.github.com/users/gokmen/gists{/gist_id}","starred_url":"https://api.github.com/users/gokmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gokmen/subscriptions","organizations_url":"https://api.github.com/users/gokmen/orgs","repos_url":"https://api.github.com/users/gokmen/repos","events_url":"https://api.github.com/users/gokmen/events{/privacy}","received_events_url":"https://api.github.com/users/gokmen/received_events","type":"User","site_admin":false},{"login":"szkl","id":1136739,"avatar_url":"https://avatars.githubusercontent.com/u/1136739?v=3","gravatar_id":"","url":"https://api.github.com/users/szkl","html_url":"https://github.com/szkl","followers_url":"https://api.github.com/users/szkl/followers","following_url":"https://api.github.com/users/szkl/following{/other_user}","gists_url":"https://api.github.com/users/szkl/gists{/gist_id}","starred_url":"https://api.github.com/users/szkl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szkl/subscriptions","organizations_url":"https://api.github.com/users/szkl/orgs","repos_url":"https://api.github.com/users/szkl/repos","events_url":"https://api.github.com/users/szkl/events{/privacy}","received_events_url":"https://api.github.com/users/szkl/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/koding/stacks/pulls/1/commits","review_comments_url":"https://api.github.com/repos/koding/stacks/pulls/1/comments","review_comment_url":"https://api.github.com/repos/koding/stacks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koding/stacks/issues/1/comments","statuses_url":"https://api.github.com/repos/koding/stacks/statuses/91ba256b337fd0d0af1556e46afe75e445957a18","head":{"label":"sibblegp:master","ref":"master","sha":"91ba256b337fd0d0af1556e46afe75e445957a18","user":{"login":"sibblegp","id":1026474,"avatar_url":"https://avatars.githubusercontent.com/u/1026474?v=3","gravatar_id":"","url":"https://api.github.com/users/sibblegp","html_url":"https://github.com/sibblegp","followers_url":"https://api.github.com/users/sibblegp/followers","following_url":"https://api.github.com/users/sibblegp/following{/other_user}","gists_url":"https://api.github.com/users/sibblegp/gists{/gist_id}","starred_url":"https://api.github.com/users/sibblegp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sibblegp/subscriptions","organizations_url":"https://api.github.com/users/sibblegp/orgs","repos_url":"https://api.github.com/users/sibblegp/repos","events_url":"https://api.github.com/users/sibblegp/events{/privacy}","received_events_url":"https://api.github.com/users/sibblegp/received_events","type":"User","site_admin":false},"repo":{"id":70858572,"name":"stacks","full_name":"sibblegp/stacks","owner":{"login":"sibblegp","id":1026474,"avatar_url":"https://avatars.githubusercontent.com/u/1026474?v=3","gravatar_id":"","url":"https://api.github.com/users/sibblegp","html_url":"https://github.com/sibblegp","followers_url":"https://api.github.com/users/sibblegp/followers","following_url":"https://api.github.com/users/sibblegp/following{/other_user}","gists_url":"https://api.github.com/users/sibblegp/gists{/gist_id}","starred_url":"https://api.github.com/users/sibblegp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sibblegp/subscriptions","organizations_url":"https://api.github.com/users/sibblegp/orgs","repos_url":"https://api.github.com/users/sibblegp/repos","events_url":"https://api.github.com/users/sibblegp/events{/privacy}","received_events_url":"https://api.github.com/users/sibblegp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sibblegp/stacks","description":null,"fork":true,"url":"https://api.github.com/repos/sibblegp/stacks","forks_url":"https://api.github.com/repos/sibblegp/stacks/forks","keys_url":"https://api.github.com/repos/sibblegp/stacks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sibblegp/stacks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sibblegp/stacks/teams","hooks_url":"https://api.github.com/repos/sibblegp/stacks/hooks","issue_events_url":"https://api.github.com/repos/sibblegp/stacks/issues/events{/number}","events_url":"https://api.github.com/repos/sibblegp/stacks/events","assignees_url":"https://api.github.com/repos/sibblegp/stacks/assignees{/user}","branches_url":"https://api.github.com/repos/sibblegp/stacks/branches{/branch}","tags_url":"https://api.github.com/repos/sibblegp/stacks/tags","blobs_url":"https://api.github.com/repos/sibblegp/stacks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sibblegp/stacks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sibblegp/stacks/git/refs{/sha}","trees_url":"https://api.github.com/repos/sibblegp/stacks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sibblegp/stacks/statuses/{sha}","languages_url":"https://api.github.com/repos/sibblegp/stacks/languages","stargazers_url":"https://api.github.com/repos/sibblegp/stacks/stargazers","contributors_url":"https://api.github.com/repos/sibblegp/stacks/contributors","subscribers_url":"https://api.github.com/repos/sibblegp/stacks/subscribers","subscription_url":"https://api.github.com/repos/sibblegp/stacks/subscription","commits_url":"https://api.github.com/repos/sibblegp/stacks/commits{/sha}","git_commits_url":"https://api.github.com/repos/sibblegp/stacks/git/commits{/sha}","comments_url":"https://api.github.com/repos/sibblegp/stacks/comments{/number}","issue_comment_url":"https://api.github.com/repos/sibblegp/stacks/issues/comments{/number}","contents_url":"https://api.github.com/repos/sibblegp/stacks/contents/{+path}","compare_url":"https://api.github.com/repos/sibblegp/stacks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sibblegp/stacks/merges","archive_url":"https://api.github.com/repos/sibblegp/stacks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sibblegp/stacks/downloads","issues_url":"https://api.github.com/repos/sibblegp/stacks/issues{/number}","pulls_url":"https://api.github.com/repos/sibblegp/stacks/pulls{/number}","milestones_url":"https://api.github.com/repos/sibblegp/stacks/milestones{/number}","notifications_url":"https://api.github.com/repos/sibblegp/stacks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sibblegp/stacks/labels{/name}","releases_url":"https://api.github.com/repos/sibblegp/stacks/releases{/id}","deployments_url":"https://api.github.com/repos/sibblegp/stacks/deployments","created_at":"2016-10-14T00:16:28Z","updated_at":"2016-10-14T00:15:38Z","pushed_at":"2016-10-14T00:35:23Z","git_url":"git://github.com/sibblegp/stacks.git","ssh_url":"git@github.com:sibblegp/stacks.git","clone_url":"https://github.com/sibblegp/stacks.git","svn_url":"https://github.com/sibblegp/stacks","homepage":null,"size":15,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"koding:master","ref":"master","sha":"6a6603344036500896540fef6f6a95d698845428","user":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"repo":{"id":70858525,"name":"stacks","full_name":"koding/stacks","owner":{"login":"koding","id":1066754,"avatar_url":"https://avatars.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koding/stacks","description":null,"fork":false,"url":"https://api.github.com/repos/koding/stacks","forks_url":"https://api.github.com/repos/koding/stacks/forks","keys_url":"https://api.github.com/repos/koding/stacks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koding/stacks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koding/stacks/teams","hooks_url":"https://api.github.com/repos/koding/stacks/hooks","issue_events_url":"https://api.github.com/repos/koding/stacks/issues/events{/number}","events_url":"https://api.github.com/repos/koding/stacks/events","assignees_url":"https://api.github.com/repos/koding/stacks/assignees{/user}","branches_url":"https://api.github.com/repos/koding/stacks/branches{/branch}","tags_url":"https://api.github.com/repos/koding/stacks/tags","blobs_url":"https://api.github.com/repos/koding/stacks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koding/stacks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koding/stacks/git/refs{/sha}","trees_url":"https://api.github.com/repos/koding/stacks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koding/stacks/statuses/{sha}","languages_url":"https://api.github.com/repos/koding/stacks/languages","stargazers_url":"https://api.github.com/repos/koding/stacks/stargazers","contributors_url":"https://api.github.com/repos/koding/stacks/contributors","subscribers_url":"https://api.github.com/repos/koding/stacks/subscribers","subscription_url":"https://api.github.com/repos/koding/stacks/subscription","commits_url":"https://api.github.com/repos/koding/stacks/commits{/sha}","git_commits_url":"https://api.github.com/repos/koding/stacks/git/commits{/sha}","comments_url":"https://api.github.com/repos/koding/stacks/comments{/number}","issue_comment_url":"https://api.github.com/repos/koding/stacks/issues/comments{/number}","contents_url":"https://api.github.com/repos/koding/stacks/contents/{+path}","compare_url":"https://api.github.com/repos/koding/stacks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koding/stacks/merges","archive_url":"https://api.github.com/repos/koding/stacks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koding/stacks/downloads","issues_url":"https://api.github.com/repos/koding/stacks/issues{/number}","pulls_url":"https://api.github.com/repos/koding/stacks/pulls{/number}","milestones_url":"https://api.github.com/repos/koding/stacks/milestones{/number}","notifications_url":"https://api.github.com/repos/koding/stacks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koding/stacks/labels{/name}","releases_url":"https://api.github.com/repos/koding/stacks/releases{/id}","deployments_url":"https://api.github.com/repos/koding/stacks/deployments","created_at":"2016-10-14T00:15:38Z","updated_at":"2016-10-14T00:15:38Z","pushed_at":"2016-10-17T21:08:17Z","git_url":"git://github.com/koding/stacks.git","ssh_url":"git@github.com:koding/stacks.git","clone_url":"https://github.com/koding/stacks.git","svn_url":"https://github.com/koding/stacks","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koding/stacks/pulls/1"},"html":{"href":"https://github.com/koding/stacks/pull/1"},"issue":{"href":"https://api.github.com/repos/koding/stacks/issues/1"},"comments":{"href":"https://api.github.com/repos/koding/stacks/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/koding/stacks/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/koding/stacks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koding/stacks/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/koding/stacks/statuses/91ba256b337fd0d0af1556e46afe75e445957a18"}}}}
{"actor":{"display_login":"hectork01"}}