diff options
Diffstat (limited to 'strata/openstack-services')
-rw-r--r-- | strata/openstack-services/cinder.morph | 5 | ||||
-rw-r--r-- | strata/openstack-services/erlang-sd_notify.morph | 8 | ||||
-rw-r--r-- | strata/openstack-services/glance.morph | 29 | ||||
-rw-r--r-- | strata/openstack-services/horizon.morph | 66 | ||||
-rw-r--r-- | strata/openstack-services/ironic.morph | 15 | ||||
-rw-r--r-- | strata/openstack-services/keystone.morph | 9 | ||||
-rw-r--r-- | strata/openstack-services/neutron.morph | 24 | ||||
-rw-r--r-- | strata/openstack-services/nova.morph | 10 |
8 files changed, 118 insertions, 48 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/erlang-sd_notify.morph b/strata/openstack-services/erlang-sd_notify.morph new file mode 100644 index 00000000..dd3f66ca --- /dev/null +++ b/strata/openstack-services/erlang-sd_notify.morph @@ -0,0 +1,8 @@ +name: erlang-sd_notify +kind: chunk +build-commands: +- LDFLAGS=-lsystemd REBAR_FLAGS="--verbose 2" make +install-commands: +- install -D -m 644 -p ebin/sd_notify.app "$DESTDIR$PREFIX"/lib/erlang/lib/sd_notify-0.1/ebin/sd_notify.app +- install -D -m 644 -p ebin/sd_notify.beam "$DESTDIR$PREFIX"/lib/erlang/lib/sd_notify-0.1/ebin/sd_notify.beam +- install -D -m 755 -p priv/sd_notify_drv.so "$DESTDIR$PREFIX"/lib/erlang/lib/sd_notify-0.1/priv/sd_notify_drv.so 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/horizon.morph b/strata/openstack-services/horizon.morph index ae6399b1..74930a1e 100644 --- a/strata/openstack-services/horizon.morph +++ b/strata/openstack-services/horizon.morph @@ -4,16 +4,12 @@ configure-commands: # Remove unnecessary .mo files they will be generated # later during package build. - find . -name "django*.mo" -exec rm -f '{}' \; -# Set COMPRESS_OFFLINE=True -- | - sed -i 's:COMPRESS_OFFLINE.=.False:COMPRESS_OFFLINE = True:' \ - openstack_dashboard/settings.py build-commands: # Compile message strings -- cd horizon && django-admin.py compilemessages && cd .. -- cd openstack_dashboard && django-admin.py compilemessages && cd .. +- cd horizon && django-admin.py compilemessages +- cd openstack_dashboard && django-admin.py compilemessages - python setup.py build -post-build-commands: + # Use the local_settings.py example to compile and compress the css, js, etc files. # This is a hack to make SECRET_KEY work. - | @@ -23,37 +19,45 @@ post-build-commands: - python manage.py collectstatic --noinput - python manage.py compress --force install-commands: -# Undo hack +# Install horizon in a temporary folder first, and then move things to the +# right place in $DESTDIR +- mkdir temproot +- python setup.py install -O1 --skip-build --prefix "$PREFIX" --root temproot +# Remove unnecessary .po files +- find temproot -name django.po -exec rm '{}' \; +- find temproot -name djangojs.po -exec rm '{}' \; + +# Move openstack_dashboard to /var/lib/horizon +- mkdir -p "$DESTDIR"/var/lib/horizon/ +- | + mv temproot/"$PREFIX"/lib/python*/site-packages/openstack_dashboard \ + "$DESTDIR"/var/lib/horizon/ +- cp manage.py "$DESTDIR"/var/lib/horizon/openstack_dashboard/ + +# Copy the rest to $DESTDIR +- cp -a temproot/* "$DESTDIR" + +# Copy local_settings to /etc/horizon/openstack_dashboard, so that they +# can be modified, and link them where openstack_dashboard is installed. +- mkdir -p "$DESTDIR"/etc/horizon/openstack_dashboard/ - | cp openstack_dashboard/local/local_settings.py.example \ - openstack_dashboard/local/local_settings.py -# Install horizon -- python setup.py install -O1 --skip-build --prefix "$PREFIX" --root "$DESTDIR" -post-install-commands: -# Remove unnecessary .po files -- find "$DESTDIR" -name django.po -exec rm '{}' \; -- find "$DESTDIR" -name djangojs.po -exec rm '{}' \; -# Link Openstack local_settings where openstack_dashboard is installed. + "$DESTDIR"/etc/horizon/openstack_dashboard/local_settings.py +# Set COMPRESS_OFFLINE=True +- | + echo "COMPRESS_OFFLINE=True" >> \ + "$DESTDIR"/etc/horizon/openstack_dashboard/local_settings.py + - mkdir -p "$DESTDIR"/var/lib/horizon/openstack_dashboard/local - | ln -sf /etc/horizon/openstack_dashboard/local_settings.py \ - "$DESTDIR$PREFIX"/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py + "$DESTDIR"/var/lib/horizon/openstack_dashboard/local/local_settings.py + # Create the static directory (STATIC_ROOT) used in local_settings.py to keep # the static objects like css files. -- mkdir -p "$DESTDIR"/var/lib/horizon/openstack_dashboard/static +- mkdir -p "$DESTDIR"/var/lib/horizon/static # Copy the compressed static files to horizon. -- cp -a openstack_dashboard/static/* "$DESTDIR"/var/lib/horizon/openstack_dashboard/static -- cp -a horizon/static/* "$DESTDIR"/var/lib/horizon/openstack_dashboard/static -- cp -a static/* "$DESTDIR"/var/lib/horizon/openstack_dashboard/static -# Work around to make django.wsgi working with horizon -# See: https://bugs.launchpad.net/osprofiler/+bug/1361235 -# and: https://git.openstack.org/cgit/openstack/tripleo-image-elements/commit/?id=41c9a1dfad23f8aee366afb6a0b20a6c57ec8f79 -- | - sed -i "s|'../..'|os.path.realpath('../..')|" \ - "$DESTDIR$PREFIX"/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi -# And link this django.wsgi file to the horizon home directory -- | - ln -sf "$PREFIX"/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi \ - "$DESTDIR"/var/lib/horizon/openstack_dashboard/django.wsgi +- cp -a static/* "$DESTDIR"/var/lib/horizon/static + # Create the horizon document root for apache configuration - mkdir -p "$DESTDIR"/var/lib/horizon/.blackhole 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 |