Merge "Switch ubuntu16-qemu to use qcow2 cloud disk"
diff --git a/http/preseed.cfg b/http/preseed.cfg
new file mode 100644
index 0000000..269a2bc
--- /dev/null
+++ b/http/preseed.cfg
@@ -0,0 +1,54 @@
+choose-mirror-bin mirror/http/proxy string
+d-i debian-installer/locale string en_US
+d-i debian-installer/language string en
+d-i debian-installer/country EN
+
+d-i pkgsel/install-language-support boolean false
+
+d-i debian-installer/framebuffer boolean false
+d-i debconf/frontend select noninteractive
+d-i base-installer/kernel/override-image string linux-server
+d-i clock-setup/utc boolean true
+d-i clock-setup/utc-auto boolean true
+d-i finish-install/reboot_in_progress note
+d-i grub-installer/only_debian boolean true
+d-i grub-installer/with_other_os boolean true
+d-i netcfg/get_domain string unassigned-domain
+d-i netcfg/get_hostname string unassigned-hostname
+
+d-i partman-auto/disk string /dev/sda /dev/vda
+d-i partman-auto/method string regular
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman/confirm_write_new_label boolean true
+d-i partman-basicfilesystems/no_swap boolean false
+d-i partman-auto/choose_recipe select boot-root
+
+d-i partman-auto/expert_recipe string                   \
+    boot-root ::                                        \
+        512 512 -1 ext4                                 \
+                $primary{ } $bootable{ }                \
+                method{ format } format{ }              \
+                use_filesystem{ } filesystem{ ext4 }    \
+                mountpoint{ / }                         \
+                options/noatime{ noatime }              \
+        .                                               \
+
+d-i pkgsel/include string openssh-server
+d-i pkgsel/install-language-support boolean false
+d-i pkgsel/update-policy select none
+popularity-contest popularity-contest/participate boolean false
+
+d-i pkgsel/upgrade select none
+
+d-i time/zone string UTC
+d-i passwd/root-login boolean true
+d-i passwd/make-user boolean false
+d-i openssh-server/permit-root-login boolean true
+d-i user-setup/allow-password-weak boolean true
+d-i user-setup/encrypt-home boolean false
+tasksel tasksel/first multiselect minimal, ssh-server, openssh-server
+
+d-i preseed/late_command string \
+    in-target sed -i 's/PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
diff --git a/mirror-image/configs/cloud/cloud.cfg b/mirror-image/configs/cloud/cloud.cfg
new file mode 100644
index 0000000..c3cbb03
--- /dev/null
+++ b/mirror-image/configs/cloud/cloud.cfg
@@ -0,0 +1,75 @@
+# If this is set, 'root' will not be able to ssh in and they
+# will get a message to login instead as the above $user (ubuntu)
+disable_root: false
+
+# This will cause the set+update hostname module to not operate (if true)
+preserve_hostname: false
+
+# Better let managing of /etc/hosts on salt and others
+# manage_etc_hosts: localhost
+
+# The modules that run in the 'init' stage
+cloud_init_modules:
+ - migrator
+ - seed_random
+ - bootcmd
+ - write-files
+ - growpart
+ - resizefs
+ - set_hostname
+ - update_hostname
+ - update_etc_hosts
+ - ca-certs
+ - rsyslog
+ - users-groups
+ - ssh
+
+# The modules that run in the 'config' stage
+cloud_config_modules:
+# Emit the cloud config ready event
+# this can be used by upstart jobs for 'start on cloud-config'.
+ - emit_upstart
+ - disk_setup
+ - mounts
+ - ssh-import-id
+ - locale
+ - set-passwords
+ - grub-dpkg
+ - apt-pipelining
+ - apt-configure
+ - package-update-upgrade-install
+ - landscape
+ - timezone
+ - puppet
+ - chef
+ - salt-minion
+ - mcollective
+ - disable-ec2-metadata
+ - runcmd
+ - byobu
+
+# The modules that run in the 'final' stage
+cloud_final_modules:
+ - rightscale_userdata
+ - scripts-vendor
+ - scripts-per-once
+ - scripts-per-boot
+ - scripts-per-instance
+ - scripts-user
+ - ssh-authkey-fingerprints
+ - keys-to-console
+ - phone-home
+ - final-message
+ - power-state-change
+
+datasource_list: [ NoCloud, ConfigDrive, Ec2, OpenStack, OVF, MAAS, None ]
+datasource:
+    Ec2:
+      timeout: 5 # (defaults to 50 seconds)
+      max_wait: 10 # (defaults to 120 seconds)
+    OpenStack:
+      timeout: 5 # (defaults to 50 seconds)
+      max_wait: 10 # (defaults to 120 seconds)
+    MAAS:
+      timeout: 5 # (defaults to 50 seconds)
+      max_wait: 10 # (defaults to 120 seconds)
diff --git a/mirror-image/configs/cloud/cloud.cfg.d/99_tcp.cfg b/mirror-image/configs/cloud/cloud.cfg.d/99_tcp.cfg
new file mode 100644
index 0000000..7fbc1c8
--- /dev/null
+++ b/mirror-image/configs/cloud/cloud.cfg.d/99_tcp.cfg
@@ -0,0 +1,34 @@
+datasource_list: [ NoCloud, ConfigDrive, Ec2, OpenStack, OVF, MAAS, None ]
+datasource:
+    Ec2:
+      timeout: 5 # (defaults to 50 seconds)
+      max_wait: 10 # (defaults to 120 seconds)
+      strict_id: false
+    OpenStack:
+      timeout: 5 # (defaults to 50 seconds)
+      max_wait: 10 # (defaults to 120 seconds)
+    MAAS:
+      timeout: 5 # (defaults to 50 seconds)
+      max_wait: 10 # (defaults to 120 seconds)
+
+warnings:
+   dsid_missing_source: off
+
+system_info:
+   # This will affect which distro class gets used
+   distro: ubuntu
+   # Other config here will be given to the distro class and/or path classes
+   paths:
+      cloud_dir: /var/lib/cloud/
+      templates_dir: /etc/cloud/templates/
+      upstart_dir: /etc/init/
+   ssh_svcname: ssh
+
+growpart:
+   mode: auto
+   devices: ['/']
+
+#swap:
+#   filename: /swap.img
+#   size: auto
+#   maxsize: 1000000000
diff --git a/mirror-image/http/preseed.cfg b/mirror-image/http/preseed.cfg
new file mode 100644
index 0000000..269a2bc
--- /dev/null
+++ b/mirror-image/http/preseed.cfg
@@ -0,0 +1,54 @@
+choose-mirror-bin mirror/http/proxy string
+d-i debian-installer/locale string en_US
+d-i debian-installer/language string en
+d-i debian-installer/country EN
+
+d-i pkgsel/install-language-support boolean false
+
+d-i debian-installer/framebuffer boolean false
+d-i debconf/frontend select noninteractive
+d-i base-installer/kernel/override-image string linux-server
+d-i clock-setup/utc boolean true
+d-i clock-setup/utc-auto boolean true
+d-i finish-install/reboot_in_progress note
+d-i grub-installer/only_debian boolean true
+d-i grub-installer/with_other_os boolean true
+d-i netcfg/get_domain string unassigned-domain
+d-i netcfg/get_hostname string unassigned-hostname
+
+d-i partman-auto/disk string /dev/sda /dev/vda
+d-i partman-auto/method string regular
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman/confirm_write_new_label boolean true
+d-i partman-basicfilesystems/no_swap boolean false
+d-i partman-auto/choose_recipe select boot-root
+
+d-i partman-auto/expert_recipe string                   \
+    boot-root ::                                        \
+        512 512 -1 ext4                                 \
+                $primary{ } $bootable{ }                \
+                method{ format } format{ }              \
+                use_filesystem{ } filesystem{ ext4 }    \
+                mountpoint{ / }                         \
+                options/noatime{ noatime }              \
+        .                                               \
+
+d-i pkgsel/include string openssh-server
+d-i pkgsel/install-language-support boolean false
+d-i pkgsel/update-policy select none
+popularity-contest popularity-contest/participate boolean false
+
+d-i pkgsel/upgrade select none
+
+d-i time/zone string UTC
+d-i passwd/root-login boolean true
+d-i passwd/make-user boolean false
+d-i openssh-server/permit-root-login boolean true
+d-i user-setup/allow-password-weak boolean true
+d-i user-setup/encrypt-home boolean false
+tasksel tasksel/first multiselect minimal, ssh-server, openssh-server
+
+d-i preseed/late_command string \
+    in-target sed -i 's/PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
diff --git a/mirror-image/scripts/base.sh b/mirror-image/scripts/base.sh
new file mode 100644
index 0000000..a070f10
--- /dev/null
+++ b/mirror-image/scripts/base.sh
@@ -0,0 +1,70 @@
+#!/bin/bash -xe
+## Base packages and setup
+export DEBIAN_FRONTEND=noninteractive
+echo "exit 101" > /usr/sbin/policy-rc.d
+chmod +x /usr/sbin/policy-rc.d
+
+echo "Acquire::CompressionTypes::Order gz;" >/etc/apt/apt.conf.d/99compression-workaround-salt
+
+# Overwrite default mirrors
+echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted multiverse universe" > /etc/apt/sources.list
+echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted multiverse universe" >> /etc/apt/sources.list
+echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted multiverse universe" >> /etc/apt/sources.list
+echo "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main restricted multiverse universe" >> /etc/apt/sources.list
+
+apt-get clean
+apt-get update
+
+# Useful tools
+apt-get -y install byobu curl ethtool htop iputils-ping lsof strace tcpdump tmux traceroute tree vim-nox wget
+# Install common prerequisites
+apt-get -y install apt-transport-https libmnl0 python-apt python-m2crypto python-psutil
+
+# Cleanup old kernels, ensure latest is installed via virtual package
+apt-get purge -y linux-image-* linux-headers-*
+if [ ! -f /tmp/no_install_kernel ]; then
+    # Use HWE kernel
+    ## Temporary disable latest hwe due to: https://bugs.launchpad.net/ubuntu/+source/linux-hwe-edge/+bug/1679823
+    #apt-get install -y linux-image-generic-hwe-16.04
+    apt-get install -y linux-image-4.8.0-41-generic linux-image-extra-4.8.0-41-generic
+
+    # Update grub cmdline
+    sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub
+    sed -i 's|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub
+    update-grub
+fi
+
+apt-get -y upgrade
+apt-get -y dist-upgrade
+
+apt-get autoremove --purge
+
+# Tmux fixes
+cat << 'EOF' >> /etc/tmux.conf
+set -g default-terminal "screen-256color"
+set -g set-titles on
+set -g xterm-keys on
+EOF
+
+# Setup cloud-init
+apt-get -y install cloud-init
+
+# Disable apt-daily
+systemctl disable apt-daily.timer
+
+# Motd
+apt-get -y install update-motd
+rm -vf /etc/update-motd.d/*
+echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/image_version
+echo "BUILD_TIMESTAMP_RFC=\"$(date -u -R)\"" >> /etc/image_version
+cat << 'EOF' >> /etc/update-motd.d/00-header-mirantis
+#!/bin/sh
+#
+#    00-header - create the header of the MOTD
+#
+[ -r /etc/image_version ] && . /etc/image_version
+echo "Ubuntu 16.04 \"Xenial\" Mirantis cloud image"
+echo "Build date: ${BUILD_TIMESTAMP_RFC}"
+EOF
+chmod +x /etc/update-motd.d/00-header-mirantis
+
diff --git a/mirror-image/scripts/cleanup.sh b/mirror-image/scripts/cleanup.sh
new file mode 100644
index 0000000..01dd605
--- /dev/null
+++ b/mirror-image/scripts/cleanup.sh
@@ -0,0 +1,24 @@
+#!/bin/bash -xe
+apt-get -y autoremove --purge
+apt-get -y clean
+rm -rf /var/lib/apt/lists/*
+
+rm -f /usr/sbin/policy-rc.d || true
+
+echo "cleaning up hostname"
+sed -i "/.*ubuntu-1604.*/d" /etc/hosts
+
+echo "cleaning up guest additions"
+rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? || true
+
+echo "cleaning up dhcp leases"
+rm -rf /var/lib/dhcp/* || true
+
+echo "cleaning up udev rules"
+rm -f /etc/udev/rules.d/70-persistent-net.rules || true
+rm -rf /dev/.udev/ || true
+rm -f /lib/udev/rules.d/75-persistent-net-generator.rules || true
+
+echo "cleaning up minion_id for salt"
+rm -f /etc/salt/minion_id || true
+
diff --git a/mirror-image/scripts/mirrors.sh b/mirror-image/scripts/mirrors.sh
new file mode 100644
index 0000000..6cb2ced
--- /dev/null
+++ b/mirror-image/scripts/mirrors.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -xe
+#docker registry
+salt-call -t 5 --retcode-passthrough --no-color state.sls docker.host
+docker run --restart always -d -p 5000:5000 --name registry registry:2
+salt-call -t 5 --retcode-passthrough state.sls docker.client.registry
+docker system prune --all --force
+
+#aptly
+salt-call -t 5 --no-color state.sls aptly
+salt-call -t 5 --retcode-passthrough --no-color state.sls aptly
+sudo -i -u aptly aptly_mirror_update.sh -sv
+sudo -i -u aptly aptly_publish_update.sh -acrfv
+
+#debmirror
+/srv/scripts/debmirror.sh
+
+#git
+salt-call -t 5 --retcode-passthrough --no-color state.sls git.server
+
+#pypi
+#pip install pip2pi
+#pip2pi /srv/pypi_mirror/packages/ -r /srv/pypi_mirror/requirements.txt
\ No newline at end of file
diff --git a/mirror-image/scripts/network.sh b/mirror-image/scripts/network.sh
new file mode 100644
index 0000000..8f57c0f
--- /dev/null
+++ b/mirror-image/scripts/network.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -xe
+echo "timeout 10;
+backoff-cutoff 0;
+initial-interval 0;
+retry 15;" >> /etc/dhcp/dhclient.conf
diff --git a/mirror-image/scripts/reboot.sh b/mirror-image/scripts/reboot.sh
new file mode 100644
index 0000000..52adc95
--- /dev/null
+++ b/mirror-image/scripts/reboot.sh
@@ -0,0 +1,2 @@
+pgrep -f "sshd: root@" | xargs kill -9
+reboot now
\ No newline at end of file
diff --git a/mirror-image/scripts/salt.sh b/mirror-image/scripts/salt.sh
new file mode 100644
index 0000000..276a83d
--- /dev/null
+++ b/mirror-image/scripts/salt.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -xe
+wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
+wget -O - http://apt.mirantis.com/public.gpg | apt-key add -
+echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main" >/etc/apt/sources.list.d/saltstack.list
+apt-get update
+apt-get install git -y
+git clone --recursive -b $CLUSTER_MODEL_REF $CLUSTER_MODEL /srv/salt/reclass
+git clone https://github.com/salt-formulas/salt-formulas-scripts /srv/salt/scripts
+export FORMULAS_SOURCE=pkg
+export HOSTNAME=apt01
+export DOMAIN=$CLUSTER_NAME.local
+export EXTRA_FORMULAS="ntp aptly nginx iptables docker"
+/srv/salt/scripts/bootstrap.sh
+echo "deb [arch=amd64] http://apt.mirantis.com/xenial/ ${FORMULA_VERSION} salt" > /etc/apt/sources.list.d/mcp_salt.list
+apt-get install salt-formula* -y
+salt-call saltutil.refresh_pillar
+salt-call saltutil.sync_all
+salt-call -t 5 --retcode-passthrough --no-color state.sls salt
+salt-call -t 5 --retcode-passthrough --no-color state.sls linux.system.repo,linux.system.directory,linux.system.package,linux.system.file
+salt-call -t 5 --retcode-passthrough --no-color state.sls linux.network
+salt-call -t 5 --retcode-passthrough --no-color state.sls nginx
diff --git a/mirror-image/scripts/security.sh b/mirror-image/scripts/security.sh
new file mode 100644
index 0000000..8a0b12b
--- /dev/null
+++ b/mirror-image/scripts/security.sh
@@ -0,0 +1,51 @@
+#!/bin/bash -xe
+# Auto login root on tty1
+sed 's|/sbin/agetty|/sbin/agetty --autologin root|g' /etc/systemd/system/getty.target.wants/getty@tty1.service > /etc/systemd/system/getty-autologin@.service
+systemctl daemon-reload
+systemctl disable getty@tty1.service
+systemctl enable getty-autologin@tty1.service
+
+# Libvirt serial console support
+cat << 'EOF' >> /etc/systemd/system/serial-getty@.service
+[Unit]
+Description=Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+After=systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
+
+Before=getty.target
+IgnoreOnIsolate=yes
+
+ConditionPathExists=/dev/ttyS0
+
+[Service]
+ExecStart=-/sbin/agetty --autologin root -8 --noclear %I 115200 $TERM
+Type=idle
+Restart=always
+RestartSec=0
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+KillMode=process
+IgnoreSIGPIPE=no
+SendSIGHUP=yes
+
+Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
+
+[Install]
+WantedBy=getty.target
+DefaultInstance=ttyS0
+EOF
+
+systemctl daemon-reload
+systemctl enable serial-getty@ttyS0.service
+
+# Disable password root login
+usermod -p '!' root
+
+# Disable SSH password authentication and permit root login
+sed -i 's|[#]*PasswordAuthentication yes|PasswordAuthentication no|g' /etc/ssh/sshd_config
+sed -i 's|[#]*PermitRootLogin no|PermitRootLogin yes|g' /etc/ssh/sshd_config
diff --git a/mirror-image/template.json b/mirror-image/template.json
new file mode 100644
index 0000000..79546ad
--- /dev/null
+++ b/mirror-image/template.json
@@ -0,0 +1,132 @@
+{
+  "variables": {
+    "user": "root",
+    "password": "ho5uo7Uome5d",
+    "do_api_token": "{{ env `DO_API_TOKEN` }}",
+    "distro": "mcp-mirror-image",
+    "disk_size": "150000",
+    "cluster_model": "{{ env `CLUSTER_MODEL` }}",
+    "cluster_model_ref": "{{ env `CLUSTER_MODEL_REF` }}",
+    "cluster_name": "{{ env `CLUSTER_NAME` }}",
+    "formula_version": "{{ env `FORMULA_VERSION` }}",
+    "mcp_version": "{{ env `MCP_VERSION` }}"
+  },
+  "provisioners": [
+    {
+      "environment_vars": [
+        "CLUSTER_MODEL={{ user `cluster_model` }}",
+        "CLUSTER_MODEL_REF={{ user `cluster_model_ref` }}",
+        "CLUSTER_NAME={{ user `cluster_name` }}",
+        "FORMULA_VERSION={{ user `formula_version` }}"
+      ],
+      "type": "shell",
+      "expect_disconnect": "true",
+      "override": {
+        "qemu": {
+          "scripts": [
+            "scripts/base.sh",
+            "scripts/network.sh",
+            "scripts/salt.sh"
+          ]
+        }
+      }
+    },
+    {
+      "type": "shell",
+      "expect_disconnect": "true",
+      "execute_command": "sh '{{.Path}}'",
+      "script": "scripts/reboot.sh"
+    },
+    {
+      "environment_vars": [
+        "HOME=/root",
+        "MCP_VERSION={{ user `mcp_version` }}"
+      ],
+      "type": "shell",
+      "pause_before": "180s",
+      "override": {
+        "qemu": {
+          "scripts": [
+            "scripts/mirrors.sh",
+            "scripts/security.sh",
+            "scripts/cleanup.sh"
+          ]
+        }
+      }
+    },
+    {
+      "type": "file",
+      "source": "configs/cloud/cloud.cfg.d/99_tcp.cfg",
+      "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
+    },
+    {
+      "type": "file",
+      "source": "configs/cloud/cloud.cfg",
+      "destination": "/etc/cloud/cloud.cfg"
+    }
+  ],
+  "builders": [
+    {
+      "type": "qemu",
+      "qemuargs": [
+        [
+          "-m",
+          "4096M"
+        ],
+        [
+          "-smp",
+          "4"
+        ]
+      ],
+      "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\"  }}",
+      "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\"  }}",
+      "format": "qcow2",
+      "accelerator": "kvm",
+      "disk_size": "{{ user `disk_size`}}",
+      "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-server-amd64.iso",
+      "iso_checksum_type": "md5",
+      "iso_checksum": "10fcd20619dce11fe094e960c85ba4a9",
+      "http_directory": "http",
+      "headless": true,
+      "ssh_username": "{{user `user`}}",
+      "ssh_password": "{{user `password`}}",
+      "shutdown_command": "shutdown -P now",
+      "boot_wait": "2s",
+      "ssh_wait_timeout": "10000s",
+      "boot_command": [
+        "<enter><wait>",
+        "<f6><esc>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
+        "<bs><bs><bs>",
+        "/install/vmlinuz<wait>",
+        " auto<wait>",
+        " console-setup/ask_detect=false<wait>",
+        " console-setup/layoutcode=us<wait>",
+        " console-setup/modelcode=pc105<wait>",
+        " debconf/frontend=noninteractive<wait>",
+        " debian-installer=en_US<wait>",
+        " fb=false<wait>",
+        " initrd=/install/initrd.gz<wait>",
+        " kbd-chooser/method=us<wait>",
+        " keyboard-configuration/layout=USA<wait>",
+        " keyboard-configuration/variant=USA<wait>",
+        " passwd/root-password={{user `password`}} ",
+        " passwd/root-password-again={{user `password`}} ",
+        " locale=en_US<wait>",
+        " netcfg/get_hostname=ubuntu-1604<wait>",
+        " netcfg/get_domain=changeme<wait>",
+        " noapic<wait>",
+        " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
+        " -- <wait>",
+        "<enter><wait>"
+      ]
+    }
+  ]
+}
\ No newline at end of file