ansible: Add new CI nodes
[lttng-ci.git] / automation / create-slave.sh
CommitLineData
816232c9
MJ
1#!/bin/sh -exu
2#
3# Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18# Dumb libvirt provisionning script for CI slaves
19
20echo "
21ci-slave-x32-02-01 i386 52:54:00:bf:45:af cloud02.internal.efficios.com
22ci-slave-x32-02-02 i386 52:54:00:8d:b6:5e cloud02.internal.efficios.com
23ci-slave-x32-02-03 i386 52:54:00:97:ab:8c cloud02.internal.efficios.com
24ci-slave-x32-02-04 i386 52:54:00:d1:22:0b cloud02.internal.efficios.com
25
26ci-slave-x64-02-01 amd64 52:54:00:c3:1a:30 cloud02.internal.efficios.com
27ci-slave-x64-02-02 amd64 52:54:00:b1:92:a3 cloud02.internal.efficios.com
28ci-slave-x64-02-03 amd64 52:54:00:3a:6b:ca cloud02.internal.efficios.com
29ci-slave-x64-02-04 amd64 52:54:00:c9:91:d1 cloud02.internal.efficios.com" | \
30while read node arch mac host
31do
32
33if [ "x$host" != "x" ]; then
34
35virt-install --name ${node} \
36 --ram 4096 \
37 --vcpus 8 \
38 --disk pool=default,size=20 \
39 --os-type linux \
40 --os-variant ubuntutrusty \
41 --network bridge=br102,mac="${mac}" \
42 --location "http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-${arch}/" \
43 --initrd-inject='preseed.cfg' \
44 --extra-args='debian-installer/locale=en_US.UTF-8 keyboard-configuration/layoutcode=us netcfg/choose_interface=auto hostname=unassigned' \
45 --connect=qemu+ssh://root@${host}/system \
46 >/dev/null 2>&1 &
47
48sleep 10
49fi
50
51done
52
This page took 0.030435 seconds and 4 git commands to generate.