summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Darley <patrick.darley@codethink.co.uk>2015-04-17 14:02:25 (GMT)
committerBaserock Gerrit <gerrit@baserock.org>2015-04-17 17:15:23 (GMT)
commitcd8260cc5d7537571f68ee5b47c5b0308268e853 (patch)
treea63bc3f24b28b4d6bf8a105a948d18b29cf42993
parent1dfb2680c0025bf9b248adb3cb0a878b1119573b (diff)
downloaddefinitions-cd8260cc5d7537571f68ee5b47c5b0308268e853.tar.gz
Create chunk morphology for ceilometer
Change-Id: Ia5c5afda139f57e1eedbf43c77a114f29f6c726b
-rw-r--r--strata/openstack-services.morph1
-rw-r--r--strata/openstack-services/ceilometer.morph23
2 files changed, 24 insertions, 0 deletions
diff --git a/strata/openstack-services.morph b/strata/openstack-services.morph
index 99e709b..1e1f6fa 100644
--- a/strata/openstack-services.morph
+++ b/strata/openstack-services.morph
@@ -741,6 +741,7 @@ chunks:
repo: upstream:openstack/ceilometer
ref: 94579bfc81b820380d03703e4e2311b3bd25c022
unpetrify-ref: 2014.2
+ morph: strata/openstack-services/ceilometer.morph
build-depends:
- alembic
- anyjson
diff --git a/strata/openstack-services/ceilometer.morph b/strata/openstack-services/ceilometer.morph
new file mode 100644
index 0000000..7fe0b85
--- /dev/null
+++ b/strata/openstack-services/ceilometer.morph
@@ -0,0 +1,23 @@
+name: ceilometer
+kind: chunk
+build-system: python-distutils
+post-install-commands:
+# Install the configuration files required to
+- mkdir -p "$DESTDIR"/etc/ceilometer
+- install -D -m 644 etc/ceilometer/*.json "$DESTDIR"/etc/ceilometer
+- install -D -m 644 etc/ceilometer/*.yaml "$DESTDIR"/etc/ceilometer
+- install -D -m 644 etc/ceilometer/api_paste.ini "DESTDIR"/etc/ceilometer
+# Install rootwrap.conf
+- install -D -m 640 etc/ceilometer/rootwrap.conf "$DESTDIR"/etc/ceilometer/rootwrap.conf
+# Move rootwrap files to a proper location
+- mkdir -p "$DESTDIR"/etc/ceilometer/rootwrap.d
+- install -D -m 644 etc/ceilometer/rootwrap.d/* "$DESTDIR"/etc/ceilometer/rootwrap.d/
+# Add ceilometer to sudoers controlling which commands will run as a root
+# using the openstack rootwrap.
+- mkdir -p "$DESTDIR"/etc/sudoers.d
+- |
+ install -D -m 0440 /proc/self/fd/0 <<'EOF' "$DESTDIR"/etc/sudoers.d/ceilometer-rootwrap
+ Defaults:ceilometer !requiretty
+
+ ceilometer ALL=(root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf *
+ EOF