{"action":"created","comment":{"url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/comments/90247536","pull_request_review_id":10768705,"id":90247536,"diff_hunk":"@@ -1,21 +1,40 @@\n #!/bin/bash -x\n exec > >(tee -i /tmp/$(basename $0 .sh)_$(date '+%Y-%m-%d_%H-%M-%S').log) 2>&1\n \n-# StackLight services\n-salt -C 'I@elasticsearch:server' state.sls elasticsearch.server -b 1\n-salt -C 'I@influxdb:server' state.sls influxdb -b 1\n-salt -C 'I@kibana:server' state.sls kibana.server\n-salt -C 'I@grafana:server' state.sls grafana.server -b 1\n+# Start by flusing Salt Mine to make sure it is clean\n+salt \"*\" mine.flush\n+\n+# Install StackLight services, and gather the Collectd and Heka metadata\n+salt \"*\" state.sls collectd\n+salt \"*\" state.sls heka\n \n-# Gather Grafana dashboards from all nodes\n+# Gather the Grafana metadata as grains\n salt -C 'I@grafana:collector' state.sls grafana.collector\n+\n+# Update Salt Mine\n salt \"*\" state.sls salt.minion.grains\n-salt \"*\" mine.flush\n salt \"*\" saltutil.refresh_modules\n salt \"*\" mine.update\n \n sleep 5\n \n+# Update Heka\n+salt -C 'I@heka:aggregator:enabled:True or I@heka:remote_collector:enabled:True' state.sls heka\n+\n+# Update Collectd\n+salt -C 'I@collectd:remote_client:enabled:True' state.sls collectd\n+\n+# Update Nagios\n+salt -C 'I@nagios:server' state.sls nagios\n+\n+# The following is only applied when Nagios is deployed in cluster: stop Nagios\n+# on monitoring nodes (b/c package starts it by default), then start Nagios\n+# where the VIP is running\n+salt -C 'I@nagios:server:automatic_starting:False' service.stop nagios3\n+salt -G 'ipv4:172.16.10.253' service.start nagios3\n+\n+# Finalize the configuration of Kibana, Grafana and Elasticsearch\n+# (add dashboards, etc.)\n salt -C 'I@kibana:client' state.sls kibana.client\n salt -C 'I@grafana:client' state.sls grafana.client\n salt -C 'I@elasticsearch:client' state.sls elasticsearch.client","path":"scripts/stacklight_monitor_install.sh","position":47,"original_position":47,"commit_id":"09656bedd3e46b8bd2cc0f76f18b38eba975d77f","original_commit_id":"09656bedd3e46b8bd2cc0f76f18b38eba975d77f","user":{"login":"simonpasquier","id":2587585,"avatar_url":"https://avatars.githubusercontent.com/u/2587585?v=3","gravatar_id":"","url":"https://api.github.com/users/simonpasquier","html_url":"https://github.com/simonpasquier","followers_url":"https://api.github.com/users/simonpasquier/followers","following_url":"https://api.github.com/users/simonpasquier/following{/other_user}","gists_url":"https://api.github.com/users/simonpasquier/gists{/gist_id}","starred_url":"https://api.github.com/users/simonpasquier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonpasquier/subscriptions","organizations_url":"https://api.github.com/users/simonpasquier/orgs","repos_url":"https://api.github.com/users/simonpasquier/repos","events_url":"https://api.github.com/users/simonpasquier/events{/privacy}","received_events_url":"https://api.github.com/users/simonpasquier/received_events","type":"User","site_admin":false},"body":"elasticsearch.client should be called earlier because it configures the index templates.","created_at":"2016-11-30T14:54:46Z","updated_at":"2016-11-30T14:54:52Z","html_url":"https://github.com/Mirantis/mk-lab-salt-model/pull/163#discussion_r90247536","pull_request_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163","_links":{"self":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/comments/90247536"},"html":{"href":"https://github.com/Mirantis/mk-lab-salt-model/pull/163#discussion_r90247536"},"pull_request":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163","id":95887262,"html_url":"https://github.com/Mirantis/mk-lab-salt-model/pull/163","diff_url":"https://github.com/Mirantis/mk-lab-salt-model/pull/163.diff","patch_url":"https://github.com/Mirantis/mk-lab-salt-model/pull/163.patch","issue_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/issues/163","number":163,"state":"open","locked":false,"title":"Rework the StackLight deploy scripts","user":{"login":"elemoine","id":76594,"avatar_url":"https://avatars.githubusercontent.com/u/76594?v=3","gravatar_id":"","url":"https://api.github.com/users/elemoine","html_url":"https://github.com/elemoine","followers_url":"https://api.github.com/users/elemoine/followers","following_url":"https://api.github.com/users/elemoine/following{/other_user}","gists_url":"https://api.github.com/users/elemoine/gists{/gist_id}","starred_url":"https://api.github.com/users/elemoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elemoine/subscriptions","organizations_url":"https://api.github.com/users/elemoine/orgs","repos_url":"https://api.github.com/users/elemoine/repos","events_url":"https://api.github.com/users/elemoine/events{/privacy}","received_events_url":"https://api.github.com/users/elemoine/received_events","type":"User","site_admin":false},"body":"This commit changes the StackLight deploy scripts, stacklight_infra_install.sh and stacklight_monitor_install.sh.\r\n\r\nstacklight_infra_install.sh now just takes care of the backends/infrastructure, installing Elasticsearch, Kibana, InfluxDB and Grafana on the monitoring nodes.\r\n\r\nstacklight_monitor_install.sh finalizes the installation of StackLight, deploying the Collectd and Heka agents and configuring them based on the metadata in Salt Mine.\r\n\r\nThe stacklight_monitor_install.sh can be run at will. In particular the script can be run after changing the monitoring configuration. It will take care of updating the metadata in Salt Mine and re-configuring the\r\nStackLight agents as appropriate.","created_at":"2016-11-30T13:03:06Z","updated_at":"2016-11-30T14:54:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6dd221846f11335c8f852e160ac6ccb618b721d2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163/commits","review_comments_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163/comments","review_comment_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/issues/163/comments","statuses_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/statuses/09656bedd3e46b8bd2cc0f76f18b38eba975d77f","head":{"label":"elemoine:stacklight-scripts","ref":"stacklight-scripts","sha":"09656bedd3e46b8bd2cc0f76f18b38eba975d77f","user":{"login":"elemoine","id":76594,"avatar_url":"https://avatars.githubusercontent.com/u/76594?v=3","gravatar_id":"","url":"https://api.github.com/users/elemoine","html_url":"https://github.com/elemoine","followers_url":"https://api.github.com/users/elemoine/followers","following_url":"https://api.github.com/users/elemoine/following{/other_user}","gists_url":"https://api.github.com/users/elemoine/gists{/gist_id}","starred_url":"https://api.github.com/users/elemoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elemoine/subscriptions","organizations_url":"https://api.github.com/users/elemoine/orgs","repos_url":"https://api.github.com/users/elemoine/repos","events_url":"https://api.github.com/users/elemoine/events{/privacy}","received_events_url":"https://api.github.com/users/elemoine/received_events","type":"User","site_admin":false},"repo":{"id":70489957,"name":"mk-lab-salt-model","full_name":"elemoine/mk-lab-salt-model","owner":{"login":"elemoine","id":76594,"avatar_url":"https://avatars.githubusercontent.com/u/76594?v=3","gravatar_id":"","url":"https://api.github.com/users/elemoine","html_url":"https://github.com/elemoine","followers_url":"https://api.github.com/users/elemoine/followers","following_url":"https://api.github.com/users/elemoine/following{/other_user}","gists_url":"https://api.github.com/users/elemoine/gists{/gist_id}","starred_url":"https://api.github.com/users/elemoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elemoine/subscriptions","organizations_url":"https://api.github.com/users/elemoine/orgs","repos_url":"https://api.github.com/users/elemoine/repos","events_url":"https://api.github.com/users/elemoine/events{/privacy}","received_events_url":"https://api.github.com/users/elemoine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elemoine/mk-lab-salt-model","description":null,"fork":true,"url":"https://api.github.com/repos/elemoine/mk-lab-salt-model","forks_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/forks","keys_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/teams","hooks_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/hooks","issue_events_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/issues/events{/number}","events_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/events","assignees_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/assignees{/user}","branches_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/branches{/branch}","tags_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/tags","blobs_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/git/refs{/sha}","trees_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/statuses/{sha}","languages_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/languages","stargazers_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/stargazers","contributors_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/contributors","subscribers_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/subscribers","subscription_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/subscription","commits_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/commits{/sha}","git_commits_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/git/commits{/sha}","comments_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/comments{/number}","issue_comment_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/issues/comments{/number}","contents_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/contents/{+path}","compare_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/merges","archive_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/downloads","issues_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/issues{/number}","pulls_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/pulls{/number}","milestones_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/milestones{/number}","notifications_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/labels{/name}","releases_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/releases{/id}","deployments_url":"https://api.github.com/repos/elemoine/mk-lab-salt-model/deployments","created_at":"2016-10-10T13:19:36Z","updated_at":"2016-10-07T08:47:10Z","pushed_at":"2016-11-30T13:01:50Z","git_url":"git://github.com/elemoine/mk-lab-salt-model.git","ssh_url":"git@github.com:elemoine/mk-lab-salt-model.git","clone_url":"https://github.com/elemoine/mk-lab-salt-model.git","svn_url":"https://github.com/elemoine/mk-lab-salt-model","homepage":null,"size":592,"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":"Mirantis:master","ref":"master","sha":"e2df50933826f5054e27a1220c98b877a3791b86","user":{"login":"Mirantis","id":609319,"avatar_url":"https://avatars.githubusercontent.com/u/609319?v=3","gravatar_id":"","url":"https://api.github.com/users/Mirantis","html_url":"https://github.com/Mirantis","followers_url":"https://api.github.com/users/Mirantis/followers","following_url":"https://api.github.com/users/Mirantis/following{/other_user}","gists_url":"https://api.github.com/users/Mirantis/gists{/gist_id}","starred_url":"https://api.github.com/users/Mirantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mirantis/subscriptions","organizations_url":"https://api.github.com/users/Mirantis/orgs","repos_url":"https://api.github.com/users/Mirantis/repos","events_url":"https://api.github.com/users/Mirantis/events{/privacy}","received_events_url":"https://api.github.com/users/Mirantis/received_events","type":"Organization","site_admin":false},"repo":{"id":70062548,"name":"mk-lab-salt-model","full_name":"Mirantis/mk-lab-salt-model","owner":{"login":"Mirantis","id":609319,"avatar_url":"https://avatars.githubusercontent.com/u/609319?v=3","gravatar_id":"","url":"https://api.github.com/users/Mirantis","html_url":"https://github.com/Mirantis","followers_url":"https://api.github.com/users/Mirantis/followers","following_url":"https://api.github.com/users/Mirantis/following{/other_user}","gists_url":"https://api.github.com/users/Mirantis/gists{/gist_id}","starred_url":"https://api.github.com/users/Mirantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mirantis/subscriptions","organizations_url":"https://api.github.com/users/Mirantis/orgs","repos_url":"https://api.github.com/users/Mirantis/repos","events_url":"https://api.github.com/users/Mirantis/events{/privacy}","received_events_url":"https://api.github.com/users/Mirantis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Mirantis/mk-lab-salt-model","description":null,"fork":false,"url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model","forks_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/forks","keys_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/teams","hooks_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/hooks","issue_events_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/issues/events{/number}","events_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/events","assignees_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/assignees{/user}","branches_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/branches{/branch}","tags_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/tags","blobs_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/statuses/{sha}","languages_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/languages","stargazers_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/stargazers","contributors_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/contributors","subscribers_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/subscribers","subscription_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/subscription","commits_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/contents/{+path}","compare_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/merges","archive_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/downloads","issues_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/issues{/number}","pulls_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls{/number}","milestones_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/milestones{/number}","notifications_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/labels{/name}","releases_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/releases{/id}","deployments_url":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/deployments","created_at":"2016-10-05T13:21:45Z","updated_at":"2016-11-22T05:42:49Z","pushed_at":"2016-11-30T14:49:20Z","git_url":"git://github.com/Mirantis/mk-lab-salt-model.git","ssh_url":"git@github.com:Mirantis/mk-lab-salt-model.git","clone_url":"https://github.com/Mirantis/mk-lab-salt-model.git","svn_url":"https://github.com/Mirantis/mk-lab-salt-model","homepage":null,"size":778,"stargazers_count":5,"watchers_count":5,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":12,"forks":24,"open_issues":12,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163"},"html":{"href":"https://github.com/Mirantis/mk-lab-salt-model/pull/163"},"issue":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/issues/163"},"comments":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/Mirantis/mk-lab-salt-model/statuses/09656bedd3e46b8bd2cc0f76f18b38eba975d77f"}}}}
{"actor":{"display_login":"simonpasquier"}}