diff --git a/README.md b/README.md index 5569a75..e7b6495 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Packer templates for AWS OpsWorks ================================= -This repository contains a [Packer](https://www.packer.io) templates for Ubuntu +This repository contains a [Packer](https://www.packer.io) templates for Ubuntu and CentOS 7 pre-loaded with the `opsworks-agent` software utilized by Amazon Web Services, allowing [OpsWorks](http://aws.amazon.com/opsworks/) stacks to be virtualized for local testing and development. @@ -26,19 +26,21 @@ $ rake vmware:build ``` Rake will build a Ubuntu 14.04 LTS "*Trusty Tahr*" box by default, but you can -also specify Ubuntu 12.04 LTS "*Precise Pangolin*" like so: +also specify Ubuntu 12.04 LTS "*Precise Pangolin*" or CentOS 7 LTS mini like so: ```bash $ rake build[ubuntu1204] install[ubuntu1204] +or +$ rake build[centos7mini] install[centos7mini] ``` _**Note:** Amazon Linux is not supported as it cannot be run outside of -Amazon EC2._ +Amazon EC2. But the CentOS 7 build is very close to a Amazon Linux._ ## Using the Box -The compiled box will be named `ubuntu1404-opsworks` or `ubuntu1204-opsworks`. +The compiled box will be named `ubuntu1404-opsworks` or `ubuntu1204-opsworks` or `centos7mini-opsworks`. To utilize this box in your project, create a new Vagrantfile and include the following: diff --git a/Rakefile b/Rakefile index 0aa515e..ba5fe63 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,6 @@ # first is default -BOXES = %w( ubuntu1404 ubuntu1204 ).freeze +BOXES = %w( ubuntu1404 ubuntu1204 centos7mini ).freeze # namespace for each provider provider_builder = lambda do |provider| @@ -30,10 +30,18 @@ provider_builder.call(:vmware) desc "Remove compiled assets and cached files" task :clean do - sh 'rm -f build/*.box' + if ENV['OS'] == 'Windows_NT' + sh "rm 'build/*.box' -Recurse -Force -ErrorAction SilentlyContinue" + else + sh 'rm -f build/*.box' + end end task :clear do - sh 'rm -rf packer_cache' + if ENV['OS'] == 'Windows_NT' + sh 'rm packer_cache -Force -Recurse -ErrorAction SilentlyContinue' + else + sh 'rm -rf packer_cache' + end end # shortcuts to virtualbox tasks with no namespace @@ -44,7 +52,10 @@ task :remove, [:box] => 'virtualbox:remove' # build a box for the specified provider def build_box(box, provider) log "Building #{box} for #{provider}" - sh "rm -f build/#{box}-opsworks-#{provider}.box && packer build -only=#{provider}-iso template/#{box}.json" + file = "build/#{box}-opsworks-#{provider}.box" + # sh "rm -f build/#{box}-opsworks-#{provider}.box && packer build -only=#{provider}-iso template/#{box}.json" + File.delete(file) if File.exist?(file) + sh "packer build -only=#{provider}-iso template/#{box}.json" end # build a box with vagrant diff --git a/iso/.gitignore b/iso/.gitignore new file mode 100644 index 0000000..7a8f7aa --- /dev/null +++ b/iso/.gitignore @@ -0,0 +1 @@ +*.iso \ No newline at end of file diff --git a/opsworks/opsworks b/opsworks/opsworks index 08276b7..ec1b9a5 100644 --- a/opsworks/opsworks +++ b/opsworks/opsworks @@ -6,6 +6,12 @@ if [[ $# -eq 0 ]]; then exit fi +# yum or apt-get +OS=red +if [ -f /etc/lsb-release ]; then + OS=ubuntu +fi + # install opsworks agent if not already available if [[ ! -f /opt/aws/opsworks/current/VERSION ]]; then @@ -16,8 +22,13 @@ if [[ ! -f /opt/aws/opsworks/current/VERSION ]]; then # install dependencies echo "Installing OpsWorks agent dependencies" - apt-get -yq update - apt-get -yq install curl libxml2-dev libxslt-dev libyaml-dev + if [ "x$OS" = "xred" ]; then + yum -q -y update + yum -q -y install curl libxml2-devel libxslt-devel libyaml-devel + else + apt-get -yq update + apt-get -yq install curl libxml2-dev libxslt-dev libyaml-dev + fi # create expected directories and populate them with expected config files mkdir -p /{etc,opt,var/{log,lib}}/aws/opsworks/ /var/lib/cloud/ diff --git a/opsworks/opsworks.rb b/opsworks/opsworks.rb index 76b328a..32ffb6a 100644 --- a/opsworks/opsworks.rb +++ b/opsworks/opsworks.rb @@ -23,7 +23,7 @@ class OpsWorksError < StandardError; end } }, "dependencies" => { - "gem_binary" => "/usr/local/bin/gem", + "gem_binary" => "gem", "gems" => {}, "debs" => {} }, @@ -213,7 +213,11 @@ def self.log(msg) end def self.check_dependencies - `apt-get -yq install git 2>&1` if `which git`.empty? + if `which yum`.empty? + `apt-get -yq install git 2>&1` if `which git`.empty? + else + `yum -q -y install git 2>&1` if `which git`.empty? + end end def self.set_hostname(hostname) diff --git a/preseed/ks.cfg b/preseed/ks.cfg new file mode 100644 index 0000000..f17f35c --- /dev/null +++ b/preseed/ks.cfg @@ -0,0 +1,106 @@ +# Perform the installation in a completely non-interactive command line mode. Any prompts for interaction halts the install. +cmdline + +# Install OS instead of upgrade +install + +# System authorization information +auth --useshadow --enablemd5 +# System bootloader configuration +bootloader --location=mbr --append="net.ifnames=0" +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +#Root password - required cmd - remove pw in post +rootpw vagrant +# Firewall +# firewall --enabled --ssh --trust=eth0 --trust=eth1 --service=ssh,http,https +firewall --disabled + +authconfig --enableshadow --passalgo=sha512 +# first boot disabled +firstboot --disabled +# System keyboard +keyboard us +# System language +lang en_US.UTF-8 +# Installation logging level +logging --level=info +# Reboot after installation +reboot +# SELinux configuration +selinux --permissive +# Do not configure the X Window System +skipx +# System timezone +timezone --isUtc UTC +# Disk partitioning information +part /boot --fstype ext3 --size 250 +part pv.01 --size 1 --grow +volgroup vg pv.01 +logvol / --vgname=vg --size=1 --grow --fstype ext4 --name=root +logvol /tmp --vgname=vg --size=1024 --fstype ext4 --name=tmp +logvol swap --vgname=vg --recommended --name=swap +# Setup network interfaces via DHCP +network --device=eth0 --bootproto=dhcp --onboot=yes --activate --noipv6 +# add our vagrant user +user --name=vagrant --groups=wheel --password=vagrant +# agree to the EULA +eula --agreed + +%packages --excludedocs --nobase +@Core +openssh-server +vim-minimal +curl +%end + +%pre --log=/var/log/ks_pre.log +echo 'enter ks pre stage...' +date +%Y-%m-%dT%H:%m:%S +%end + +%post --log=/var/log/ks_post.log +#!/bin/bash +# this bash will improve our syntax here, empty lines allowed ;) +echo 'enter ks post stage...' +date +%Y-%m-%dT%H:%m:%S + +yum -y -q install sudo + +# Make sure our vagrant can access via ssh without the need of tty, otherwise=>vagrant will fail +/bin/cat >> /etc/sudoers.d/wheel << EOF_sudoers_wheel +Defaults:%wheel env_keep += "SSH_AUTH_SOCK" +Defaults:%wheel !requiretty +%wheel ALL=(ALL) ALL +%wheel ALL=(ALL) NOPASSWD: ALL +EOF_sudoers_wheel + +/bin/chmod 0440 /etc/sudoers.d/wheel + +# opsworks-agent will execute some commands as user 'root' and fail with missing tty error +# So add root to our wheel group which does not require tty +usermod -a -G wheel root + +# In case we wanna use ssh keys for vagrant +#/bin/mkdir /home/vagrant/.ssh +#/bin/chmod 700 /home/vagrant/.ssh +#/usr/bin/curl -L -o /home/vagrant/.ssh/id_rsa https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant +#/usr/bin/curl -L -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub +#/bin/chown -R vagrant:vagrant /home/vagrant/.ssh +#/bin/chmod 0400 /home/vagrant/.ssh/* + +yum -y clean all + +/sbin/swapoff -a +/sbin/mkswap /dev/mapper/vg_vagrantcentos-lv_swap + +/bin/dd if=/dev/zero of=/boot/EMPTY bs=1M +/bin/rm -f /boot/EMPTY +/bin/dd if=/dev/zero of=/EMPTY bs=1M +/bin/rm -f /EMPTY + +chkconfig sshd on + +%end diff --git a/provision/centos/cleanup.sh b/provision/centos/cleanup.sh new file mode 100644 index 0000000..2a46b1f --- /dev/null +++ b/provision/centos/cleanup.sh @@ -0,0 +1,41 @@ +#!/bin/bash -eux + +# Force grub to boot without user interation +echo "GRUB_RECORDFAIL_TIMEOUT=10" >> /etc/default/grub +grub2-mkconfig -o "$(readlink /etc/grub2.cfg)" + +echo "==> Cleaning up tmp" +rm -rf /tmp/* + +# Remove Bash history +unset HISTFILE +rm -f /root/.bash_history +rm -f /home/vagrant/.bash_history + +# Clean up log files +find /var/log -type f | while read f; do echo -ne '' > $f; done; + +echo "==> Clearing last login information" +>/var/log/lastlog +>/var/log/wtmp +>/var/log/btmp + +# Whiteout root +count=$(df --sync -kP / | tail -n1 | awk -F ' ' '{print $4}') +let count-- +dd if=/dev/zero of=/tmp/whitespace bs=1024 count=$count +rm /tmp/whitespace + +# Whiteout /boot +count=$(df --sync -kP /boot | tail -n1 | awk -F ' ' '{print $4}') +let count-- +dd if=/dev/zero of=/boot/whitespace bs=1024 count=$count +rm /boot/whitespace + +# Zero out the free space to save space in the final image +dd if=/dev/zero of=/EMPTY bs=1M +rm -f /EMPTY + +# Make sure we wait until all the data is written to disk, otherwise +# Packer might quite too early before the large files are deleted +sync \ No newline at end of file diff --git a/provision/centos/minimize.sh b/provision/centos/minimize.sh new file mode 100644 index 0000000..532cb0d --- /dev/null +++ b/provision/centos/minimize.sh @@ -0,0 +1,41 @@ +#!/bin/bash -eux + +############################### +# @TODO: adopt this to CentOS 7 +############################### + +echo "==> Installed packages before cleanup" +rpm -qa | less + +# Remove some packages to get a minimal install +#echo "==> Removing all linux kernels except the currrent one" +#dpkg --list | awk '{ print $2 }' | grep 'linux-image-3.*-generic' | grep -v $(uname -r) | xargs apt-get -y purge +#echo "==> Removing linux source" +#dpkg --list | awk '{ print $2 }' | grep linux-source | xargs apt-get -y purge +# echo "==> Removing development packages" +# dpkg --list | awk '{ print $2 }' | grep -- '-dev$' | xargs apt-get -y purge +#echo "==> Removing documentation" +#dpkg --list | awk '{ print $2 }' | grep -- '-doc$' | xargs apt-get -y purge +#echo "==> Removing X11 libraries" +#apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 +#echo "==> Removing obsolete networking components" +#apt-get -y purge ppp pppconfig pppoeconf +#echo "==> Removing other oddities" +#apt-get -y purge popularity-contest installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide + +# Clean up the yum cache +yum clean all + +# Clean up orphaned packages with yum utils' package-cleanup +package-cleanup --quiet --leaves + +# echo "==> Removing man pages" +# rm -rf /usr/share/man/* +# echo "==> Removing APT files" +# find /var/lib/apt -type f | xargs rm -f +echo "==> Removing anything in /usr/src" +rm -rf /usr/src/* +echo "==> Removing any docs" +rm -rf /usr/share/doc/* +echo "==> Removing caches" +find /var/cache -type f -exec rm -rf {} \; diff --git a/provision/centos/network.sh b/provision/centos/network.sh new file mode 100644 index 0000000..1ee243e --- /dev/null +++ b/provision/centos/network.sh @@ -0,0 +1,14 @@ +#!/bin/bash -eux + +# Make sure udev does not block our network +echo "==> Cleaning up udev rules" +rm /etc/udev/rules.d/70-persistent-ipoib.rules + +if [ -d "/var/lib/dhclient" ]; then + echo "==> Cleaning up leftover dhcp leases" + dhclient -r + rm /var/lib/dhclient/* +fi + +# Disable DNS reverse lookup +echo "UseDNS no" >> /etc/ssh/sshd_config diff --git a/provision/centos/opsworks.sh b/provision/centos/opsworks.sh new file mode 100644 index 0000000..66715a3 --- /dev/null +++ b/provision/centos/opsworks.sh @@ -0,0 +1,72 @@ +#!/bin/bash -eux + +# set the agent version to be installed +AGENT_VERSION="3427-20150911163841" + +echo "==> Generating chef json for first OpsWorks run" +TMPDIR=$(mktemp -d) && trap 'rm -rf "$TMPDIR"' EXIT +mkdir -p $TMPDIR/cookbooks + +# Create a base json file to execute some default recipes +cat < $TMPDIR/dna.json +{ + "opsworks_initial_setup": { + "swapfile_instancetypes": null + }, + "opsworks_custom_cookbooks": { + "enabled": true, + "scm": { + "repository": "$TMPDIR/cookbooks" + }, + "manage_berkshelf": true, + "recipes": [ + "recipe[opsworks_initial_setup]", + "recipe[ssh_host_keys]", + "recipe[ssh_users]", + "recipe[dependencies]", + "recipe[apt]", + "recipe[deploy::default]", + "recipe[agent_version]", + "recipe[opsworks_stack_state_sync]", + "recipe[opsworks_cleanup]" + ] + } +} +EOT + +# Use Berkshelf to pre-load some commonly-used community cookbooks +cat <> $TMPDIR/cookbooks/Berksfile +source "https://supermarket.getchef.io" + +# pre-load some opscode community cookbooks +cookbook "apt", ">= 2.0" +cookbook "apache2" +cookbook "aws" +cookbook "bluepill" +cookbook "build-essential" +cookbook "couchdb" +cookbook "cron" +cookbook "git" +cookbook "haproxy" +cookbook "memcached" +cookbook "mongodb" +cookbook "mysql" +cookbook "newrelic" +cookbook "nginx" +cookbook "nodejs" +cookbook "ohai" +cookbook "postgresql" +cookbook "php" +cookbook "php-fpm" +cookbook "python" +cookbook "redisio" +cookbook "rsyslog" +cookbook "runit" +cookbook "sysctl" +cookbook "yum" +cookbook "yum-epel" +EOT + +echo "==> Installing and running OpsWorks agent" +chmod +x /tmp/opsworks/opsworks +env OPSWORKS_AGENT_VERSION="$AGENT_VERSION" /tmp/opsworks/opsworks $TMPDIR/dna.json diff --git a/provision/centos/update.sh b/provision/centos/update.sh new file mode 100644 index 0000000..672af0f --- /dev/null +++ b/provision/centos/update.sh @@ -0,0 +1,9 @@ +#!/bin/bash -eux + +echo "==> Updating packages" + +# required for later cleanup and minimize +yum -y -q install yum-utils + +yum -y update +yum -y upgrade \ No newline at end of file diff --git a/provision/centos/vagrant.sh b/provision/centos/vagrant.sh new file mode 100644 index 0000000..3ce09b8 --- /dev/null +++ b/provision/centos/vagrant.sh @@ -0,0 +1,36 @@ +#!/bin/bash -eux + +# https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub +VAGRANT_INSECURE_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" + +# Store build time +date > /etc/vagrant_box_build_time + +# Create Vagrant user (if not already present) +if ! id -u vagrant >/dev/null 2>&1; then + echo "==> Creating vagrant user" + /usr/sbin/groupadd vagrant + /usr/sbin/useradd vagrant -g vagrant -G wheel -d /home/vagrant --create-home + echo "vagrant:vagrant" | chpasswd +fi + +# @TODO: That happend already in kickstart ks.cfg ?! which one is best to keep? +if [ ! -f /etc/sudoers.d/wheel ]; then + echo "==> Giving vagrant sudo powers" + /bin/cat >> /etc/sudoers.d/wheel << EOF_sudoers_wheel +Defaults:%wheel env_keep += "SSH_AUTH_SOCK" +Defaults:%wheel !requiretty +%wheel ALL=(ALL) ALL +%wheel ALL=(ALL) NOPASSWD: ALL +EOF_sudoers_wheel +fi + +echo "==> Installing vagrant key" +mkdir -p /home/vagrant/.ssh +chmod 700 /home/vagrant/.ssh +echo "${VAGRANT_INSECURE_KEY}" > /home/vagrant/.ssh/authorized_keys +chmod 600 /home/vagrant/.ssh/authorized_keys +chown -R vagrant:vagrant /home/vagrant/.ssh + +# Remove those annoying "stdin: is not a tty" messages when running vagrant +#sed -i "s/mesg n/tty -s \&\& mesg n/g" /root/.profile diff --git a/provision/centos/vmtools.sh b/provision/centos/vmtools.sh new file mode 100644 index 0000000..82ac75f --- /dev/null +++ b/provision/centos/vmtools.sh @@ -0,0 +1,60 @@ +#!/bin/bash -eux + +# Have this reviewed by Pro's - what packages are really required? + +# ruby and wget for opsworks and vagrant - cant install within packages with minimal iso +yum -y -q groupinstall "Development Tools" +yum -y install ruby wget + +# some package we will need for vagrant and guest addition +yum -y install yum-priorities +yum -y install epel-release +wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/ +rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm +yum -y install gcc gcc-c++ bzip2 make perl +yum -y install kernel-devel kernel-headers dkms kernel-devel-$(uname -r) kernel-headers-$(uname -r) + +if [ -f /home/vagrant/.vbox_version ]; then + echo "==> Installing VirtualBox guest additions" + + VBOX_VERSION=$(cat /home/vagrant/.vbox_version) + VBOX_ISO=/home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso + cd /tmp + + if [ ! -f $VBOX_ISO ] ; then + wget -q http://download.virtualbox.org/virtualbox/${VBOX_VERSION}/VBoxGuestAdditions_${VBOX_VERSION}.iso \ + -O $VBOX_ISO + fi + + mount -o loop $VBOX_ISO /mnt + sh /mnt/VBoxLinuxAdditions.run + umount /mnt + + rm $VBOX_ISO + rm /home/vagrant/.vbox_version + + if [[ $VBOX_VERSION = "4.3.10" ]]; then + ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions + fi +fi + +if [ -f /home/vagrant/vmware_tools.iso ]; then + echo "==> Installing VMware Tools" + # Assuming the following packages are installed + # yum install -y linux-headers-$(uname -r) build-essential perl + + cd /tmp + mkdir -p /mnt/cdrom + mount -o loop /home/vagrant/vmware_tools.iso /mnt/cdrom + tar zxf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ + + /tmp/vmware-tools-distrib/vmware-install.pl -d + + rm /home/vagrant/vmware_tools.iso + umount /mnt/cdrom + rmdir /mnt/cdrom + rm -rf /tmp/VMwareTools-* +fi + +yum remove kernel-devel-$(uname -r) +yum clean all diff --git a/template/centos7mini.json b/template/centos7mini.json new file mode 100644 index 0000000..f938512 --- /dev/null +++ b/template/centos7mini.json @@ -0,0 +1,97 @@ +{ + "builders": [ + { + "vm_name": "centos7mini-opsworks", + "type": "virtualbox-iso", + "guest_os_type": "RedHat_64", + "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", + "virtualbox_version_file": ".vbox_version", + "iso_urls": [ + "iso/CentOS-7-x86_64-Minimal-1503-01.iso", + "http://ftp.plusline.de/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso", + "http://mirror.one.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso" + ], + "iso_checksum": "7c1e34e95c991175290d704dbdcc6531774cbecb", + "iso_checksum_type": "sha1", + "ssh_wait_timeout": "15m", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "http_directory": "preseed", + "headless": true, + "boot_wait": "5s", + "boot_command": [ + " net.ifnames=0 text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks.cfg", + "hostname={{.Name}} " + ], + "shutdown_command": "echo 'vagrant' | sudo -S -E shutdown -P now", + "hard_drive_interface": "sata", + "disk_size": 10000 + }, + { + "vm_name": "centos7mini-opsworks", + "type": "vmware-iso", + "guest_os_type": "RedHat_64", + "iso_urls": [ + "iso/CentOS-7-x86_64-Minimal-1503-01.iso", + "http://ftp.plusline.de/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso", + "http://mirror.one.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso" + ], + "iso_checksum": "7c1e34e95c991175290d704dbdcc6531774cbecb", + "iso_checksum_type": "sha1", + "ssh_wait_timeout": "15m", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "http_directory": "preseed", + "headless": true, + "boot_wait": "5s", + "boot_command": [ + " net.ifnames=0 text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks.cfg", + "hostname={{.Name}} " + ], + "shutdown_command": "echo 'vagrant' | sudo -S -E shutdown -P now", + "tools_upload_flavor": "linux", + "tools_upload_path": "vmware_tools.iso", + "vmdk_name": "disk", + "disk_type_id": "0", + "vmx_data": { + "MemTrimRate": "0", + "sched.mem.pshare.enable": "FALSE", + "mainMem.useNamedFile": "FALSE", + "prefvmx.minVmMemPct": "100" + } + } + ], + "provisioners": [ + { + "type": "file", + "source": "opsworks", + "destination": "/tmp" + }, + { + "type": "shell", + "execute_command": "echo 'vagrant' | sudo -S -E bash '{{.Path}}'", + "scripts": [ + "provision/centos/update.sh", + "provision/centos/network.sh", + "provision/centos/vagrant.sh", + "provision/centos/vmtools.sh", + "provision/centos/minimize.sh", + "provision/centos/opsworks.sh", + "provision/centos/cleanup.sh" + ] + } + ], + "post-processors": [ + { + "type": "vagrant", + "output": "build/centos7mini-opsworks-{{.Provider}}.box", + "include": [ + "opsworks/opsworks", + "opsworks/opsworks.rb", + "opsworks/pre_config.yml", + "opsworks/client.yml" + ], + "vagrantfile_template": "opsworks/Vagrantfile.template" + } + ] +}