Created
January 17, 2018 14:21
-
-
Save drscream/0b871b030008ff8e8c8a3c8ae7640eb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "variables": { | |
| "ssh_username": "root", | |
| "ssh_password": "vagrant", | |
| "variant": "minimal", | |
| "box_ver": "7.1.20171229", | |
| "vagrant_username": "vagrant", | |
| "vagrant_password": "vagrant", | |
| "vagrant_group": "vagrant", | |
| "num_cpus": "2", | |
| "mem_size": "512", | |
| "disk_size": "4960", | |
| "hostname": "vagrant", | |
| "headless": "false", | |
| "package_server": "https://cdn.NetBSD.org/pub/pkgsrc" | |
| }, | |
| "builders": [ | |
| { | |
| "type": "vmware-iso", | |
| "boot_wait": "10s", | |
| "disk_size": "{{user `disk_size`}}", | |
| "guest_os_type": "{{user `vmware_guest_os_type`}}", | |
| "iso_urls": [ | |
| "../../src/{{user `iso_file_name`}}", | |
| "http://ftp.netbsd.org/pub/{{user `iso_path`}}/{{user `iso_file_name`}}", | |
| "https://cdn.NetBSD.org/pub/{{user `iso_path`}}/{{user `iso_file_name`}}" | |
| ], | |
| "iso_checksum": "{{user `iso_checksum`}}", | |
| "iso_checksum_type": "{{user `iso_checksum_type`}}", | |
| "ssh_username": "{{user `ssh_username`}}", | |
| "ssh_password": "{{user `ssh_password`}}", | |
| "ssh_port": 22, | |
| "ssh_wait_timeout": "10000s", | |
| "shutdown_command": "echo 'shutdown -p now'|su -", | |
| "output_directory": "{{user `vm_name`}}-{{user `variant`}}-v{{user `box_ver`}}", | |
| "vm_name": "{{user `vm_name`}}-{{user `variant`}}-v{{user `box_ver`}}", | |
| "headless": "{{user `headless`}}", | |
| "disk_type_id": "thin", | |
| "remote_type": "esx5", | |
| "remote_host": "{{user `esxi_host`}}", | |
| "remote_datastore": "{{user `esxi_datastore`}}", | |
| "remote_username": "{{user `esxi_username`}}", | |
| "remote_password": "{{user `esxi_password`}}", | |
| "vnc_disable_password": true, | |
| "keep_registered": true, | |
| "vmx_data": { | |
| "memsize": "{{user `mem_size`}}", | |
| "numvcpus": "{{user `num_cpus`}}", | |
| "ethernet0.present": "TRUE", | |
| "ethernet0.connectionType": "bridged", | |
| "ethernet0.virtualDev": "e1000", | |
| "ethernet0.networkName": "VM Network", | |
| "ethernet0.wakeOnPcktRcv": "FALSE", | |
| "ethernet0.addressType": "generated", | |
| "remotedisplay.vnc.enabled": "TRUE", | |
| "vhv.enable": "TRUE" | |
| }, | |
| "http_directory": "scripts/", | |
| "boot_command": [ | |
| "1<wait10><wait10><wait5>", | |
| "a<enter><wait>", | |
| "a<enter><wait>", | |
| "a<enter><wait>", | |
| "b<enter><wait>", | |
| "a<enter><wait>", | |
| "a<enter><wait>", | |
| "b<enter><wait>", | |
| "a<enter><wait>", | |
| "b<enter><wait>", | |
| "x<enter><wait>", | |
| "<enter><wait>", | |
| "b<enter><wait>", | |
| "<wait10><wait10><wait10><wait10><wait10><wait10>", | |
| "a<enter><wait>", | |
| "x<enter><wait>", | |
| "d<enter><wait>", | |
| "g<enter><wait>", | |
| "j<enter><wait>", | |
| "x<enter><wait>", | |
| "a<enter><wait10><wait10><wait10><wait10><wait10>", | |
| "<enter><wait>", | |
| "d<enter><wait>", | |
| "a<enter><wait10><wait10>", | |
| "{{user `ssh_password`}}<enter><wait>", | |
| "{{user `ssh_password`}}<enter><wait>", | |
| "{{user `ssh_password`}}<enter><wait5>", | |
| "g<enter><wait>", | |
| "h<enter><wait>", | |
| "x<enter><wait>", | |
| "<enter><wait10><wait10><wait10><wait10>", | |
| "x<enter><wait>", | |
| "dhcpcd<enter><wait10>", | |
| "ftp -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/install.sh<enter><wait>", | |
| "HTTPSERVER={{ .HTTPIP }}:{{ .HTTPPort }} HDD=sd0a HOSTNAME={{user `hostname`}} sh /tmp/install.sh<enter><wait>" | |
| ] | |
| } | |
| ], | |
| "provisioners": [ | |
| { | |
| "type": "shell", | |
| "inline": [ | |
| "echo \"PKG_PATH={{user `package_server`}}/packages/NetBSD/`uname -m`/7.1/All\" > /etc/pkg_install.conf" | |
| ], | |
| "inline_shebang": "/bin/sh -ex" | |
| }, | |
| { | |
| "type": "shell", | |
| "script": "scripts/vagrant-7.0.sh", | |
| "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} PATH=$PATH:/usr/sbin {{ .Path }}", | |
| "environment_vars": [ | |
| "VAGRANT_USER={{user `vagrant_username`}}", | |
| "VAGRANT_PASSWORD={{user `vagrant_password`}}", | |
| "VAGRANT_GROUP={{user `vagrant_group`}}", | |
| "SUDO=sudo", | |
| "RSYNC=rsync" | |
| ] | |
| }, | |
| { | |
| "type": "shell", | |
| "script": "scripts/disk_cleanup.sh" | |
| }, | |
| { | |
| "type": "shell", | |
| "script": "scripts/cleanup-7.0.sh" | |
| } | |
| ], | |
| "post-processors": [ | |
| { | |
| "type": "vagrant", | |
| "compression_level": 9, | |
| "output": "../../vms/{{user `vm_name`}}-{{user `variant`}}-v{{user `box_ver`}}-{{.Provider}}.box", | |
| "vagrantfile_template": "Vagrantfile", | |
| "keep_input_artifact": true | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "iso_file_name": "NetBSD-7.1.1-amd64.iso", | |
| "iso_path": "NetBSD/iso/7.1.1", | |
| "iso_checksum": "92f2d8b825f529f8719754fe29fa152046c04ab567bb4bd611533377417250ddc4099e7b212a0ac5bb92d6d32f5fb96a4537df93ed6c36ee317a59a27c58407c", | |
| "iso_checksum_type": "sha512", | |
| "cpu": "amd64", | |
| "vmware_guest_os_type": "other-64", | |
| "vm_name": "NetBSD-7.1-amd64", | |
| "esxi_host": "192.168.15.179", | |
| "esxi_datastore": "local", | |
| "esxi_username": "********", | |
| "esxi_password": "********" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment