From 03edad5fca66296557618cac08fcd38a517affc1 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 12 Jun 2013 20:18:55 +0100 Subject: Install an /etc/hosts on each node --- vm-data/hosts | 15 +++++++++++++++ vm-data/jenkins.customize | 10 ++++++---- vm-data/worker.customize | 2 ++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 vm-data/hosts (limited to 'vm-data') diff --git a/vm-data/hosts b/vm-data/hosts new file mode 100644 index 0000000..24dcc28 --- /dev/null +++ b/vm-data/hosts @@ -0,0 +1,15 @@ + + +# This needs to be fixed for every new installation, but not +# for upgrades. I should probably figure out a way determine +# these automatically, or to force libvirt to use specific +# addresses. Or something. Meh. + +192.168.122.5 jenkins +192.168.122.114 jenkins-sid-amd64 +192.168.122.230 jenkins-sid-i386 +192.168.122.229 jenkins-squeeze-amd64 +192.168.122.236 jenkins-squeeze-i386 +192.168.122.121 jenkins-wheezy-amd64 +192.168.122.150 jenkins-wheezy-i386 + diff --git a/vm-data/jenkins.customize b/vm-data/jenkins.customize index 174fe2b..5123ddf 100755 --- a/vm-data/jenkins.customize +++ b/vm-data/jenkins.customize @@ -3,17 +3,17 @@ # vm-data/jenkins.customize - customize disk image for jenkins master node # # Copyright 2012 Lars Wirzenius -# +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . @@ -81,7 +81,7 @@ install -m 0644 vm-data/jenkins.user-key.pub \ # Install the worker user key into Jenkins's allowed_keys file. install -m 0600 vm-data/worker.user-key.pub \ "$rootdir/var/lib/jenkins/.ssh/authorized_keys" - + # Disable ssh host key checking. echo "StrictHostKeyChecking no" >> "$rootdir/etc/ssh/ssh_config" @@ -91,3 +91,5 @@ chroot "$rootdir" chown -R jenkins:jenkins /var/lib/jenkins/.ssh/. # Create the web-accessible artifact repository for the CI system. chroot "$rootdir" install -d -o jenkins -g jenkins /var/www/jenkins +# Append addresses to /etc/hosts. +cat vm-data/hosts >> "$rootdir/etc/hosts" diff --git a/vm-data/worker.customize b/vm-data/worker.customize index 546af18..8337dbf 100755 --- a/vm-data/worker.customize +++ b/vm-data/worker.customize @@ -62,3 +62,5 @@ cat <> "$rootdir/etc/sudoers" jenkins ALL=(ALL:ALL) NOPASSWD: ALL EOF +# Append addresses to /etc/hosts. +cat vm-data/hosts >> "$rootdir/etc/hosts" -- cgit v1.2.1