[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: enable 60gb tmpfs for /srv/workspace on the amd64 build nodes

Holger Levsen holger at moszumanska.debian.org
Mon Aug 10 11:45:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 13f6d4793e11868d541c3f3bf217c560bbce338f
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Aug 10 13:44:25 2015 +0200

    reproducible: enable 60gb tmpfs for /srv/workspace on the amd64 build nodes
---
 TODO          |  4 +---
 update_jdn.sh | 33 +++++++++++++++++++++------------
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/TODO b/TODO
index 65771a6..5ddf218 100644
--- a/TODO
+++ b/TODO
@@ -210,10 +210,8 @@ properties:
 * status of remote build nodes for amd64
 ** profitbricks-build1-amd64 is setup
 *** squid needs proper configuration
-*** tmpfs needs to be set up
 ** profitbricks-build1-amd64 is setup
 *** squid needs proper configuration
-*** tmpfs needs to be set up
 *** should run in the future: +1d+1m+1y
 * profitbricks-build2-amd64 will also host a VM (profitbricks-build2-amd64, so we will be running kvm on kvm there)
 ** networking doesnt work yet, so profitbricks-build3-amd64 aint accessable atm - help welcome!
@@ -354,7 +352,7 @@ properties:
 ** we build with sudo too
 *** change /usr/obj to be '~jenkins/obj' and build with WITH_INSTALL_AS_USER ?
 * first build world, later build ports (pkg info...)
-* investigate how to use tmpfs on freebsd and build there?
+* investigate how to use tmpfs on freebsd and build there
 
 ==== reproducible...
 
diff --git a/update_jdn.sh b/update_jdn.sh
index bc7f4ec..5ba411e 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -46,19 +46,28 @@ sudo mkdir -p /srv/workspace
 [ -h /chroots ] || sudo ln -s /srv/workspace/chroots /chroots
 [ -h /schroots ] || sudo ln -s /srv/schroots /schroots
 
-if [ "$HOSTNAME" = "jenkins" ] ; then
-	if ! grep -q '^tmpfs\s\+/srv/workspace\s' /etc/fstab; then
-		echo "tmpfs		/srv/workspace	tmpfs	defaults,size=100g	0	0" >> /etc/fstab
-	fi
-
-	if ! mountpoint -q /srv/workspace; then
-		if test -z "$(ls -A /srv/workspace)"; then
-			mount /srv/workspace
-		else
-			explain "mountpoint /srv/workspace is non-empty."
+# prepare tmpfs on some hosts
+case $HOSTNAME in
+	jenkins)			 	TMPFSSIZE=100 ;;
+	profitbricks-build?-amd64) 		TMPFSSIZE=60 ;;
+	profitbricks-build4-amd64) 		TMPFSSIZE=10 ;;
+	*) ;;
+esac
+case $HOSTNAME in
+	jenkins|profitbricks-build?-amd64)
+		if ! grep -q '^tmpfs\s\+/srv/workspace\s' /etc/fstab; then
+			echo "tmpfs		/srv/workspace	tmpfs	defaults,size=${TMPFSSIZE}g	0	0" >> /etc/fstab
 		fi
-	fi
-fi
+		if ! mountpoint -q /srv/workspace; then
+			if test -z "$(ls -A /srv/workspace)"; then
+				mount /srv/workspace
+			else
+				explain "mountpoint /srv/workspace is non-empty."
+			fi
+		fi
+		;;
+	*) ;;
+esac
 
 # make sure needed directories exists - some directories will not be needed on all hosts...
 for directory in /schroots /srv/reproducible-results /srv/d-i /srv/live-build /var/log/jenkins/ /srv/jenkins /srv/jenkins/pseudo-hosts /srv/workspace/chroots ; do

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list