diff options
Diffstat (limited to 'strata/openstack-services')
20 files changed, 319 insertions, 0 deletions
diff --git a/strata/openstack-services/ceilometer.morph b/strata/openstack-services/ceilometer.morph new file mode 100644 index 00000000..f120ce9e --- /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/api_paste.ini +# 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 diff --git a/strata/openstack-services/cinder.morph b/strata/openstack-services/cinder.morph new file mode 100644 index 00000000..cd680b09 --- /dev/null +++ b/strata/openstack-services/cinder.morph @@ -0,0 +1,18 @@ +name: cinder +kind: chunk +build-system: python-distutils +post-install-commands: +# Install rootwrap.conf +- 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 diff --git a/strata/openstack-services/horizon.morph b/strata/openstack-services/horizon.morph new file mode 100644 index 00000000..ae6399b1 --- /dev/null +++ b/strata/openstack-services/horizon.morph @@ -0,0 +1,59 @@ +name: horizon +kind: chunk +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 .. +- 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. +- | + cp openstack_dashboard/local/local_settings.py.example \ + openstack_dashboard/local/local_settings.py +# Collect the static files and compress them. +- python manage.py collectstatic --noinput +- python manage.py compress --force +install-commands: +# Undo hack +- | + 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. +- 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 +# 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 +# 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 +# Create the horizon document root for apache configuration +- mkdir -p "$DESTDIR"/var/lib/horizon/.blackhole diff --git a/strata/openstack-services/ipaddr-py.morph b/strata/openstack-services/ipaddr-py.morph new file mode 100644 index 00000000..f6691ab7 --- /dev/null +++ b/strata/openstack-services/ipaddr-py.morph @@ -0,0 +1,6 @@ +name: ipaddr-py +kind: chunk +build-commands: +- cd trunk && python setup.py build +install-commands: +- cd trunk && python setup.py install --prefix "$PREFIX" --root "$DESTDIR" diff --git a/strata/openstack-services/ironic.morph b/strata/openstack-services/ironic.morph new file mode 100644 index 00000000..850399b4 --- /dev/null +++ b/strata/openstack-services/ironic.morph @@ -0,0 +1,17 @@ +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. +- | + install -D -m 0440 /proc/self/fd/0 <<'EOF' "$DESTDIR"/etc/sudoers.d/ironic-rootwrap + Defaults:ironic !requiretty + + ironic ALL=(root) NOPASSWD: /usr/bin/ironic-rootwrap /etc/ironic/rootwrap.conf * + EOF diff --git a/strata/openstack-services/librabbitmq.morph b/strata/openstack-services/librabbitmq.morph new file mode 100644 index 00000000..b87ce369 --- /dev/null +++ b/strata/openstack-services/librabbitmq.morph @@ -0,0 +1,10 @@ +name: librabbitmq +kind: chunk +build-system: python-distutils +configure-commands: +- (cd rabbitmq-c; rm -rf codegen; ln -sf ../rabbitmq-codegen ./codegen) +- (cd rabbitmq-c; autoreconf -fvi) +- (cd rabbitmq-c; automake --add-missing) +- (cd rabbitmq-c; ./configure --disable-tools --disable-docs) +- (cd rabbitmq-c; make distdir) +- mv rabbitmq-c/rabbitmq-c-0.5.3 clib diff --git a/strata/openstack-services/neutron.morph b/strata/openstack-services/neutron.morph new file mode 100644 index 00000000..b79a089b --- /dev/null +++ b/strata/openstack-services/neutron.morph @@ -0,0 +1,17 @@ +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 +- | + install -D -m 0440 /proc/self/fd/0 <<'EOF' "$DESTDIR"/etc/sudoers.d/neutron-rootwrap + Defaults:neutron !requiretty + + neutron ALL=(root) NOPASSWD: /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf * + EOF diff --git a/strata/openstack-services/nova.morph b/strata/openstack-services/nova.morph new file mode 100644 index 00000000..bb6dd756 --- /dev/null +++ b/strata/openstack-services/nova.morph @@ -0,0 +1,18 @@ +name: nova +kind: chunk +build-system: python-distutils +post-install-commands: +# Install rootwrap.conf +- install -D -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/ +# Add nova 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/nova-rootwrap + Defaults:nova !requiretty + + nova ALL=(root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf * + EOF diff --git a/strata/openstack-services/novnc.morph b/strata/openstack-services/novnc.morph new file mode 100644 index 00000000..858320a0 --- /dev/null +++ b/strata/openstack-services/novnc.morph @@ -0,0 +1,11 @@ +name: novnc +kind: chunk +install-commands: +- mkdir -p "$DESTDIR$PREFIX"/share/novnc/utils +- install -m 444 *html "$DESTDIR$PREFIX"/share/novnc +- install -m 444 vnc.html "$DESTDIR$PREFIX"/share/novnc/index.html +- mkdir -p "$DESTDIR$PREFIX"/share/novnc/include +- install -m 444 include/*.* "$DESTDIR$PREFIX"/share/novnc/include +- mkdir -p "$DESTDIR$PREFIX"/share/novnc/images +- install -m 444 images/*.* "$DESTDIR$PREFIX"/share/novnc/images +- install -d "$DESTDIR"/etc/sysconfig diff --git a/strata/openstack-services/open-iscsi.morph b/strata/openstack-services/open-iscsi.morph new file mode 100644 index 00000000..9d135ab2 --- /dev/null +++ b/strata/openstack-services/open-iscsi.morph @@ -0,0 +1,45 @@ +name: open-iscsi +kind: chunk +build-commands: +- make +install-commands: +# Rewrite prefix and exec_prefix which are set to "/usr" and "/" respectively +- make prefix="$PREFIX" exec_prefix="$PREFIX" DESTDIR="$DESTDIR" install +# Install iscsistart app which is not listed by default in PROGRAMS +- make prefix="$PREFIX" exec_prefix="$PREFIX" DESTDIR="$DESTDIR" PROGRAMS="usr/iscsistart" install +post-install-commands: +# Configure iscsi daemon +# Point the startup to the installed binary +- | + sed -i -e "s|iscsid.startup = \/sbin\/iscsid|iscsid.startup = "$PREFIX"/sbin/iscsid|" \ + etc/iscsid.conf +# Start up a session automatically +- sed -i -e 's|node.startup = manual|node.startup = automatic|' etc/iscsid.conf +# Install config file +- install -D -m 644 etc/iscsid.conf "$DESTDIR"/etc/iscsi +# Install custom systemd unit file +- | + install -D -m 644 /proc/self/fd/0 << 'EOF' "$DESTDIR$PREFIX"/lib/systemd/system/iscsid.service + [Unit] + Description=Open iSCSI Daemon + After=network.target + + [Service] + Type=forking + ExecStart=/usr/sbin/iscsid + + [Install] + WantedBy=multi-user.target + EOF +# Install iscsi socket unit +- | + install -D -m 644 /proc/self/fd/0 << 'EOF' "$DESTDIR$PREFIX"/lib/systemd/system/iscsid.socket + [Unit] + Description=Open-iSCSI iscsid Socket + + [Socket] + ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE + + [Install] + WantedBy=sockets.target + EOF diff --git a/strata/openstack-services/pies.morph b/strata/openstack-services/pies.morph new file mode 100644 index 00000000..327c1dc9 --- /dev/null +++ b/strata/openstack-services/pies.morph @@ -0,0 +1,11 @@ +name: pies +kind: chunk +configure-commands: +- | + cd pies2override + && python setup.py build + && python setup.py install --prefix "$PREFIX" --root "$DESTDIR" +build-commands: +- python setup.py build +install-commands: +- python setup.py install --prefix "$PREFIX" --root "$DESTDIR" diff --git a/strata/openstack-services/pysendfile.morph b/strata/openstack-services/pysendfile.morph new file mode 100644 index 00000000..2e2f809b --- /dev/null +++ b/strata/openstack-services/pysendfile.morph @@ -0,0 +1,3 @@ +name: pysendfile +kind: chunk +build-system: python-distutils diff --git a/strata/openstack-services/qpid-python.morph b/strata/openstack-services/qpid-python.morph new file mode 100644 index 00000000..203b3db5 --- /dev/null +++ b/strata/openstack-services/qpid-python.morph @@ -0,0 +1,6 @@ +name: qpid-python +kind: chunk +build-commands: +- cd qpid/python && python setup.py build +install-commands: +- cd qpid/python && python setup.py install --prefix "$PREFIX" --root "$DESTDIR" diff --git a/strata/openstack-services/rabbitmq-codegen.morph b/strata/openstack-services/rabbitmq-codegen.morph new file mode 100644 index 00000000..2b06aeb5 --- /dev/null +++ b/strata/openstack-services/rabbitmq-codegen.morph @@ -0,0 +1,7 @@ +name: rabbitmq-codegen +kind: chunk +configure-commands: [] +build-commands: [] +install-commands: +- mkdir -p "$DESTDIR$PREFIX"/lib/rabbitmq-codegen +- cp * "$DESTDIR$PREFIX"/lib/rabbitmq-codegen diff --git a/strata/openstack-services/rabbitmq-server.morph b/strata/openstack-services/rabbitmq-server.morph new file mode 100644 index 00000000..97b8a126 --- /dev/null +++ b/strata/openstack-services/rabbitmq-server.morph @@ -0,0 +1,16 @@ +name: rabbitmq-server +kind: chunk +configure-commands: +- mkdir -p codegen +- cp /usr/lib/rabbitmq-codegen/* codegen +build-commands: +- make +install-commands: +- | + make install_bin TARGET_DIR="$DESTDIR$PREFIX" \ + SBIN_DIR="$DESTDIR$PREFIX"/sbin \ + MAN_DIR="$PREFIX"/share/man \ + DOC_INSTALL_DIR="$PREFIX"/share + +post-install-commands: +- rm "$DESTDIR$PREFIX"/LICENSE* "$DESTDIR$PREFIX"/INSTALL diff --git a/strata/openstack-services/rtslib-fb.morph b/strata/openstack-services/rtslib-fb.morph new file mode 100644 index 00000000..26de3f9b --- /dev/null +++ b/strata/openstack-services/rtslib-fb.morph @@ -0,0 +1,27 @@ +name: rtslib-fb +kind: chunk +build-system: python-distutils +post-install-commands: +- mkdir -p "$DESTDIR$PREFIX"/lib/systemd/system + +# The following systemd unit is from the fedora package see +# http://pkgs.fedoraproject.org/cgit/python-rtslib.git/tree/target.service for +# more information + +- | + install -D -m 0644 /proc/self/fd/0 <<'EOF' "$DESTDIR$PREFIX"/lib/systemd/system/target.service + [Unit] + Description=Restore LIO kernel target configuration + Requires=sys-kernel-config.mount + After=sys-kernel-config.mount network.target local-fs.target + + [Service] + Type=oneshot + RemainAfterExit=yes + ExecStart=/usr/bin/targetctl restore + ExecStop=/usr/bin/targetctl clear + SyslogIdentifier=target + + [Install] + WantedBy=multi-user.target + EOF diff --git a/strata/openstack-services/singledispatch.morph b/strata/openstack-services/singledispatch.morph new file mode 100644 index 00000000..919c7096 --- /dev/null +++ b/strata/openstack-services/singledispatch.morph @@ -0,0 +1,3 @@ +name: singledispatch +kind: chunk +build-system: python-distutils diff --git a/strata/openstack-services/tempest.morph b/strata/openstack-services/tempest.morph new file mode 100644 index 00000000..da42c929 --- /dev/null +++ b/strata/openstack-services/tempest.morph @@ -0,0 +1,11 @@ +name: tempest +kind: chunk +build-system: python-distutils +post-install-commands: +- mkdir -p "$DESTDIR"/etc/tempest + +# Tempest is not supposed to be installed, just cloned and used from the clone, +# that's why we copy all the contents of the repository here, given that we +# don't know yet what things we can avoid copying. +- cp -R * "$DESTDIR"/etc/tempest +- cp .testr.conf "$DESTDIR"/etc/tempest diff --git a/strata/openstack-services/tftp-hpa.morph b/strata/openstack-services/tftp-hpa.morph new file mode 100644 index 00000000..d466d2d4 --- /dev/null +++ b/strata/openstack-services/tftp-hpa.morph @@ -0,0 +1,5 @@ +name: tftp-hpa +build-system: autotools +kind: chunk +install-commands: +- make INSTALLROOT="$DESTDIR" install diff --git a/strata/openstack-services/thrift.morph b/strata/openstack-services/thrift.morph new file mode 100644 index 00000000..39062351 --- /dev/null +++ b/strata/openstack-services/thrift.morph @@ -0,0 +1,6 @@ +name: thrift +kind: chunk +build-system: autotools +max-jobs: 1 +pre-configure-commands: +- ./bootstrap.sh |