Merge bootstack-ops:prometheus-sprint-sq2 into bootstack-ops:master

Proposed by JuanJo Ciarlante
Status: Merged
Approved by: Benjamin Kaehne
Approved revision: e922e6798d336cc99cb0ad267d48bcf97199715b
Merged at revision: e922e6798d336cc99cb0ad267d48bcf97199715b
Proposed branch: bootstack-ops:prometheus-sprint-sq2
Merge into: bootstack-ops:master
Diff against target: 186 lines (+114/-28)
3 files modified
Makefile (+2/-1)
README.md (+7/-2)
ops-bundle.yaml (+105/-25)
Reviewer Review Type Date Requested Status
Legacy - Canonical WTFB Pending
Review via email: mp+315228@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 2952592..bc42ed3 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -2,4 +2,5 @@
6 PYTHON := /usr/bin/env python
7
8 lint:
9- yamllint -c .yamllint.config ops-bundle.yaml
10+ test -x /usr/bin/yamllint && yamllint -c .yamllint.config ops-bundle.yaml || true
11+ python -c 'import yaml,sys;yaml.load(sys.stdin)' < ops-bundle.yaml
12diff --git a/README.md b/README.md
13index 81c4f94..3e7fb67 100644
14--- a/README.md
15+++ b/README.md
16@@ -10,10 +10,15 @@ make lint
17
18 # Contributing Quickstart Guide
19
20-git clone git+ssh://git.launchpad.net/~canonical-bootstack/+git/opsbundle
21+git clone git+ssh://git.launchpad.net/~canonical-bootstack/bootstack-ops/+git/bootstack-ops
22+cd bootstack-ops
23
24 git checkout -b myfeature
25
26-git push git+ssh://git.launchpad.net/~{YOUR-LP-ACCOUNT}/canonical-bootstack/+git/opsbundle mybranch
27+<... hack ...>
28+
29+git commit ...
30+
31+git push origin myfeature
32
33 Create a MR on LP UI.
34diff --git a/ops-bundle.yaml b/ops-bundle.yaml
35index 08a1293..d0b22d8 100644
36--- a/ops-bundle.yaml
37+++ b/ops-bundle.yaml
38@@ -3,6 +3,13 @@ config: &MONITORING ["lxc:infra=2"]
39
40 inherits: ops-secrets
41
42+# reporting: prometheus + grafana + alertmanager stack
43+# Because snaps fail inside LXC lp#1611078 (xenial/lxd) lp#1582394 (xenial/lxc),
44+# we need a KVM, then we smoosh all services into.
45+config: &REPORTING_SVC_TO "reporting=0"
46+config: &REGION bootstack-CUSTOMER
47+config: &NAGIOS_CONTEXT bootstack-CUSTOMER
48+
49 logging:
50 services:
51 elasticsearch:
52@@ -19,31 +26,32 @@ logging:
53
54 rsyslog-elasticsearch:
55 charm: rsyslog-elasticsearch
56- relations:
57- - [rsyslog-elasticsearch, elasticsearch]
58- - [rsyslog-elasticsearch, ceilometer]
59- - [rsyslog-elasticsearch, cinder]
60- - [rsyslog-elasticsearch, glance]
61- - [rsyslog-elasticsearch, glance-simplestreams-sync]
62- - [rsyslog-elasticsearch, heat]
63- - [rsyslog-elasticsearch, keystone]
64- - [rsyslog-elasticsearch, landscape]
65- - [rsyslog-elasticsearch, landscape-apache]
66- - [rsyslog-elasticsearch, landscape-haproxy]
67- - [rsyslog-elasticsearch, landscape-msg]
68- - [rsyslog-elasticsearch, landscape-postgresql]
69- - [rsyslog-elasticsearch, mongodb]
70- - [rsyslog-elasticsearch, mysql]
71- - [rsyslog-elasticsearch, ncc-memcached]
72- - [rsyslog-elasticsearch, neutron-api]
73- - [rsyslog-elasticsearch, neutron-gateway]
74- - [rsyslog-elasticsearch, nova-cloud-controller]
75- - [rsyslog-elasticsearch, openstack-dashboard]
76- - [rsyslog-elasticsearch, rabbitmq-server]
77- - [rsyslog-elasticsearch, swift-proxy]
78- - [rsyslog-elasticsearch, nagios]
79- - [rsyslog-elasticsearch, infra]
80- - [rsyslog-elasticsearch, os-hosts]
81+
82+ relations:
83+ - [rsyslog-elasticsearch, elasticsearch]
84+ - [rsyslog-elasticsearch, ceilometer]
85+ - [rsyslog-elasticsearch, cinder]
86+ - [rsyslog-elasticsearch, glance]
87+ - [rsyslog-elasticsearch, glance-simplestreams-sync]
88+ - [rsyslog-elasticsearch, heat]
89+ - [rsyslog-elasticsearch, keystone]
90+ - [rsyslog-elasticsearch, landscape]
91+ - [rsyslog-elasticsearch, landscape-apache]
92+ - [rsyslog-elasticsearch, landscape-haproxy]
93+ - [rsyslog-elasticsearch, landscape-msg]
94+ - [rsyslog-elasticsearch, landscape-postgresql]
95+ - [rsyslog-elasticsearch, mongodb]
96+ - [rsyslog-elasticsearch, mysql]
97+ - [rsyslog-elasticsearch, ncc-memcached]
98+ - [rsyslog-elasticsearch, neutron-api]
99+ - [rsyslog-elasticsearch, neutron-gateway]
100+ - [rsyslog-elasticsearch, nova-cloud-controller]
101+ - [rsyslog-elasticsearch, openstack-dashboard]
102+ - [rsyslog-elasticsearch, rabbitmq-server]
103+ - [rsyslog-elasticsearch, swift-proxy]
104+ - [rsyslog-elasticsearch, nagios]
105+ - [rsyslog-elasticsearch, infra]
106+ - [rsyslog-elasticsearch, os-hosts]
107
108 monitoring:
109 services:
110@@ -98,4 +106,76 @@ monitoring:
111 - ["nagios:juju-info", "thruk-agent:general-info"]
112 - [nrpe, "thruk-agent:nrpe-external-master"]
113
114+
115+# reporting: create a KVM with maas' tag=reporting as reporting/0
116+bootstack-reporting-stage0:
117+ inherits: [bootstack-stage2-complete]
118+ services:
119+ reporting:
120+ charm: ubuntu
121+ constraints: tags=reporting
122+
123+# reporting: smoosh prometheus + grafana + alertmanager into reporting/0
124+bootstack-reporting:
125+ inherits: [bootstack-reporting-stage0]
126+ override:
127+ nagios_context: *NAGIOS_CONTEXT
128+ nagios_servicegroups: *REGION
129+ services:
130+ prometheus:
131+ #charm: cs:~prometheus-charmers/prometheus
132+ charm: prometheus
133+ num_units: 1
134+ to: *REPORTING_SVC_TO
135+ options:
136+ ## XXX(jjo): depends on customer setup (maas-proxy) ->
137+ snap_proxy: http://10.76.12.1:8000/
138+ ## XXX(jjo): need to charm openstack-exporter, for now point to the manually deployed install:
139+ ## https://github.com/CanonicalLtd/prometheus-openstack-exporter
140+ static-targets: 'localhost:9183'
141+ grafana:
142+ #charm: cs:~prometheus-charmers/grafana
143+ charm: grafana
144+ num_units: 1
145+ to: *REPORTING_SVC_TO
146+ options:
147+ ## XXX: default deb archive at packagecloud.io redirects to:
148+ ## packagecloud-repositories.s3.dualstack.us-west-1.amazonaws.com
149+ install_file: https://grafanarel.s3.amazonaws.com/builds/grafana-data_4.1.1-1484211277_amd64.deb
150+ # ops-agents.yaml would need to set ->
151+ # datasources: 'prometheus,BootStack Prometheus,proxy,http://172.12.x.x:9090,,'
152+ ## XXX: must go to secrets.yaml
153+ admin_password: admin
154+ prometheus-alertmanager:
155+ #charm: cs:~prometheus-charmers/trusty/prometheus-alertmanager
156+ charm: prometheus-alertmanager
157+ to: *REPORTING_SVC_TO
158+ relations:
159+ - ["grafana:grafana-source", "prometheus:grafana-source"]
160+ - ["prometheus:alertmanager-service", "prometheus-alertmanager:alertmanager-service"]
161+
162+# reporting: deploy telegraf subordinate into every metal or containerized node,
163+# XXX: below stanza will need to be autogenerated (ala landscape-client) against:
164+# - metals (= os-hosts)
165+# - all LXC'd services
166+
167+bootstack-reporting-agents:
168+ inherits: [bootstack-reporting]
169+ services:
170+ telegraf:
171+ #charm: cs:telegraf
172+ charm: telegraf
173+ options:
174+# prometheus_output_port: "9103"
175+# extra_plugins: |
176+# [[inputs.bcache]]
177+# [[inputs.conntrack]]
178+# [[inputs.sysstat]]
179+# sadc_path = "/usr/lib/sysstat/sadc"
180+# activities = ["DISK"]
181+
182+ relations:
183+ - [ telegraf, os-hosts ]
184+ - [ "prometheus:target", "telegraf:prometheus-client"]
185+
186 # vim: si et sw=2 ts=2

Subscribers

People subscribed via source and target branches

to all changes: