{"action":"created","comment":{"url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/comments/143200335","pull_request_review_id":67680620,"id":143200335,"diff_hunk":"@@ -0,0 +1,284 @@\n+/**\n+ * Copyright (c) 2016-2017 Snowplow Analytics Ltd.\n+ * All rights reserved.\n+ *\n+ * This program is licensed to you under the Apache License Version 2.0,\n+ * and you may not use this file except in compliance with the Apache\n+ * License Version 2.0.\n+ * You may obtain a copy of the Apache License Version 2.0 at\n+ * http://www.apache.org/licenses/LICENSE-2.0.\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the Apache License Version 2.0 is distributed\n+ * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n+ * either express or implied.\n+ *\n+ * See the Apache License Version 2.0 for the specific language\n+ * governing permissions and limitations there under.\n+ */\n+\n+package main\n+\n+import (\n+  \"io\"\n+  \"net/http\"\n+  \"log\"\n+  \"os\"\n+  \"flag\"\n+  \"io/ioutil\"\n+  \"github.com/BurntSushi/toml\"\n+)\n+\n+var configPath string\n+var config ControlPlaneConfig\n+\n+func main() {\n+  configFlag := flag.String(\"config\", \"\", \"Control Plane API config file\")\n+  flag.Parse()\n+  configPath = *configFlag\n+\n+  if _, err := toml.DecodeFile(configPath, &config); err != nil {\n+    panic(err)\n+  }\n+\n+  http.HandleFunc(\"/restart-services\", restartServices)\n+  http.HandleFunc(\"/enrichments\", uploadEnrichments)\n+  http.HandleFunc(\"/external-iglu\", addExternalIgluServer)\n+  http.HandleFunc(\"/local-iglu-apikey\", addLocalIgluApikey)\n+  http.HandleFunc(\"/credentials\", changeUsernameAndPassword)\n+  http.HandleFunc(\"/domain-name\", addDomainName)\n+  http.HandleFunc(\"/version\", getSpminiVersion)\n+  log.Fatal(http.ListenAndServe(\":10000\", nil))\n+}\n+\n+func restartServices(resp http.ResponseWriter, req *http.Request) {\n+  if (req.Method == \"PUT\") {\n+    err := restartSPServices()\n+    if err != nil {\n+      http.Error(resp, err.Error(), 500)\n+      return\n+    } else {\n+      resp.WriteHeader(http.StatusOK)\n+      io.WriteString(resp, \"OK\")\n+    }\n+  }\n+}\n+\n+func uploadEnrichments(resp http.ResponseWriter, req *http.Request) {\n+  if req.Method == \"POST\" {","path":"provisioning/resources/control-plane/main.go","position":68,"original_position":68,"commit_id":"e32dc43103c3d43201ed52de88111ef75dbee58a","original_commit_id":"e32dc43103c3d43201ed52de88111ef75dbee58a","user":{"login":"aldemirenes","id":10391898,"avatar_url":"https://avatars3.githubusercontent.com/u/10391898?v=4","gravatar_id":"","url":"https://api.github.com/users/aldemirenes","html_url":"https://github.com/aldemirenes","followers_url":"https://api.github.com/users/aldemirenes/followers","following_url":"https://api.github.com/users/aldemirenes/following{/other_user}","gists_url":"https://api.github.com/users/aldemirenes/gists{/gist_id}","starred_url":"https://api.github.com/users/aldemirenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldemirenes/subscriptions","organizations_url":"https://api.github.com/users/aldemirenes/orgs","repos_url":"https://api.github.com/users/aldemirenes/repos","events_url":"https://api.github.com/users/aldemirenes/events{/privacy}","received_events_url":"https://api.github.com/users/aldemirenes/received_events","type":"User","site_admin":false},"body":"It return empty response, is this okay ?","created_at":"2017-10-06T14:13:06Z","updated_at":"2017-10-06T14:13:06Z","html_url":"https://github.com/snowplow/snowplow-mini/pull/129#discussion_r143200335","pull_request_url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/comments/143200335"},"html":{"href":"https://github.com/snowplow/snowplow-mini/pull/129#discussion_r143200335"},"pull_request":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129"}},"in_reply_to_id":143154722},"pull_request":{"url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129","id":139536723,"html_url":"https://github.com/snowplow/snowplow-mini/pull/129","diff_url":"https://github.com/snowplow/snowplow-mini/pull/129.diff","patch_url":"https://github.com/snowplow/snowplow-mini/pull/129.patch","issue_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues/129","number":129,"state":"open","locked":false,"title":"V0.4.0","user":{"login":"aldemirenes","id":10391898,"avatar_url":"https://avatars3.githubusercontent.com/u/10391898?v=4","gravatar_id":"","url":"https://api.github.com/users/aldemirenes","html_url":"https://github.com/aldemirenes","followers_url":"https://api.github.com/users/aldemirenes/followers","following_url":"https://api.github.com/users/aldemirenes/following{/other_user}","gists_url":"https://api.github.com/users/aldemirenes/gists{/gist_id}","starred_url":"https://api.github.com/users/aldemirenes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldemirenes/subscriptions","organizations_url":"https://api.github.com/users/aldemirenes/orgs","repos_url":"https://api.github.com/users/aldemirenes/repos","events_url":"https://api.github.com/users/aldemirenes/events{/privacy}","received_events_url":"https://api.github.com/users/aldemirenes/received_events","type":"User","site_admin":false},"body":"I am still working on v0.4.0, I opened this PR to just show the progress. Also, binaries of stream enrich and stream collector are placed in the repo for now because their new versions with NSQ support are not published yet. After publish them, binaries will be removed from repo. ","created_at":"2017-09-06T11:25:26Z","updated_at":"2017-10-06T14:13:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65bebd06776de9ec525eb795ff7136aa3eb7b16e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/snowplow/snowplow-mini/milestones/14","html_url":"https://github.com/snowplow/snowplow-mini/milestone/14","labels_url":"https://api.github.com/repos/snowplow/snowplow-mini/milestones/14/labels","id":2619312,"number":14,"title":"Version 0.4.0","description":"","creator":{"login":"alexanderdean","id":200511,"avatar_url":"https://avatars0.githubusercontent.com/u/200511?v=4","gravatar_id":"","url":"https://api.github.com/users/alexanderdean","html_url":"https://github.com/alexanderdean","followers_url":"https://api.github.com/users/alexanderdean/followers","following_url":"https://api.github.com/users/alexanderdean/following{/other_user}","gists_url":"https://api.github.com/users/alexanderdean/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderdean/subscriptions","organizations_url":"https://api.github.com/users/alexanderdean/orgs","repos_url":"https://api.github.com/users/alexanderdean/repos","events_url":"https://api.github.com/users/alexanderdean/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderdean/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":3,"state":"open","created_at":"2017-07-03T17:21:06Z","updated_at":"2017-09-19T21:13:32Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129/commits","review_comments_url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129/comments","review_comment_url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues/129/comments","statuses_url":"https://api.github.com/repos/snowplow/snowplow-mini/statuses/e32dc43103c3d43201ed52de88111ef75dbee58a","head":{"label":"snowplow:v0.4.0","ref":"v0.4.0","sha":"e32dc43103c3d43201ed52de88111ef75dbee58a","user":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars3.githubusercontent.com/u/1476001?v=4","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"repo":{"id":50993452,"name":"snowplow-mini","full_name":"snowplow/snowplow-mini","owner":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars3.githubusercontent.com/u/1476001?v=4","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snowplow/snowplow-mini","description":"An easily-deployable, single-instance version of Snowplow","fork":false,"url":"https://api.github.com/repos/snowplow/snowplow-mini","forks_url":"https://api.github.com/repos/snowplow/snowplow-mini/forks","keys_url":"https://api.github.com/repos/snowplow/snowplow-mini/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snowplow/snowplow-mini/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snowplow/snowplow-mini/teams","hooks_url":"https://api.github.com/repos/snowplow/snowplow-mini/hooks","issue_events_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues/events{/number}","events_url":"https://api.github.com/repos/snowplow/snowplow-mini/events","assignees_url":"https://api.github.com/repos/snowplow/snowplow-mini/assignees{/user}","branches_url":"https://api.github.com/repos/snowplow/snowplow-mini/branches{/branch}","tags_url":"https://api.github.com/repos/snowplow/snowplow-mini/tags","blobs_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/refs{/sha}","trees_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snowplow/snowplow-mini/statuses/{sha}","languages_url":"https://api.github.com/repos/snowplow/snowplow-mini/languages","stargazers_url":"https://api.github.com/repos/snowplow/snowplow-mini/stargazers","contributors_url":"https://api.github.com/repos/snowplow/snowplow-mini/contributors","subscribers_url":"https://api.github.com/repos/snowplow/snowplow-mini/subscribers","subscription_url":"https://api.github.com/repos/snowplow/snowplow-mini/subscription","commits_url":"https://api.github.com/repos/snowplow/snowplow-mini/commits{/sha}","git_commits_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/commits{/sha}","comments_url":"https://api.github.com/repos/snowplow/snowplow-mini/comments{/number}","issue_comment_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues/comments{/number}","contents_url":"https://api.github.com/repos/snowplow/snowplow-mini/contents/{+path}","compare_url":"https://api.github.com/repos/snowplow/snowplow-mini/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snowplow/snowplow-mini/merges","archive_url":"https://api.github.com/repos/snowplow/snowplow-mini/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snowplow/snowplow-mini/downloads","issues_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues{/number}","pulls_url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls{/number}","milestones_url":"https://api.github.com/repos/snowplow/snowplow-mini/milestones{/number}","notifications_url":"https://api.github.com/repos/snowplow/snowplow-mini/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snowplow/snowplow-mini/labels{/name}","releases_url":"https://api.github.com/repos/snowplow/snowplow-mini/releases{/id}","deployments_url":"https://api.github.com/repos/snowplow/snowplow-mini/deployments","created_at":"2016-02-03T10:50:49Z","updated_at":"2017-09-23T15:21:29Z","pushed_at":"2017-10-05T20:40:23Z","git_url":"git://github.com/snowplow/snowplow-mini.git","ssh_url":"git@github.com:snowplow/snowplow-mini.git","clone_url":"https://github.com/snowplow/snowplow-mini.git","svn_url":"https://github.com/snowplow/snowplow-mini","homepage":"","size":92536,"stargazers_count":38,"watchers_count":38,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":45,"forks":11,"open_issues":45,"watchers":38,"default_branch":"master"}},"base":{"label":"snowplow:master","ref":"master","sha":"618964fbd4a5e9700016132f5173523ef28745c1","user":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars3.githubusercontent.com/u/1476001?v=4","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"repo":{"id":50993452,"name":"snowplow-mini","full_name":"snowplow/snowplow-mini","owner":{"login":"snowplow","id":1476001,"avatar_url":"https://avatars3.githubusercontent.com/u/1476001?v=4","gravatar_id":"","url":"https://api.github.com/users/snowplow","html_url":"https://github.com/snowplow","followers_url":"https://api.github.com/users/snowplow/followers","following_url":"https://api.github.com/users/snowplow/following{/other_user}","gists_url":"https://api.github.com/users/snowplow/gists{/gist_id}","starred_url":"https://api.github.com/users/snowplow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowplow/subscriptions","organizations_url":"https://api.github.com/users/snowplow/orgs","repos_url":"https://api.github.com/users/snowplow/repos","events_url":"https://api.github.com/users/snowplow/events{/privacy}","received_events_url":"https://api.github.com/users/snowplow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snowplow/snowplow-mini","description":"An easily-deployable, single-instance version of Snowplow","fork":false,"url":"https://api.github.com/repos/snowplow/snowplow-mini","forks_url":"https://api.github.com/repos/snowplow/snowplow-mini/forks","keys_url":"https://api.github.com/repos/snowplow/snowplow-mini/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snowplow/snowplow-mini/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snowplow/snowplow-mini/teams","hooks_url":"https://api.github.com/repos/snowplow/snowplow-mini/hooks","issue_events_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues/events{/number}","events_url":"https://api.github.com/repos/snowplow/snowplow-mini/events","assignees_url":"https://api.github.com/repos/snowplow/snowplow-mini/assignees{/user}","branches_url":"https://api.github.com/repos/snowplow/snowplow-mini/branches{/branch}","tags_url":"https://api.github.com/repos/snowplow/snowplow-mini/tags","blobs_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/refs{/sha}","trees_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snowplow/snowplow-mini/statuses/{sha}","languages_url":"https://api.github.com/repos/snowplow/snowplow-mini/languages","stargazers_url":"https://api.github.com/repos/snowplow/snowplow-mini/stargazers","contributors_url":"https://api.github.com/repos/snowplow/snowplow-mini/contributors","subscribers_url":"https://api.github.com/repos/snowplow/snowplow-mini/subscribers","subscription_url":"https://api.github.com/repos/snowplow/snowplow-mini/subscription","commits_url":"https://api.github.com/repos/snowplow/snowplow-mini/commits{/sha}","git_commits_url":"https://api.github.com/repos/snowplow/snowplow-mini/git/commits{/sha}","comments_url":"https://api.github.com/repos/snowplow/snowplow-mini/comments{/number}","issue_comment_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues/comments{/number}","contents_url":"https://api.github.com/repos/snowplow/snowplow-mini/contents/{+path}","compare_url":"https://api.github.com/repos/snowplow/snowplow-mini/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snowplow/snowplow-mini/merges","archive_url":"https://api.github.com/repos/snowplow/snowplow-mini/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snowplow/snowplow-mini/downloads","issues_url":"https://api.github.com/repos/snowplow/snowplow-mini/issues{/number}","pulls_url":"https://api.github.com/repos/snowplow/snowplow-mini/pulls{/number}","milestones_url":"https://api.github.com/repos/snowplow/snowplow-mini/milestones{/number}","notifications_url":"https://api.github.com/repos/snowplow/snowplow-mini/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snowplow/snowplow-mini/labels{/name}","releases_url":"https://api.github.com/repos/snowplow/snowplow-mini/releases{/id}","deployments_url":"https://api.github.com/repos/snowplow/snowplow-mini/deployments","created_at":"2016-02-03T10:50:49Z","updated_at":"2017-09-23T15:21:29Z","pushed_at":"2017-10-05T20:40:23Z","git_url":"git://github.com/snowplow/snowplow-mini.git","ssh_url":"git@github.com:snowplow/snowplow-mini.git","clone_url":"https://github.com/snowplow/snowplow-mini.git","svn_url":"https://github.com/snowplow/snowplow-mini","homepage":"","size":92536,"stargazers_count":38,"watchers_count":38,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":45,"forks":11,"open_issues":45,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129"},"html":{"href":"https://github.com/snowplow/snowplow-mini/pull/129"},"issue":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/issues/129"},"comments":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/snowplow/snowplow-mini/statuses/e32dc43103c3d43201ed52de88111ef75dbee58a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"aldemirenes"}}