diff options
author | Daniil Baturin <daniil@baturin.org> | 2016-03-04 20:06:14 +0500 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2016-03-04 20:06:14 +0500 |
commit | c6bca34587458c1abee07ff7af7d618ea2f40b9c (patch) | |
tree | 5915979baf9ddc4f509c28f028b0befb0526cd5a /scripts/packer.json | |
parent | a05a3660eaf913689d89dd2187415d8b211aabb2 (diff) | |
parent | 3e56d7456e55b46ceb1dbca6a8f5cbc5150e18f5 (diff) | |
download | vyos-build-c6bca34587458c1abee07ff7af7d618ea2f40b9c.tar.gz vyos-build-c6bca34587458c1abee07ff7af7d618ea2f40b9c.zip |
Merge pull request #2 from higebu/qemu-image
Add qemu image build scripts
Diffstat (limited to 'scripts/packer.json')
-rw-r--r-- | scripts/packer.json | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/scripts/packer.json b/scripts/packer.json new file mode 100644 index 00000000..5d5f201e --- /dev/null +++ b/scripts/packer.json @@ -0,0 +1,62 @@ +{ + "variables": { + "iso_url": "{{env `ISO_IMAGE`}}", + "iso_checksum": "{{env `ISO_MD5_SUM`}}", + "output_directory": "{{env `PACKER_BUILD_DIR`}}" + }, + "builders": + [ + { + "type": "qemu", + "iso_url": "{{user `iso_url`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "md5", + "output_directory": "{{user `output_directory`}}/qemu", + "shutdown_command": "sudo halt -p", + "disk_size": 4096, + "format": "raw", + "headless": true, + "accelerator": "kvm", + "ssh_host_port_min": 2222, + "ssh_host_port_max": 2229, + "ssh_username": "vyos", + "ssh_password": "vyos", + "ssh_port": 22, + "ssh_wait_timeout": "30s", + "vm_name": "vyos_qemu_image.img", + "net_device": "virtio-net", + "disk_interface": "virtio", + "boot_wait": "5s", + "boot_command": + [ + "<enter><wait10><wait10>", + "vyos<enter><wait>", + "vyos<enter><wait>", + "install image<enter><wait>", + "<enter><wait>", + "<enter><wait>", + "<enter><wait>", + "Yes<enter><wait>", + "<enter><wait10>", + "<enter><wait>", + "<enter><wait>", + "vyos<enter><wait>", + "vyos<enter><wait>", + "<enter><wait10>", + "reboot<enter><wait>", + "Yes<enter><wait10><wait10><wait10>", + "vyos<enter><wait>", + "vyos<enter><wait>", + "configure<enter><wait>", + "delete system console<enter><wait>", + "set interface ethernet eth0 address dhcp<enter><wait>", + "set service ssh<enter><wait>", + "commit<enter><wait>", + "save<enter><wait>", + "exit<enter><wait>", + "reboot<enter><wait>", + "Yes<enter><wait10><wait10><wait10><wait10><wait10>" + ] + } + ] +} |