-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtemplate.json
More file actions
106 lines (106 loc) · 3.74 KB
/
template.json
File metadata and controls
106 lines (106 loc) · 3.74 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
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
{
"variables": {
"cloud_token": "{{ env `VAGRANT_CLOUD_TOKEN` }}",
"cpus": "4",
"disk_size": "51200",
"headless": "false",
"memory": "4096",
"name": "bitcoin-virtual-machine-{{timestamp}}",
"preseed_file_name": "preseed.cfg",
"ssh_username": "bitcoin",
"ssh_password": "bitcoin",
"ubuntu_codename": "cosmic",
"ubuntu_mirror": "http://archive.ubuntu.com/ubuntu/dists/",
"version": "1.0.{{timestamp}}"
},
"sensitive-variables": ["cloud_token"],
"builders":
[
{
"type": "virtualbox-iso",
"boot_command":
[
"<tab>",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed_file_name` }} ",
"auto=true ",
"net.ifnames=0 ",
"hostname=localhost ",
"<enter>"
],
"boot_wait": "5s",
"disk_size": "{{ user `disk_size` }}",
"guest_os_type": "Ubuntu_64",
"hard_drive_interface": "sata",
"headless": "{{ user `headless` }}",
"http_directory": "http",
"iso_checksum": "b0bbeca78e7e8a2c4d20d830c015ed12cdb30f6cbedd0f63e7d686c00378953e",
"iso_checksum_type": "sha256",
"iso_checksum_url": "{{ user `ubuntu_mirror` }}{{ user `ubuntu_codename` }}/main/installer-amd64/current/images/SHA256SUMS",
"iso_urls": [
"iso/ubuntu1810_desktop.iso",
"{{ user `ubuntu_mirror` }}{{ user `ubuntu_codename` }}/main/installer-amd64/current/images/netboot/mini.iso"
],
"output_directory": "outputs/{{ user `name` }}-virtualbox-iso",
"post_shutdown_delay": "10s",
"shutdown_command": "sudo shutdown -P now",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_wait_timeout": "60m",
"vboxmanage": [
["modifyvm", "{{ .Name }}", "--cpus", "{{ user `cpus` }}"],
["modifyvm", "{{ .Name }}", "--memory", "{{ user `memory` }}"],
["modifyvm", "{{ .Name }}", "--clipboard", "bidirectional"],
["modifyvm", "{{ .Name }}", "--draganddrop", "bidirectional"],
["modifyvm", "{{ .Name }}", "--usb", "on"],
["modifyvm", "{{ .Name }}", "--usbehci", "on"],
["modifyvm", "{{ .Name }}", "--usbxhci", "on"],
["setextradata", "{{ .Name }}", "GUI/ScaleFactor", "1.6"]
],
"vm_name": "{{ user `name` }}"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "{{ .Vars }} sudo -E bash -x '{{ .Path }}'",
"scripts": [
"scripts/vagrant_insecure_ssh.sh"
]
},
{
"type": "ansible",
"extra_arguments": [
"--extra-vars",
"ansible_python_interpreter=/usr/bin/python3"
],
"playbook_file": "../ansible/playbook.yml",
"user": "bitcoin"
},
{
"type": "shell",
"execute_command": "{{ .Vars }} sudo -E bash -x '{{ .Path }}'",
"scripts": [
"scripts/install_VBoxGuestAdditions.sh"
]
}
],
"post-processors": [
[
{
"type": "vagrant",
"keep_input_artifact": true,
"compression_level": 6,
"vagrantfile_template": "Vagrantfile.template",
"output": "../packer/outputs/{{ user `name` }}-{{ .Provider }}.box"
},
{
"type": "vagrant-cloud",
"access_token": "{{user `cloud_token`}}",
"box_tag": "bitcoin-studio/Bitcoin-VirtualMachine",
"no_release": false,
"version_description": "Ubuntu 18.10 VirtualBox image packaged with softwares for Bitcoin / Lightning Network like Bitcoin Core, LND, c-lightning, Electrum, a BitcoinJS guide, etc. The image is ideal for Bitcoin workshops, hackathons, etc. Have a look at the readme of this project to learn how to run the box => https://github.com/bitcoin-studio/Bitcoin-VirtualMachine",
"version": "{{user `version`}}"
}
]
]
}