summaryrefslogtreecommitdiff
path: root/strata/openstack-services
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-13 15:42:05 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-04-16 16:23:04 +0000
commit0425200cc159e6baa007f8a80f451bb670452c71 (patch)
tree85aeb0594b69323acd2b958040c268916efb79cf /strata/openstack-services
parent1ec9fced3606cf71c80414093289672ef56c4b92 (diff)
downloaddefinitions-0425200cc159e6baa007f8a80f451bb670452c71.tar.gz
Add Openstack system
Add Openstack system and stratum pointing they components to Juno tag 2014.2.1. Change-Id: Iaa9a31c44b0a2c711c5a147dc3156bab14577fb7 Signed-off-by: Pedro Alvarez <pedro.alvarez@codethink.co.uk> Signed-off-by: Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> Signed-off-by: Richard Maw <richard.maw@codethink.co.uk> Signed-off-by: Richard Ipsum <richard.ipsum@codethink.co.uk> Signed-off-by: Patrick Darley <patrick.darley@codethink.co.uk> Signed-off-by: Zara Zaimeche <zara.zaimeche@codethink.co.uk> Signed-off-by: Mike Smith <mike.smith@codethink.co.uk>
Diffstat (limited to 'strata/openstack-services')
-rw-r--r--strata/openstack-services/cinder.morph18
-rw-r--r--strata/openstack-services/horizon.morph59
-rw-r--r--strata/openstack-services/ipaddr-py.morph6
-rw-r--r--strata/openstack-services/librabbitmq.morph10
-rw-r--r--strata/openstack-services/neutron.morph17
-rw-r--r--strata/openstack-services/nova.morph18
-rw-r--r--strata/openstack-services/novnc.morph11
-rw-r--r--strata/openstack-services/open-iscsi.morph45
-rw-r--r--strata/openstack-services/pies.morph11
-rw-r--r--strata/openstack-services/python-xattr.morph8
-rw-r--r--strata/openstack-services/qpid-python.morph6
-rw-r--r--strata/openstack-services/rabbitmq-codegen.morph7
-rw-r--r--strata/openstack-services/rabbitmq-server.morph16
-rw-r--r--strata/openstack-services/rtslib-fb.morph27
-rw-r--r--strata/openstack-services/subunit.morph3
-rw-r--r--strata/openstack-services/tempest.morph11
-rw-r--r--strata/openstack-services/thrift.morph6
17 files changed, 279 insertions, 0 deletions
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/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/python-xattr.morph b/strata/openstack-services/python-xattr.morph
new file mode 100644
index 00000000..7916bbf2
--- /dev/null
+++ b/strata/openstack-services/python-xattr.morph
@@ -0,0 +1,8 @@
+name: python-xattr
+kind: chunk
+configure-commands:
+- cp -r /usr/lib/python2.7/site-packages/cffi .
+build-commands:
+- python setup.py build
+install-commands:
+- python setup.py install --prefix "$PREFIX" --root "$DESTDIR"
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/subunit.morph b/strata/openstack-services/subunit.morph
new file mode 100644
index 00000000..b7b43a39
--- /dev/null
+++ b/strata/openstack-services/subunit.morph
@@ -0,0 +1,3 @@
+name: python-subunit
+kind: chunk
+build-system: autotools
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/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