Merge lp:~jacekn/mojo/mojo-specs into lp:mojo/mojo-specs

Proposed by Jacek Nykis
Status: Merged
Approved by: Laurent Sesques
Approved revision: no longer in the source branch.
Merged at revision: 119
Proposed branch: lp:~jacekn/mojo/mojo-specs
Merge into: lp:mojo/mojo-specs
Diff against target: 93 lines (+71/-0)
4 files modified
charm-testing/prometheus-openstack-exporter/collect (+2/-0)
charm-testing/prometheus-openstack-exporter/deploy (+21/-0)
charm-testing/prometheus-openstack-exporter/manifest (+27/-0)
charm-testing/prometheus-openstack-exporter/post-deploy (+21/-0)
To merge this branch: bzr merge lp:~jacekn/mojo/mojo-specs
Reviewer Review Type Date Requested Status
Laurent Sesques Approve
Review via email: mp+349931@code.launchpad.net

Commit message

Add stage for prometheus-openstack-exporter charm testing

To post a comment you must log in.
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Laurent Sesques (sajoupa) :
review: Approve
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

Change successfully merged at revision 119

lp:~jacekn/mojo/mojo-specs updated
119. By Jacek Nykis

Add stage for prometheus-openstack-exporter charm testing

Reviewed-on: https://code.launchpad.net/~jacekn/mojo/mojo-specs/+merge/349931
Reviewed-by: Laurent Sesques <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'charm-testing/prometheus-openstack-exporter'
2=== added file 'charm-testing/prometheus-openstack-exporter/collect'
3--- charm-testing/prometheus-openstack-exporter/collect 1970-01-01 00:00:00 +0000
4+++ charm-testing/prometheus-openstack-exporter/collect 2018-07-19 12:42:46 +0000
5@@ -0,0 +1,2 @@
6+prometheus-openstack-exporter cs:prometheus-openstack-exporter
7+nrpe cs:nrpe
8
9=== added file 'charm-testing/prometheus-openstack-exporter/deploy'
10--- charm-testing/prometheus-openstack-exporter/deploy 1970-01-01 00:00:00 +0000
11+++ charm-testing/prometheus-openstack-exporter/deploy 2018-07-19 12:42:46 +0000
12@@ -0,0 +1,21 @@
13+prometheus-openstack-exporter:
14+ series: {{series}}
15+ services:
16+ prometheus-openstack-exporter:
17+ charm: prometheus-openstack-exporter
18+ options:
19+ cache-refresh-interval: 90
20+ schedulable-instance-size: 2, 4096, 40
21+ os-credentials: |
22+ { username: "dummy_user", password: "dummy_password",
23+ tenant_name: "dummy_tenant", region_name: "dummy_region",
24+ auth_url: "http://localhost" }
25+ nrpe:
26+ charm: nrpe
27+{%- if series != "trusty" %}
28+ options:
29+ procs: '-w 200 -c 250 -k'
30+ swap: '-w 90% -c 75% -n ok'
31+{%- endif %}
32+ relations:
33+ - ["prometheus-openstack-exporter", "nrpe:nrpe-external-master"]
34
35=== added symlink 'charm-testing/prometheus-openstack-exporter/helpers'
36=== target is u'../prometheus2/helpers'
37=== added file 'charm-testing/prometheus-openstack-exporter/manifest'
38--- charm-testing/prometheus-openstack-exporter/manifest 1970-01-01 00:00:00 +0000
39+++ charm-testing/prometheus-openstack-exporter/manifest 2018-07-19 12:42:46 +0000
40@@ -0,0 +1,27 @@
41+# Collect, pre-deploy (lint, etc.) deploy and check the initial charm
42+# We need to clean the build directory first in case a previous build
43+# was using a version that is different from the upstream (e.g. git vs. charmstore)
44+script config=clean-build-dir
45+# Now collect
46+collect config=collect
47+script config=pre-deploy
48+deploy config=deploy wait=true
49+# Skip check_prometheus_openstack_exporter_http as it requires valid admin creds to work
50+nagios-check skip-checks='check_swap,check_etc_bzr,check_log_archive_status,check_ksplice,check_prometheus_openstack_exporter_http' retry=3 sleep=60
51+verify config=post-deploy retry=3 sleep=60
52+# Now test an upgrade to the new charm if UPGRADE_CHARM is set
53+stop-on return-code=99 config=check-upgrade-charm UPGRADE_CHARM=${UPGRADE_CHARM}
54+script config=create-upgrade-collect UPGRADE_CHARM=${UPGRADE_CHARM}
55+collect config=collect-upgrade
56+script config=upgrade-charm
57+juju-check-wait
58+# Skip check_prometheus_openstack_exporter_http as it requires valid admin creds to work
59+nagios-check skip-checks='check_swap,check_etc_bzr,check_log_archive_status,check_ksplice,check_prometheus_openstack_exporter_http' retry=3 sleep=60
60+verify config=post-deploy retry=3 sleep=60
61+# Now redeploy the model, and test a deployment from scratch (with the updated charm in place)
62+script config=redeploy-model
63+script config=pre-deploy
64+deploy config=deploy wait=true
65+# Skip check_prometheus_openstack_exporter_http as it requires valid admin creds to work
66+nagios-check skip-checks='check_swap,check_etc_bzr,check_log_archive_status,check_ksplice,check_prometheus_openstack_exporter_http' retry=3 sleep=60
67+verify config=post-deploy retry=3 sleep=60
68
69=== added file 'charm-testing/prometheus-openstack-exporter/post-deploy'
70--- charm-testing/prometheus-openstack-exporter/post-deploy 1970-01-01 00:00:00 +0000
71+++ charm-testing/prometheus-openstack-exporter/post-deploy 2018-07-19 12:42:46 +0000
72@@ -0,0 +1,21 @@
73+#!/bin/bash
74+
75+. "$(dirname $0)/helpers"
76+
77+##################################
78+# prometheus-openstack-exporter verification
79+##################################
80+for UNIT in $(get_units prometheus-openstack-exporter); do
81+ echo -e "####\n# Calling unit to ensure it returns metrics"
82+ # Due to LP#1782563 we need to ssh to the unit to verify
83+ #curl -f -s -S -v http://${UNIT}:9183 |grep OpenStack
84+ ssh ${UNIT} "curl -f -s -S -v http://localhost:9183/|grep OpenStack"
85+ if [ $? -ne 0 ]; then
86+ fail
87+ fi
88+done
89+
90+# If we are here it means all checks passed
91+echo "#####################"
92+echo "# E2E Checks Passed #"
93+echo "#####################"

Subscribers

People subscribed via source and target branches

to all changes: