From bfe523b5328d9fdccefb29b685d396e3de7427e2 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 18 May 2015 14:51:08 +0000 Subject: 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 Signed-off-by: Patrick Darley Signed-off-by: Tiago Gomes Change-Id: Id26886aaaa9edd8509412615a65e681d5c8117ed --- strata/openstack-services/cinder.morph | 5 ++++- strata/openstack-services/glance.morph | 29 +++++++++++++++++++++++++++++ strata/openstack-services/ironic.morph | 15 ++++++++------- strata/openstack-services/keystone.morph | 9 +++++++++ strata/openstack-services/neutron.morph | 24 +++++++++++++++++------- strata/openstack-services/nova.morph | 10 ++++++++-- 6 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 strata/openstack-services/glance.morph create mode 100644 strata/openstack-services/keystone.morph (limited to 'strata/openstack-services') 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 -- cgit v1.2.1