summaryrefslogtreecommitdiff
path: root/strata/openstack-services
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-05-18 14:51:08 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-06-11 17:04:29 +0000
commitbfe523b5328d9fdccefb29b685d396e3de7427e2 (patch)
treefec786e8bfe8a8d9fe4660c5a8b7a7482dc53965 /strata/openstack-services
parente267a5c31bbc570b15d8efd767a5e3d6379fe803 (diff)
downloaddefinitions-bfe523b5328d9fdccefb29b685d396e3de7427e2.tar.gz
OpenStack: Install default configuration files
Add the default configuration files for Keystone, Nova, Neutron, Glance, Cinder, Swift, Ceilometer, Ironic and Tempest. Also install configuration files which will are not going to be modified in the following commit, in the post-install-commands for the chunk; as opposite to having them laying around in the repo and installing them with the install-files configuration extension. Note: - Some configuration files have been created using commands given in their documentations or they .conf.sample files. - To generate cinder.conf use the following command on the top of the cinder repository: ./tools/config/generate_sample.sh -b . -p cinder -o etc/cinder - Nova.conf has been taken from: http://pkgs.fedoraproject.org/cgit/openstack-nova.git/tree/nova.conf.sample commit 69755b4a072edff0957ee256290395600edbab9e - tempest.conf has been taken from the tag version '4'. Signed-off-by: Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> Signed-off-by: Patrick Darley <patrick.darley@codethink.co.uk> Signed-off-by: Tiago Gomes <tiago.gomes@codethink.co.uk> Change-Id: Id26886aaaa9edd8509412615a65e681d5c8117ed
Diffstat (limited to 'strata/openstack-services')
-rw-r--r--strata/openstack-services/cinder.morph5
-rw-r--r--strata/openstack-services/glance.morph29
-rw-r--r--strata/openstack-services/ironic.morph15
-rw-r--r--strata/openstack-services/keystone.morph9
-rw-r--r--strata/openstack-services/neutron.morph24
-rw-r--r--strata/openstack-services/nova.morph10
6 files changed, 75 insertions, 17 deletions
diff --git a/strata/openstack-services/cinder.morph b/strata/openstack-services/cinder.morph
index cd680b09..a0fc879f 100644
--- a/strata/openstack-services/cinder.morph
+++ b/strata/openstack-services/cinder.morph
@@ -2,7 +2,10 @@ name: cinder
kind: chunk
build-system: python-distutils
post-install-commands:
-# Install rootwrap.conf
+# 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
diff --git a/strata/openstack-services/glance.morph b/strata/openstack-services/glance.morph
new file mode 100644
index 00000000..3f81a505
--- /dev/null
+++ b/strata/openstack-services/glance.morph
@@ -0,0 +1,29 @@
+name: glance
+kind: chunk
+build-system: python-distutils
+post-install-commands:
+# Install some default configuration files
+- mkdir -p "$DESTDIR"/etc/glance
+- install -m 644 etc/glance-api-paste.ini "$DESTDIR"/etc/glance/
+- install -m 644 etc/glance-registry-paste.ini "$DESTDIR"/etc/glance/
+- install -m 644 etc/glance-search-paste.ini "$DESTDIR"/etc/glance/
+- install -m 644 etc/policy.json "$DESTDIR"/etc/glance/
+- install -m 644 etc/schema-image.json "$DESTDIR"/etc/glance/
+- install -m 644 etc/search-policy.json "$DESTDIR"/etc/glance/
+# Install predefined namespaces for Glance Metadata Definitions
+# Catalog (see more info in its README)
+- cp -r etc/metadefs "$DESTDIR"/etc/glance/
+# Install conf files which are not modified by
+- install -m 644 etc/glance-scrubber.conf "$DESTDIR"/etc/glance/
+- install -m 644 etc/glance-cache.conf "$DESTDIR"/etc/glance/
+- install -m 644 etc/glance-search.conf "$DESTDIR"/etc/glance/
+- |
+ install -m 644 etc/glance-swift.conf.sample \
+ "$DESTDIR"/etc/glance/glance-swift.conf
+- install -m 644 etc/glance-manage.conf "$DESTDIR"/etc/glance/
+- |
+ install -m 644 etc/property-protections-policies.conf.sample \
+ "$DESTDIR"/etc/glance/property-protections-policies.conf
+- |
+ install -m 644 etc/property-protections-roles.conf.sample \
+ "$DESTDIR"/etc/glance/property-protections-roles.conf
diff --git a/strata/openstack-services/ironic.morph b/strata/openstack-services/ironic.morph
index 850399b4..8003dd17 100644
--- a/strata/openstack-services/ironic.morph
+++ b/strata/openstack-services/ironic.morph
@@ -2,14 +2,15 @@ name: ironic
kind: chunk
build-system: python-distutils
post-install-commands:
-# Install rootwrap.conf
-- install -D -m 640 etc/ironic/rootwrap.conf "$DESTDIR"/etc/ironic/rootwrap.conf
-# Move rootwrap files to a proper location
-- mkdir -p "$DESTDIR"/etc/ironic/rootwrap.d
-- install -m 644 etc/ironic/rootwrap.d/* "$DESTDIR"/etc/ironic/rootwrap.d/
-# Add ironic to sudoers controlling which commands will run as a root
-# using the openstack rootwrap.
- |
+ mkdir -p "$DESTDIR"/etc/ironic
+ install -m 644 etc/ironic/policy.json "$DESTDIR"/etc/ironic
+ install -m 644 etc/ironic/rootwrap.conf "$DESTDIR"/etc/ironic
+ mkdir -p "$DESTDIR"/etc/ironic/rootwrap.d
+ install -m 644 etc/ironic/rootwrap.d/* "$DESTDIR"/etc/ironic/rootwrap.d/
+
+ # Add ironic to sudoers controlling which commands will run as a root
+ # using the openstack rootwrap.
install -D -m 0440 /proc/self/fd/0 <<'EOF' "$DESTDIR"/etc/sudoers.d/ironic-rootwrap
Defaults:ironic !requiretty
diff --git a/strata/openstack-services/keystone.morph b/strata/openstack-services/keystone.morph
new file mode 100644
index 00000000..836b5d47
--- /dev/null
+++ b/strata/openstack-services/keystone.morph
@@ -0,0 +1,9 @@
+name: keystone
+kind: chunk
+build-system: python-distutils
+post-install-commands:
+# Install some default configuration files
+- mkdir -p "$DESTDIR"/etc/keystone
+- install -m 644 etc/keystone-paste.ini "$DESTDIR"/etc/keystone/
+- install -m 644 etc/policy.json "$DESTDIR"/etc/keystone/
+- install -m 644 etc/logging.conf.sample "$DESTDIR"/etc/keystone/logging.conf
diff --git a/strata/openstack-services/neutron.morph b/strata/openstack-services/neutron.morph
index b79a089b..6e203922 100644
--- a/strata/openstack-services/neutron.morph
+++ b/strata/openstack-services/neutron.morph
@@ -2,14 +2,24 @@ name: neutron
kind: chunk
build-system: python-distutils
post-install-commands:
-# Move rootwrap files to a proper location
-- mkdir -p "$DESTDIR"/etc/neutron
-- mv "$DESTDIR$PREFIX"/etc/neutron/rootwrap.d "$DESTDIR"/etc/neutron/
-- mv "$DESTDIR$PREFIX"/etc/neutron/rootwrap.conf "$DESTDIR"/etc/neutron/
-# Add neutron to sudoers controlling which commands is running as a root
-# using the openstack rootwrap.
-- mkdir -p "$DESTDIR"/etc/sudoers.d
- |
+ # Move the configuration files to a proper location
+ mkdir "$DESTDIR"/etc
+ mv "$DESTDIR/$PREFIX"/etc/neutron "$DESTDIR"/etc
+
+ # Remove unused start/stop script
+ rm "$DESTDIR/$PREFIX"/etc/init.d/neutron-server
+
+ # Remove configuration files which will be added by Ansible
+ rm "$DESTDIR"/etc/neutron/neutron.conf
+ rm "$DESTDIR"/etc/neutron/metadata_agent.ini
+ rm "$DESTDIR"/etc/neutron/plugins/ml2/ml2_conf.ini
+ rm "$DESTDIR"/etc/neutron/dhcp_agent.ini
+ rm "$DESTDIR"/etc/neutron/l3_agent.ini
+
+ # Add neutron to sudoers controlling which commands is running 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/neutron-rootwrap
Defaults:neutron !requiretty
diff --git a/strata/openstack-services/nova.morph b/strata/openstack-services/nova.morph
index bb6dd756..e5a87daf 100644
--- a/strata/openstack-services/nova.morph
+++ b/strata/openstack-services/nova.morph
@@ -2,11 +2,17 @@ name: nova
kind: chunk
build-system: python-distutils
post-install-commands:
+# Install some default configuration files
+- mkdir -p "$DESTDIR"/etc/nova
+- install -m 644 etc/nova/api-paste.ini "$DESTDIR"/etc/nova/
+- install -m 644 etc/nova/cells.json "$DESTDIR"/etc/nova/
+- install -m 644 etc/nova/logging_sample.conf "$DESTDIR"/etc/nova/logging.conf
+- install -m 644 etc/nova/policy.json "$DESTDIR"/etc/nova/
# Install rootwrap.conf
-- install -D -m 640 etc/nova/rootwrap.conf "$DESTDIR"/etc/nova/rootwrap.conf
+- install -m 640 etc/nova/rootwrap.conf "$DESTDIR"/etc/nova/rootwrap.conf
# Move rootwrap files to a proper location
- mkdir -p "$DESTDIR"/etc/nova/rootwrap.d
-- install -D -m 644 etc/nova/rootwrap.d/* "$DESTDIR"/etc/nova/rootwrap.d/
+- install -m 644 etc/nova/rootwrap.d/* "$DESTDIR"/etc/nova/rootwrap.d/
# Add nova to sudoers controlling which commands will run as a root
# using the openstack rootwrap.
- mkdir -p "$DESTDIR"/etc/sudoers.d