Repository navigation
Expand file tree
/
Copy pathdevbox.json
More file actions
77 lines (77 loc) · 2.75 KB
/
Copy pathdevbox.json
File metadata and controls
77 lines (77 loc) · 2.75 KB
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
{
"variables": {
"ssh_name": "vagrant",
"ssh_pass": "vagrant",
"hostname": "devbox"
},
"builders": [
{
"type": "vmware-iso",
"iso_url": "http://stable.release.core-os.net/amd64-usr/557.2.0/coreos_production_iso_image.iso",
"iso_checksum": "b4c9d3ad20b399ff6d7f6a7da35d06b5",
"iso_checksum_type": "md5",
"ssh_username": "{{user `ssh_name`}}",
"ssh_password": "{{user `ssh_pass`}}",
"ssh_port": "22",
"ssh_wait_timeout": "20m",
"http_directory" : ".",
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"guest_os_type": "linux",
"boot_wait": "40s",
"boot_command": [
"sudo iptables -A INPUT -p tcp --dport 22 -j DROP <enter>",
"curl -k http://{{ .HTTPIP }}:{{ .HTTPPort }}/cloud-config.yaml > cloud-config.yaml <enter>",
"sudo coreos-install -d /dev/sda -C stable -c cloud-config.yaml <enter>",
"sudo reboot <enter>"
]
},
{
"type": "virtualbox-iso",
"iso_url": "http://stable.release.core-os.net/amd64-usr/557.2.0/coreos_production_iso_image.iso",
"iso_checksum": "b4c9d3ad20b399ff6d7f6a7da35d06b5",
"iso_checksum_type": "md5",
"ssh_username": "{{user `ssh_name`}}",
"ssh_password": "{{user `ssh_pass`}}",
"ssh_port": "22",
"ssh_wait_timeout": "20m",
"http_directory" : ".",
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
"guest_os_type": "Linux_64",
"boot_wait": "40s",
"guest_additions_mode": "disable",
"boot_command": [
"sudo iptables -A INPUT -p tcp --dport 22 -j DROP <enter>",
"curl -k http://{{ .HTTPIP }}:{{ .HTTPPort }}/cloud-config.yaml > cloud-config.yaml <enter>",
"sudo coreos-install -d /dev/sda -C stable -c cloud-config.yaml <enter>",
"sudo reboot <enter>"
]
}
],
"provisioners": [{
"type": "shell",
"inline": [
"sudo mkdir -p /opt/bin",
"sudo curl -o /opt/bin/fig -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m`",
"sudo chmod +x /opt/bin/fig",
"sudo curl -o /opt/bin/docker-compose -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m`",
"sudo chmod +x /opt/bin/docker-compose",
"sudo mkdir -p /etc/conf.d && sudo touch /etc/conf.d/nfs",
"sudo systemctl enable rpc-statd.service",
"sudo systemctl start rpc-statd.service",
"sudo fallocate -l 2048m /2GiB.swap",
"sudo chmod 600 /2GiB.swap",
"sudo chattr +C /2GiB.swap",
"sudo mkswap /2GiB.swap"
]
}],
"post-processors": [
[
{
"type": "vagrant",
"output": "devbox_{{.Provider}}.box",
"vagrantfile_template": "vagrant/Vagrantfile",
"include": ["vagrant/configure_networks.rb"]
}
]
]
}