Commit | Line | Data |
---|---|---|
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 | ||
20 | echo " | |
21 | ci-slave-x32-02-01 i386 52:54:00:bf:45:af cloud02.internal.efficios.com | |
22 | ci-slave-x32-02-02 i386 52:54:00:8d:b6:5e cloud02.internal.efficios.com | |
23 | ci-slave-x32-02-03 i386 52:54:00:97:ab:8c cloud02.internal.efficios.com | |
24 | ci-slave-x32-02-04 i386 52:54:00:d1:22:0b cloud02.internal.efficios.com | |
25 | ||
26 | ci-slave-x64-02-01 amd64 52:54:00:c3:1a:30 cloud02.internal.efficios.com | |
27 | ci-slave-x64-02-02 amd64 52:54:00:b1:92:a3 cloud02.internal.efficios.com | |
28 | ci-slave-x64-02-03 amd64 52:54:00:3a:6b:ca cloud02.internal.efficios.com | |
29 | ci-slave-x64-02-04 amd64 52:54:00:c9:91:d1 cloud02.internal.efficios.com" | \ | |
30 | while read node arch mac host | |
31 | do | |
32 | ||
33 | if [ "x$host" != "x" ]; then | |
34 | ||
35 | virt-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 | ||
48 | sleep 10 | |
49 | fi | |
50 | ||
51 | done | |
52 |