lj-packer/build.json

118 lines
4.0 KiB
JSON
Raw Normal View History

2020-09-21 17:03:01 +00:00
{
"variables": {
"user": "root",
"password": "laser",
"disk_size": "100000",
"domain": ""
},
"builders": [
{
"type": "lxc",
2020-09-23 16:56:10 +00:00
"name": "teamlaser-lj-lxc",
2020-09-21 17:03:01 +00:00
"config_file": "files/lxc/config",
"template_name": "debian",
"template_environment_vars": ["SUITE=buster"],
2020-09-23 16:56:10 +00:00
"output_directory": "output-lxc"
2020-09-21 17:03:01 +00:00
},
{
"headless": false,
2020-09-23 16:56:10 +00:00
"name": "teamlaser-lj",
2020-09-21 17:03:01 +00:00
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size` }}",
"output_directory": "output",
"boot_key_interval": "20ms",
"iso_url": "http://cdimage.debian.org/debian-cd/10.5.0/amd64/iso-cd/debian-10.5.0-amd64-netinst.iso",
"iso_checksum": "sha256:93863e17ac24eeaa347dfb91dddac654f214c189e0379d7c28664a306e0301e7",
"http_directory": "http",
"ssh_username": "{{ user `user` }}",
"ssh_password": "{{ user `password` }}",
"shutdown_command": "echo '{{ user `password` }}' | sudo -S shutdown -h now",
2020-09-23 16:56:10 +00:00
"ssh_wait_timeout": "60m",
"qemuargs": [
[ "-m", "2048M" ]
],
"boot_wait": "2s",
"boot_command": [
"<esc><wait><wait>",
"install ",
"auto=true ",
"priority=critical ",
"interface=auto ",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"<enter>"
]
},
{
"headless": false,
"name": "teamlaser-lj-xfce",
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size` }}",
"output_directory": "output-xfce",
"boot_key_interval": "20ms",
"iso_url": "http://cdimage.debian.org/debian-cd/10.5.0/amd64/iso-cd/debian-10.5.0-amd64-xfce-CD-1.iso",
"iso_checksum": "sha256:14ca00bafcaf124ef2cab9da2f51d75044232ba9630a067d8664fabcb5e26ec2",
"http_directory": "http",
"ssh_username": "{{ user `user` }}",
"ssh_password": "{{ user `password` }}",
"shutdown_command": "echo '{{ user `password` }}' | sudo -S shutdown -h now",
2020-09-21 17:03:01 +00:00
"ssh_wait_timeout": "60m",
"qemuargs": [
[ "-m", "2048M" ]
],
"boot_wait": "2s",
"boot_command": [
"<esc><wait><wait>",
"install ",
"auto=true ",
"priority=critical ",
"interface=auto ",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"<enter>"
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 3",
"apt update",
2020-09-23 16:56:10 +00:00
"apt install -y --no-install-recommends cmake git libasound2-dev libjack-dev libsdl1.2-dev network-manager nginx portaudio19-dev python3-dev python3-pip python3-rtmidi redis-server screen ssh ssl-cert ",
"pip3 install setuptools",
"pip3 install DMXEnttecPro mido numpy pysimpledmx redis scipy ",
"git clone https://github.com/ptone/pyosc --depth 1 /tmp/pyosc && cd /tmp/pyosc && ./setup.py install ",
"cd /tmp && git clone https://github.com/Ableton/link.git && cd link && git submodule update --init --recursive && mkdir build && cd build && cmake .. && cmake --build . ",
"cd /tmp/ && git clone --recursive https://github.com/gonzaloflirt/link-python.git && cd link-python && mkdir build && cd build && cmake .. && cmake --build . ",
"cd /opt/ && git clone https://git.interhacker.space/teamlaser/LJ "
2020-09-21 17:03:01 +00:00
]
},
{
"type": "file",
2020-09-23 16:56:10 +00:00
"source": "files/nginx/laser.conf",
"destination": "/etc/nginx/sites-enabled/laser.conf"
2020-09-21 17:03:01 +00:00
},
{
2020-09-23 16:56:10 +00:00
"type": "file",
"source": "files/root/.bashrc",
"destination": "/root/.bashrc"
2020-09-21 17:03:01 +00:00
}
]
}