lj-packer/build.json

92 lines
2.8 KiB
JSON

{
"variables": {
"user": "root",
"password": "laser",
"disk_size": "100000",
"domain": ""
},
"builders": [
{
"type": "lxc",
"name": "buster-lxc",
"config_file": "files/lxc/config",
"template_name": "debian",
"template_environment_vars": ["SUITE=buster"],
"output_directory": "output"
},
{
"headless": false,
"name": "buster-kvm",
"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",
"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",
"apt install -y --no-install-recommends git htop libasound2-dev libjack-dev nginx python3-pip redis-server screen ssh syncthing supervisor tmux portaudio19-dev cmake ",
"pip3 install DMXEnttecPro mido numpy pygame==1.9.2 pysimpledmx python-rtmidi redis scipy "
]
},
{
"type": "file",
"source": "files/supervisor-syncthing.conf",
"destination": "/etc/supervisor/conf.d/supervisor-syncthing.conf"
},
{
"type": "shell",
"inline": [
"git clone https://github.com/ptone/pyosc --depth 1 /tmp/pyosc && cd /tmp/pyosc && ./setup.py install "
]
},
{
"type": "shell",
"inline": [
"cd /tmp && git clone https://github.com/Ableton/link.git && cd link && git submodule update --init --recursive && mkdir build && cd build && cmake .. && cmake --build . "
]
},
{
"type": "shell",
"inline": [
"cd /tmp/ && git clone --recursive https://github.com/gonzaloflirt/link-python.git && cd link-python && mkdir build && cd build && cmake .. && cmake --build . "
]
}
]
}