summaryrefslogtreecommitdiff
path: root/vm-data
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-06-12 20:18:55 +0100
committerLars Wirzenius <liw@liw.fi>2013-06-12 20:18:55 +0100
commit03edad5fca66296557618cac08fcd38a517affc1 (patch)
tree0db9820287c9cfd10e0a260765197ad096070ba0 /vm-data
parentcbc58a1fd3a068296e391a43b290094203ca7a70 (diff)
downloadjenkinstool-03edad5fca66296557618cac08fcd38a517affc1.tar.gz
Install an /etc/hosts on each node
Diffstat (limited to 'vm-data')
-rw-r--r--vm-data/hosts15
-rwxr-xr-xvm-data/jenkins.customize10
-rwxr-xr-xvm-data/worker.customize2
3 files changed, 23 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
@@ -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 <<EOF >> "$rootdir/etc/sudoers"
jenkins ALL=(ALL:ALL) NOPASSWD: ALL
EOF
+# Append addresses to /etc/hosts.
+cat vm-data/hosts >> "$rootdir/etc/hosts"