summaryrefslogtreecommitdiff
path: root/strata/openstack-services/open-iscsi.morph
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 12:13:45 +0000
commitf6921ade37f0f26f3c62e92a49a4aae752a8572f (patch)
tree212e0b0dcc8de3c7de0da7ccadc2a5048c58a2dc /strata/openstack-services/open-iscsi.morph
parent063aec5c91bbf011d10ebc41b2c2d8631e03109e (diff)
downloaddefinitions-f6921ade37f0f26f3c62e92a49a4aae752a8572f.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/open-iscsi.morph')
-rw-r--r--strata/openstack-services/open-iscsi.morph45
1 files changed, 45 insertions, 0 deletions
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