forked from seecloud/os-image-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcentos7.json
93 lines (88 loc) · 2.96 KB
/
centos7.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"variables": {
"iso": "/tmp/CentOS-7-x86_64-Minimal-1511.iso",
"iso_md5": "88c0437f0a14c6e2c94426df9d43cd67",
"ksfile": "config/custom.ks",
"rpm_packages": "kernel-devel gcc python-devel python-netaddr python-pip python-virtualenv docker-latest ansible nginx git mc python-docker-py vim-enhanced tcpdump mlocate glusterfs glusterfs-api glusterfs-cli glusterfs-client-xlators glusterfs-fuse glusterfs-libs glusterfs-server keepalived python-gluster bash-completion socat libselinux-python python-httplib2 wget device-mapper-libs policycoreutils-python python-IPy setools-libs",
"dst_iso": "/tmp/centos-image.iso",
"disk_size": "20480",
"user": "mirantis",
"password": "mirantis"
},
"builders":
[
{
"vm_name": "centos-7.2-x86_64-server",
"type": "virtualbox-iso",
"format": "ovf",
"disk_size": "{{ user `disk_size`}}",
"guest_os_type": "RedHat_64",
"iso_url": "file://{{user `iso`}}",
"iso_checksum": "{{user `iso_md5`}}",
"iso_checksum_type": "md5",
"output_directory": "output-centos-7.2-x86_64-{{build_type}}",
"http_directory": "http",
"headless": "true",
"boot_wait": "5s",
"boot_command": [
"<esc>",
"<wait>",
"linux inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks.cfg biosdevname=0 net.ifnames=0 ",
"console=tty0 console=ttyS0,19200n8",
"<enter>"
],
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "10m",
"shutdown_command": "sudo systemctl poweroff"
},
{
"vm_name": "centos-7.2-x86_64-server",
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "file://{{user `iso`}}",
"iso_checksum": "{{user `iso_md5`}}",
"iso_checksum_type": "md5",
"output_directory": "output-centos-7.2-x86_64-{{build_type}}",
"http_directory": "http",
"headless": "true",
"boot_wait": "5s",
"qemuargs": [
[ "-serial", "file:serial.out" ],
[ "-m", "1024M" ]
],
"boot_command": [
"<esc>",
"<wait>",
"linux inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks.cfg biosdevname=0 net.ifnames=0 ",
"console=tty0 console=ttyS0,19200n8",
"<enter>"
],
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "10m",
"shutdown_command": "sudo systemctl poweroff"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"environment_vars": [
"GPG_UID={{user `gpg_uid`}}",
"RPM_PACKAGES={{user `rpm_packages`}}"
],
"scripts": [
"scripts/provision.sh"
]
},
{
"type": "file",
"source": "/tmp/centos.iso",
"destination": "{{user `dst_iso`}}",
"direction": "download"
}
]
}