summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-03-25 15:02:07 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-03-26 17:35:43 +0000
commit4e5378031a9369cdb430586fbd3daab0bf35f9cc (patch)
treeb94586dbe5379f34d84d2c45aa9a4d92b07e08fa
parent9842ea3c643b93d8adf85cccc733e1e596c9cc90 (diff)
downloaddefinitions-baserock/pedroalvarez/improve-distbuild-deployment.tar.gz
Install distbuild files in distbuild.configurebaserock/pedroalvarez/improve-distbuild-deployment
Change-Id: If0f154354ddadc77603072fda72cda3a0a2aa480
-rw-r--r--distbuild.configure45
-rw-r--r--distbuild/manifest28
2 files changed, 41 insertions, 32 deletions
diff --git a/distbuild.configure b/distbuild.configure
index 062aaecc..1499c679 100644
--- a/distbuild.configure
+++ b/distbuild.configure
@@ -40,6 +40,44 @@
set -e
+ROOT="$1"
+
+##########################################################################
+# Copy Distbuild files into root filesystem
+##########################################################################
+
+mkdir -p "$ROOT"/usr/share/distbuild-setup
+for file in morph.conf morph-cache-server.conf morph-controller.conf \
+ morph-controller-helper.conf morph-worker.conf morph-worker-helper.conf; do
+
+ cp distbuild/usr/share/distbuild-setup/$file \
+ "$ROOT"/usr/share/distbuild-setup/
+done
+
+
+mkdir -p "$ROOT"/usr/lib/distbuild-setup/ansible
+for file in hosts distbuild-setup; do
+
+ cp distbuild/usr/lib/distbuild-setup/ansible/$file \
+ "$ROOT"/usr/lib/distbuild-setup/ansible/
+done
+
+
+mkdir -p "$ROOT"/usr/lib/systemd/system/
+for file in morph-cache-server.service morph-controller.service \
+ morph-controller-helper.service morph-worker.service \
+ morph-worker-helper.service distbuild-setup.service; do
+
+ cp distbuild/usr/lib/systemd/system/$file \
+ "$ROOT"/usr/lib/systemd/system/
+done
+
+ln -s ../distbuild-setup.service "$ROOT"/etc/systemd/system/multi-user.target.wants/distbuild-setup.service
+
+##########################################################################
+# Check variables
+##########################################################################
+
if [ -n "$DISTBUILD_GENERIC" ]; then
echo "Not configuring the distbuild node, it will be generic"
exit 0
@@ -95,20 +133,19 @@ if "$error_vars"; then
fi
-ROOT="$1"
+##########################################################################
+# Generate configuration for the distbuild node
+##########################################################################
DISTBUILD_DATA="$ROOT/etc/distbuild"
mkdir -p "$DISTBUILD_DATA"
-# If it's a worker, install the worker ssh key.
if [ "$DISTBUILD_WORKER" = True ]
then
install -m 0644 "$WORKER_SSH_KEY" "$DISTBUILD_DATA/worker.key"
fi
-
-# Create the configuration file
python <<'EOF' >"$DISTBUILD_DATA/distbuild.conf"
import os, sys, yaml
diff --git a/distbuild/manifest b/distbuild/manifest
deleted file mode 100644
index 35047028..00000000
--- a/distbuild/manifest
+++ /dev/null
@@ -1,28 +0,0 @@
-0040755 0 0 /lib
-0040755 0 0 /lib/systemd
-0040755 0 0 /lib/systemd/system-generators
-0100755 0 0 /lib/systemd/system-generators/ccache-nfs-mount-generator
-0040755 0 0 /usr
-0040755 0 0 /usr/lib
-0040755 0 0 /usr/lib/distbuild-setup
-0040755 0 0 /usr/lib/distbuild-setup/ansible
-0100644 0 0 /usr/lib/distbuild-setup/ansible/hosts
-0100644 0 0 /usr/lib/distbuild-setup/ansible/distbuild-setup.yml
-0040755 0 0 /usr/lib/systemd
-0040755 0 0 /usr/lib/systemd/system
-0100755 0 0 /usr/lib/systemd/system/morph-cache-server.service
-0100755 0 0 /usr/lib/systemd/system/morph-controller.service
-0100755 0 0 /usr/lib/systemd/system/morph-controller-helper.service
-0100755 0 0 /usr/lib/systemd/system/morph-worker.service
-0100755 0 0 /usr/lib/systemd/system/morph-worker-helper.service
-0100755 0 0 /usr/lib/systemd/system/distbuild-setup.service
-0040755 0 0 /usr/lib/systemd/system/multi-user.target.wants
-0120755 0 0 /usr/lib/systemd/system/multi-user.target.wants/distbuild-setup.service
-0040755 0 0 /usr/share
-0040755 0 0 /usr/share/distbuild-setup
-0100644 0 0 /usr/share/distbuild-setup/morph.conf
-0100644 0 0 /usr/share/distbuild-setup/morph-cache-server.conf
-0100644 0 0 /usr/share/distbuild-setup/morph-controller.conf
-0100644 0 0 /usr/share/distbuild-setup/morph-controller-helper.conf
-0100644 0 0 /usr/share/distbuild-setup/morph-worker.conf
-0100644 0 0 /usr/share/distbuild-setup/morph-worker-helper.conf