-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-centos7.json
145 lines (145 loc) · 5.42 KB
/
template-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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{
"description": "Create Vagrant boxes for CentOS (7.2)",
"push": {
"name": "",
"vcs": true
},
"variables": {
"atlas_username": "{{env `ATLAS_USERNAME`}}",
"atlas_name": "{{env `ATLAS_NAME`}}",
"atlas_token": "{{env `ATLAS_TOKEN`}}",
"version": "0.0.2",
"iso_checksum": "99d305fa40ec9e28ef8450c3bcc45f85",
"iso_checksum_type": "md5",
"iso_url": "http://mirrors.clouvider.net/CentOS/7.2.1511/isos/x86_64/CentOS-7-x86_64-NetInstall-1511.iso"
},
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/base.sh",
"scripts/virtualbox.sh",
"scripts/vmware.sh",
"scripts/vagrant.sh",
"scripts/dep.sh",
"scripts/cleanup.sh",
"scripts/zerodisk.sh"
],
"override": {
"virtualbox-iso": {
"execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'"
},
"qemu": {
"execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'"
},
"vmware-iso": {
"execute_command": "echo 'vagrant'|sudo -S bash '{{.Path}}'"
}
}
}
],
"builders": [
{
"type": "virtualbox-iso",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks-{{user `atlas_name`}}.cfg<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 8192,
"guest_os_type": "RedHat_64",
"http_directory": "http",
"iso_checksum": "{{ user `iso_checksum`}}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_url": "{{ user `iso_url` }}",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version"
},
{
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks-{{user `atlas_name`}}.cfg<enter><wait>"
],
"boot_wait": "2s",
"disk_size": 8192,
"http_directory": "http",
"iso_checksum": "{{ user `iso_checksum`}}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_url": "{{ user `iso_url` }}",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'"
},
{
"type": "vmware-iso",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks-{{user `atlas_name`}}.cfg<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 8192,
"guest_os_type": "RedHat-64",
"http_directory": "http",
"iso_checksum": "{{ user `iso_checksum`}}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"iso_url": "{{ user `iso_url` }}",
"skip_compaction": true,
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo '/sbin/halt -h -p' > shutdown.sh; echo 'vagrant'|sudo -S bash 'shutdown.sh'",
"tools_upload_flavor": "linux"
}
],
"post-processors": [
[{
"type": "vagrant",
"output": "centos7_{{.BuildName}}_{{.Provider}}_{{ user `version`}}.box",
"keep_input_artifact": false
},
{
"type": "atlas",
"token": "{{user `atlas_token`}}",
"only": ["vmware-iso"],
"artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"artifact_type": "vagrant.box",
"metadata": {
"provider": "vmware_desktop",
"description": "Base CentOS (7.2) with guest addition (64bit)",
"version": "{{user `version`}}"
}
},
{
"type": "atlas",
"token": "{{user `atlas_token`}}",
"only": ["qemu"],
"artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"artifact_type": "vagrant.box",
"metadata": {
"provider": "libvirt",
"description": "Base CentOS (7.2) (64bit)",
"version": "{{user `version`}}"
}
},
{
"type": "atlas",
"token": "{{user `atlas_token`}}",
"only": ["virtualbox-iso"],
"artifact": "{{user `atlas_username`}}/{{user `atlas_name`}}",
"artifact_type": "vagrant.box",
"metadata": {
"provider": "virtualbox",
"description": "Base CentOS (7.2) with guest addition for VirtualBox (64bit)",
"version": "{{user `version`}}"
}
}]
]
}