summaryrefslogtreecommitdiff
path: root/baserock/strata/openstack-services/cinder.morph
diff options
context:
space:
mode:
authorPaul Sherwood <paul.sherwood@codethink.co.uk>2015-09-25 08:47:49 +0000
committerPaul Sherwood <paul.sherwood@codethink.co.uk>2015-09-26 08:27:41 +0100
commit3a2f641e4e70e76ffa77629c6208970c1a7af667 (patch)
treee6635788976c616017c05b5ea93432f9b2dc769e /baserock/strata/openstack-services/cinder.morph
parentc844667a718e8640d9ae2b7640a3b0dc0fb53b0e (diff)
downloaddefinitions-baserock/ps/reorganise-definitions.tar.gz
Proposed re-org of definitions repobaserock/ps/reorganise-definitions
Diffstat (limited to 'baserock/strata/openstack-services/cinder.morph')
-rw-r--r--baserock/strata/openstack-services/cinder.morph21
1 files changed, 21 insertions, 0 deletions
diff --git a/baserock/strata/openstack-services/cinder.morph b/baserock/strata/openstack-services/cinder.morph
new file mode 100644
index 00000000..a0fc879f
--- /dev/null
+++ b/baserock/strata/openstack-services/cinder.morph
@@ -0,0 +1,21 @@
+name: cinder
+kind: chunk
+build-system: python-distutils
+post-install-commands:
+# Install some default configuration files
+- install -D -m 644 etc/cinder/logging_sample.conf "$DESTDIR"/etc/cinder/logging.conf
+- install -D -m 644 etc/cinder/api-paste.ini "$DESTDIR"/etc/cinder/api-paste.ini
+- install -D -m 644 etc/cinder/policy.json "$DESTDIR"/etc/cinder/policy.json
+- install -D -m 640 etc/cinder/rootwrap.conf "$DESTDIR"/etc/cinder/rootwrap.conf
+# Move rootwrap files to a proper location
+- mkdir -p "$DESTDIR"/etc/cinder/rootwrap.d
+- install -D -m 644 etc/cinder/rootwrap.d/* "$DESTDIR"/etc/cinder/rootwrap.d/
+# Add cinder 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/cinder-rootwrap
+ Defaults:cinder !requiretty
+
+ cinder ALL=(root) NOPASSWD: /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
+ EOF