diff --git a/packer/http/ubuntu-14.04/preseed.cfg b/packer/http/ubuntu-14.04/preseed.cfg deleted file mode 100644 index 8ea4a9ff..00000000 --- a/packer/http/ubuntu-14.04/preseed.cfg +++ /dev/null @@ -1,77 +0,0 @@ -# Some inspiration: -# * https://github.com/chrisroberts/vagrant-boxes/blob/master/definitions/precise-64/preseed.cfg -# * https://github.com/cal/vagrant-ubuntu-precise-64/blob/master/preseed.cfg - -# English plx -d-i debian-installer/language string en -d-i debian-installer/locale string en_US.UTF-8 -d-i localechooser/preferred-locale string en_US.UTF-8 -d-i localechooser/supported-locales en_US.UTF-8 - -# Including keyboards -d-i console-setup/ask_detect boolean false -d-i keyboard-configuration/layout select USA -d-i keyboard-configuration/variant select USA -d-i keyboard-configuration/modelcode string pc105 - - -# Just roll with it -d-i netcfg/get_hostname string ubuntu -d-i netcfg/get_domain string ubuntu - -d-i time/zone string UTC -d-i clock-setup/utc-auto boolean true -d-i clock-setup/utc boolean true - - -# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive -d-i debconf debconf/frontend select Noninteractive - -d-i pkgsel/install-language-support boolean false -tasksel tasksel/first multiselect standard, ubuntu-server - - -# Stuck between a rock and a HDD place -d-i partman-auto/method string lvm -d-i partman-lvm/confirm boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman-auto/choose_recipe select atomic - -d-i partman/confirm_write_new_label boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true - -# Write the changes to disks and configure LVM? -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-auto-lvm/guided_size string max - -# No proxy, plx -d-i mirror/http/proxy string - -# Default user, change -d-i passwd/user-fullname string vagrant -d-i passwd/username string vagrant -d-i passwd/user-password password vagrant -d-i passwd/user-password-again password vagrant -d-i user-setup/encrypt-home boolean false -d-i user-setup/allow-password-weak boolean true - -# No language support packages. -d-i pkgsel/install-language-support boolean false - -# Individual additional packages to install -d-i pkgsel/include string build-essential ssh - -#For the update -d-i pkgsel/update-policy select none - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select safe-upgrade - -# Go grub, go! -d-i grub-installer/only_debian boolean true - -d-i finish-install/reboot_in_progress note diff --git a/packer/scripts/common/install_consul.sh b/packer/scripts/common/install_consul.sh deleted file mode 100755 index 5d7185d5..00000000 --- a/packer/scripts/common/install_consul.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -cd /tmp/ -wget https://dl.bintray.com/mitchellh/consul/${CONSUL_VERSION}_linux_amd64.zip -O consul.zip -echo Installing Consul... -unzip consul.zip -sudo chmod +x consul -sudo mv consul /usr/bin/consul -sudo mkdir /etc/consul.d -sudo mkdir /etc/service -sudo chmod -R 777 /etc/consul.d -sudo cp /tmp/consul.conf /etc/init/consul.conf -sudo cp /tmp/consul-join.conf /etc/init/consul-join.conf -echo manual | sudo tee /etc/init/consul.override >/dev/null -echo manual | sudo tee /etc/init/consul-join.override >/dev/null - -wget https://dl.bintray.com/mitchellh/consul/${CONSUL_VERSION}_web_ui.zip -O consul-web_ui.zip -echo Installing Consul Web UI... -unzip consul-web_ui.zip -sudo mv dist /opt/consul-ui diff --git a/packer/scripts/common/install_weave.sh b/packer/scripts/common/install_weave.sh deleted file mode 100755 index 04864e4a..00000000 --- a/packer/scripts/common/install_weave.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -sudo wget -O /usr/local/bin/weave \ - https://github.com/weaveworks/weave/releases/download/v${WEAVE_VERSION}/weave -sudo chmod a+x /usr/local/bin/weave - diff --git a/packer/scripts/common/serverspec.sh b/packer/scripts/common/serverspec.sh deleted file mode 100755 index c51d9453..00000000 --- a/packer/scripts/common/serverspec.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -sudo gem install bundler --no-ri --no-rdoc -cd /tmp/tests -bundle install --path=vendor -bundle exec rake spec diff --git a/packer/scripts/common/sshd.sh b/packer/scripts/common/sshd.sh deleted file mode 100644 index 5a1e372e..00000000 --- a/packer/scripts/common/sshd.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -eu -set -o pipefail - -# UseDNS is mostly useless and disabling speeds up logins -echo "UseDNS no" >> /etc/ssh/sshd_config diff --git a/packer/scripts/common/virtualbox/install_vbox_guest_additions.sh b/packer/scripts/common/virtualbox/install_vbox_guest_additions.sh deleted file mode 100755 index f53e5526..00000000 --- a/packer/scripts/common/virtualbox/install_vbox_guest_additions.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -mkdir /tmp/isomount -mount -t iso9660 -o loop /home/vagrant/VBoxGuestAdditions.iso /tmp/isomount -/tmp/isomount/VBoxLinuxAdditions.run install -umount /tmp/isomount -rm -rf /tmp/isomount - -# mountpoint for vagrant -sudo mkdir -p /vagrant diff --git a/packer/scripts/common/virtualbox/sudoers.sh b/packer/scripts/common/virtualbox/sudoers.sh deleted file mode 100755 index f910afe9..00000000 --- a/packer/scripts/common/virtualbox/sudoers.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -# Setup sudo to allow no-password sudo for "admin" -groupadd -r admin -usermod -a -G admin vagrant -cp /etc/sudoers /etc/sudoers.orig -sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers -sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers diff --git a/packer/scripts/common/virtualbox/vagrant_ssh.sh b/packer/scripts/common/virtualbox/vagrant_ssh.sh deleted file mode 100755 index fc6eec1b..00000000 --- a/packer/scripts/common/virtualbox/vagrant_ssh.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -mkdir /home/vagrant/.ssh -wget --no-check-certificate \ - 'https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub' \ - -O /home/vagrant/.ssh/authorized_keys -chown -R vagrant /home/vagrant/.ssh -chmod -R go-rwsx /home/vagrant/.ssh diff --git a/packer/scripts/ubuntu/base.sh b/packer/scripts/ubuntu/base.sh deleted file mode 100755 index 620c88ae..00000000 --- a/packer/scripts/ubuntu/base.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -# The sleep 30 in the example above is very important. -# Because Packer is able to detect and SSH into the instance as soon as SSH is -# available, Ubuntu actually doesn't get proper amounts of time to initialize. -# The sleep makes sure that the OS properly initializes. -sleep 30 -sudo apt-get upgrade -y -sudo apt-get update -y - -sudo apt-get -y install git curl auditd audispd-plugins libcurl3 bridge-utils bundler default-jre-headless unzip wget python-setuptools python-protobuf cgroup-bin ruby2.0 -sudo easy_install pip - -sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby2.0 1 -sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem2.0 1 diff --git a/packer/scripts/ubuntu/clean.sh b/packer/scripts/ubuntu/clean.sh deleted file mode 100755 index b98fe876..00000000 --- a/packer/scripts/ubuntu/clean.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -apt-get -y autoremove -apt-get -y clean -rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? diff --git a/packer/scripts/ubuntu/install_docker.sh b/packer/scripts/ubuntu/install_docker.sh deleted file mode 100755 index d98ce3d6..00000000 --- a/packer/scripts/ubuntu/install_docker.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -set -eux -set -o pipefail - -sudo apt-get -y update - -sudo pip install docker-py==1.5.0 - -sudo apt-get install -y linux-image-extra-$(uname -r) - -# enable memory and swap cgroup -perl -p -i -e 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"/g' /etc/default/grub -/usr/sbin/update-grub - -# Install docker -# Add the repository to your APT sources -sudo echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' | tee /etc/apt/sources.list.d/docker.list -# Then import the repository key -sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D -# Install docker-engine -sudo apt-get update -sudo apt-get install -y docker-engine=${DOCKER_VERSION} - -# Download docker containers to the machine to save download time on -# provisioning later -docker pull mesosphere/mesos:${MESOS_VERSION} -docker pull mesosphere/mesos-master:${MESOS_VERSION} -docker pull mesosphere/mesos-slave:${MESOS_VERSION} -docker pull gliderlabs/registrator:master -docker pull asteris/haproxy-consul:latest -docker pull weaveworks/weave:${WEAVE_VERSION} -docker pull weaveworks/weaveexec:${WEAVE_VERSION} -docker pull weaveworks/scope:latest -docker pull mesosphere/marathon:${MARATHON_VERSION} -docker pull capgemini/dcos-cli:latest -docker pull andyshinn/dnsmasq:latest - -sudo service docker stop -echo manual | sudo tee /etc/init/docker.override >/dev/null diff --git a/packer/scripts/ubuntu/upstart/consul-join.conf b/packer/scripts/ubuntu/upstart/consul-join.conf deleted file mode 100644 index 260e0a82..00000000 --- a/packer/scripts/ubuntu/upstart/consul-join.conf +++ /dev/null @@ -1,25 +0,0 @@ -description "Join the consul cluster" - -start on started consul -stop on stopped consul - -task - -script - if [ -f "/etc/service/consul-join" ]; then - . /etc/service/consul-join - fi - - # Keep trying to join until it succeeds - set +e - while :; do - logger -t "consul-join" "Attempting join: ${CONSUL_JOIN}" - /usr/bin/consul join \ - ${CONSUL_JOIN} \ - >>/var/log/consul-join.log 2>&1 - [ $? -eq 0 ] && break - sleep 5 - done - - logger -t "consul-join" "Join success!" -end script diff --git a/packer/scripts/ubuntu/upstart/consul.conf b/packer/scripts/ubuntu/upstart/consul.conf deleted file mode 100644 index f3a4729f..00000000 --- a/packer/scripts/ubuntu/upstart/consul.conf +++ /dev/null @@ -1,21 +0,0 @@ -description "Consul" - -start on (local-filesystems and net-device-up IFACE=eth0) -stop on runlevel [!12345] - -respawn - -script - if [ -f "/etc/service/consul" ]; then - . /etc/service/consul - fi - - # Make sure to use all our CPUs, because Consul can block a scheduler thread - export GOMAXPROCS=`nproc` - - exec /usr/bin/consul agent \ - -data-dir="/mnt/consul" \ - -config-dir="/etc/consul.d" \ - ${CONSUL_FLAGS} \ - >>/var/log/consul.log 2>&1 -end script diff --git a/packer/scripts/ubuntu/virtualbox/install-dkms.sh b/packer/scripts/ubuntu/virtualbox/install-dkms.sh deleted file mode 100755 index 36e4a03e..00000000 --- a/packer/scripts/ubuntu/virtualbox/install-dkms.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -eu -set -o pipefail - -sudo apt-get -y install dkms diff --git a/packer/tests/.rspec b/packer/tests/.rspec deleted file mode 100644 index 49d5710b..00000000 --- a/packer/tests/.rspec +++ /dev/null @@ -1 +0,0 @@ ---format documentation diff --git a/packer/tests/Gemfile b/packer/tests/Gemfile deleted file mode 100644 index 992ada6b..00000000 --- a/packer/tests/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source "https://rubygems.org" - -gem "rake" -gem "serverspec" diff --git a/packer/tests/Rakefile b/packer/tests/Rakefile deleted file mode 100644 index 657a0953..00000000 --- a/packer/tests/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -require 'rake' -require 'rspec/core/rake_task' - -RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = 'spec/*_spec.rb' -end diff --git a/packer/tests/spec/base_spec.rb b/packer/tests/spec/base_spec.rb deleted file mode 100644 index 421f9a6b..00000000 --- a/packer/tests/spec/base_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'spec_helper' - -packages = [ - 'git', - 'curl', - 'libcurl3', - 'default-jre-headless', - 'unzip', - 'wget', - 'python-setuptools', - 'python-protobuf', - 'cgroup-bin', - 'ruby2.0', - 'auditd', - 'audispd-plugins' -] - -packages.each do |package| - describe package(package) do - it { should be_installed } - end -end diff --git a/packer/tests/spec/consul_spec.rb b/packer/tests/spec/consul_spec.rb deleted file mode 100644 index cec45230..00000000 --- a/packer/tests/spec/consul_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'spec_helper' - -describe file('/usr/bin/consul') do - it { should be_file } -end - -describe file('/etc/consul.d') do - it { should be_directory } - it { should be_mode 777 } -end - -describe file('/etc/init/consul.conf') do - it { should be_file } -end - -describe file('/opt/consul-ui') do - it { should be_directory } -end diff --git a/packer/tests/spec/docker_spec.rb b/packer/tests/spec/docker_spec.rb deleted file mode 100644 index f452eb9b..00000000 --- a/packer/tests/spec/docker_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper' - -describe file('/etc/default/grub') do - it { should contain 'cgroup_enable=memory swapaccount=1' } -end - -describe package('docker-engine') do - it { should be_installed.by('apt').with_version(ENV['DOCKER_VERSION']) } -end - -describe package('docker-py') do - it { should be_installed.by('pip').with_version('1.5.0') } -end - -describe package("linux-image-extra-#{`uname -r`.strip}") do - it { should be_installed } -end - -describe service('docker') do - it { should_not be_running } -end - -describe file('/etc/init/docker.override') do - it { should be_file } -end diff --git a/packer/tests/spec/spec_helper.rb b/packer/tests/spec/spec_helper.rb deleted file mode 100644 index da2d4f73..00000000 --- a/packer/tests/spec/spec_helper.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'serverspec' - -set :backend, :exec - -RSpec.configure do |c| - if ENV['ASK_SUDO_PASSWORD'] - require 'highline/import' - c.sudo_password = ask("Enter sudo password: ") { |q| q.echo = false } - else - c.sudo_password = ENV['SUDO_PASSWORD'] - end -end diff --git a/packer/tests/spec/weave_spec.rb b/packer/tests/spec/weave_spec.rb deleted file mode 100644 index e1d4f769..00000000 --- a/packer/tests/spec/weave_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe file('/usr/local/bin/weave') do - it { should be_file } -end diff --git a/packer/ubuntu-14.04_amd64-amis.json b/packer/ubuntu-14.04_amd64-amis.json deleted file mode 100644 index aef89159..00000000 --- a/packer/ubuntu-14.04_amd64-amis.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "variables": { - "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", - "aws_secret_key": "{{env `AWS_ACCESS_KEY`}}", - "mesos_version": "0.25.0-0.2.70.ubuntu1404", - "marathon_version": "v0.13.0", - "consul_version": "0.5.2", - "weave_version": "1.3.1", - "docker_version": "1.9.0-0~trusty", - "version": "{{env `APOLLO_VERSION`}}", - "aws_region": "{{env `AWS_REGION`}}", - "aws_source_ami": "{{env `AWS_SOURCE_AMI`}}", - "aws_instance_type": "{{env `AWS_INSTANCE_TYPE`}}" - }, - "builders": [{ - "type": "amazon-ebs", - "ami_name": "apollo-ubuntu-14.04-amd64 {{timestamp}}", - "ami_description": "Ubuntu 14.04 LTS, Mesos {{user `mesos_version`}}, Docker, Marathon, Consul {{user `consul_version`}}, Weave {{user `weave_version`}}, and Zookeeper.", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "region": "{{user `aws_region`}}", - "ami_regions": [ - "us-east-1", - "us-west-1", - "us-west-2", - "eu-west-1", - "eu-central-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-northeast-1", - "sa-east-1" - ], - "source_ami": "{{user `aws_source_ami`}}", - "instance_type": "{{user `aws_instance_type`}}", - "ami_groups": "all", - "ssh_username": "ubuntu", - "ssh_timeout": "10m" - }], - "provisioners": [ - { - "type": "file", - "source": "scripts/ubuntu/upstart/", - "destination": "/tmp" - }, - { - "type": "file", - "source": "tests", - "destination": "/tmp" - }, - { - "type": "shell", - "environment_vars": [ - "CONSUL_VERSION={{user `consul_version`}}", - "WEAVE_VERSION={{user `weave_version`}}", - "MESOS_VERSION={{user `mesos_version`}}", - "MARATHON_VERSION={{user `marathon_version`}}", - "DOCKER_VERSION={{user `docker_version`}}" - ], - "scripts": [ - "scripts/ubuntu/base.sh", - "scripts/common/sshd.sh", - "scripts/ubuntu/install_docker.sh", - "scripts/common/install_consul.sh", - "scripts/common/install_weave.sh", - "scripts/common/serverspec.sh" - ], - "execute_command": "{{ .Vars }} sudo -E -S bash -c '{{ .Path }}'" - } - ], - "push": { - "name": "capgemini/apollo" - }, - "post-processors": [{ - "type": "atlas", - "artifact": "capgemini/apollo-ubuntu-14.04-amd64", - "artifact_type": "aws.ami", - "metadata": { - "created_at": "{{timestamp}}", - "version": "{{user `version`}}+{{timestamp}}" - } - }] -} diff --git a/packer/ubuntu-14.04_amd64-droplet.json b/packer/ubuntu-14.04_amd64-droplet.json deleted file mode 100644 index 78a9888c..00000000 --- a/packer/ubuntu-14.04_amd64-droplet.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "variables": { - "digitalocean_api_token": "{{env `DIGITALOCEAN_API_TOKEN`}}", - "digitalocean_region": "{{env `DIGITALOCEAN_REGION`}}", - "digitalocean_size": "{{env `DIGITALOCEAN_SIZE`}}", - "digitalocean_image": "{{env `DIGITALOCEAN_IMAGE`}}", - "mesos_version": "0.25.0-0.2.70.ubuntu1404", - "marathon_version": "v0.13.0", - "consul_version": "0.5.2", - "weave_version": "1.3.1", - "docker_version": "1.9.0-0~trusty", - "version": "{{env `APOLLO_VERSION`}}" - }, - "builders": [{ - "type": "digitalocean", - "snapshot_name": "apollo-ubuntu-14.04-amd64-{{timestamp}}", - "api_token": "{{user `digitalocean_api_token`}}", - "image": "{{user `digitalocean_image`}}", - "region": "{{user `digitalocean_region`}}", - "size": "{{user `digitalocean_size`}}", - "ssh_timeout": "10m" - }], - "provisioners": [ - { - "type": "file", - "source": "scripts/ubuntu/upstart/", - "destination": "/tmp" - }, - { - "type": "file", - "source": "tests", - "destination": "/tmp" - }, - { - "type": "shell", - "environment_vars": [ - "CONSUL_VERSION={{user `consul_version`}}", - "WEAVE_VERSION={{user `weave_version`}}", - "MESOS_VERSION={{user `mesos_version`}}", - "MARATHON_VERSION={{user `marathon_version`}}", - "DOCKER_VERSION={{user `docker_version`}}" - ], - "scripts": [ - "scripts/ubuntu/base.sh", - "scripts/common/sshd.sh", - "scripts/ubuntu/install_docker.sh", - "scripts/common/install_consul.sh", - "scripts/common/install_weave.sh", - "scripts/common/serverspec.sh" - ], - "execute_command": "{{ .Vars }} sudo -E -S bash -c '{{ .Path }}'" - } - ], - "push": { - "name": "capgemini/apollo" - }, - "post-processors": [{ - "type": "atlas", - "artifact": "capgemini/apollo-ubuntu-14.04-amd64", - "artifact_type": "digitalocean.image", - "metadata": { - "created_at": "{{timestamp}}", - "version": "{{user `version`}}+{{timestamp}}" - } - }] -} diff --git a/packer/ubuntu-14.04_amd64-google.json b/packer/ubuntu-14.04_amd64-google.json deleted file mode 100644 index aec03f4a..00000000 --- a/packer/ubuntu-14.04_amd64-google.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "variables": { - "account_file": "{{env `GCS_ACCOUNT_FILE`}}", - "project_id": "{{env `GCS_PROJECT_ID`}}", - "source_image": "{{env `GCS_SOURCE_IMAGE`}}", - "zone": "{{env `GCS_ZONE`}}", - "mesos_version": "0.25.0-0.2.70.ubuntu1404", - "marathon_version": "v0.13.0", - "consul_version": "0.5.2", - "weave_version": "1.3.1", - "docker_version": "1.9.0-0~trusty", - "version": "{{env `APOLLO_VERSION`}}" - }, - "builders": [{ - "type": "googlecompute", - "image_name": "apollo-ubuntu-1404-amd64", - "image_description": "Ubuntu 14.04 LTS, Meosos {{user `mesos_version`}}, Docker, Marathon, Consul {{user `consul_version`}}, Weave {{user `weave_version`}}, and Zookeeper.", - "ssh_username": "ubuntu", - "ssh_timeout": "10m", - "account_file": "{{user `account_file`}}", - "project_id": "{{user `project_id`}}", - "source_image": "{{user `source_image`}}", - "zone": "{{user `zone`}}" - }], - "provisioners": [ - { - "type": "file", - "source": "scripts/ubuntu/upstart/", - "destination": "/tmp" - }, - { - "type": "file", - "source": "tests", - "destination": "/tmp" - }, - { - "type": "shell", - "environment_vars": [ - "CONSUL_VERSION={{user `consul_version`}}", - "WEAVE_VERSION={{user `weave_version`}}", - "MESOS_VERSION={{user `mesos_version`}}", - "MARATHON_VERSION={{user `marathon_version`}}", - "DOCKER_VERSION={{user `docker_version`}}" - ], - "scripts": [ - "scripts/ubuntu/base.sh", - "scripts/common/sshd.sh", - "scripts/ubuntu/install_docker.sh", - "scripts/common/install_consul.sh", - "scripts/common/install_weave.sh", - "scripts/common/serverspec.sh" - ], - "execute_command": "{{ .Vars }} sudo -E -S bash -c '{{ .Path }}'" - } - ], - "push": { - "name": "capgemini/apollo" - }, - "post-processors": [{ - "type": "atlas", - "artifact": "capgemini/apollo-ubuntu-14.04-amd64", - "artifact_type": "googlecompute.image", - "metadata": { - "created_at": "{{timestamp}}", - "version": "{{user `version`}}+{{timestamp}}" - } - }] -} diff --git a/packer/ubuntu-14.04_amd64.json b/packer/ubuntu-14.04_amd64.json deleted file mode 100644 index 1a18f211..00000000 --- a/packer/ubuntu-14.04_amd64.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "variables": { - "HTTP_PROXY": "{{env `http_proxy`}}", - "HTTPS_PROXY": "{{env `https_proxy`}}", - "http_proxy": "{{env `http_proxy`}}", - "https_proxy": "{{env `https_proxy`}}", - "ssh_name": "vagrant", - "ssh_pass": "vagrant", - "hostname": "ubuntu", - "version": "{{env `APOLLO_VERSION`}}", - "mesos_version": "0.25.0-0.2.70.ubuntu1404", - "marathon_version": "v0.13.0", - "consul_version": "0.5.2", - "weave_version": "1.3.1", - "docker_version": "1.9.0-0~trusty", - "access_token": "{{env `ATLAS_TOKEN`}}", - "iso_url": "http://releases.ubuntu.com/trusty/ubuntu-14.04.3-server-amd64.iso", - "iso_checksum": "9e5fecc94b3925bededed0fdca1bd417" - }, - "builders": [{ - "type": "virtualbox-iso", - "guest_os_type": "Ubuntu_64", - "headless": true, - "vm_name": "apollo-ubuntu-14.04-amd64-virtualbox", - "name": "apollo-ubuntu-14.04-amd64-virtualbox", - "disk_size": 40960, - "vboxmanage": [ - [ "modifyvm", "{{.Name}}", "--memory", "2048" ], - [ "modifyvm", "{{.Name}}", "--cpus", "2" ] - ], - "iso_url": "{{user `iso_url`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "iso_checksum_type": "md5", - "http_directory" : "./http/ubuntu-14.04", - "http_port_min" : 9001, - "http_port_max" : 9001, - "boot_command" : [ - "", - "/install/vmlinuz noapic ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", - "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", - "hostname={{user `hostname`}} ", - "fb=false debconf/frontend=noninteractive ", - "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA console-setup/ask_detect=false ", - "initrd=/install/initrd.gz -- " - ], - "ssh_username": "{{user `ssh_name`}}", - "ssh_password": "{{user `ssh_pass`}}", - "ssh_wait_timeout": "60m", - "shutdown_command": "echo '{{user `ssh_pass`}}' | sudo -S shutdown -P now", - "output_directory": "build/ubuntu-14.04_amd64_virtualbox", - "format": "ova" - }, - { - "type": "vmware-iso", - "guest_os_type": "linux", - "headless": true, - "vm_name": "apollo-ubuntu-14.04-amd64-vmware", - "name": "apollo-ubuntu-14.04-amd64-vmware", - "disk_size": 40960, - "vmx_data": { - "memsize": "2048", - "numvcpus": "2" - }, - "iso_url": "{{user `iso_url`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "iso_checksum_type": "md5", - "http_directory" : "./http/ubuntu-14.04", - "http_port_min" : 9001, - "http_port_max" : 9001, - "boot_command" : [ - "", - "/install/vmlinuz noapic ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", - "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", - "hostname={{user `hostname`}} ", - "fb=false debconf/frontend=noninteractive ", - "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA console-setup/ask_detect=false ", - "initrd=/install/initrd.gz -- " - ], - "ssh_username": "{{user `ssh_name`}}", - "ssh_password": "{{user `ssh_pass`}}", - "ssh_wait_timeout": "60m", - "shutdown_command": "echo '{{user `ssh_pass`}}' | sudo -S shutdown -P now", - "output_directory": "build/ubuntu-14.04_amd64_vmware" - }], - "provisioners": [ - { - "type": "file", - "source": "scripts/ubuntu/upstart/", - "destination": "/tmp" - }, - { - "type": "shell", - "environment_vars": [ - "HTTP_PROXY={{user `HTTP_PROXY`}}", - "HTTPS_PROXY={{user `HTTPS_PROXY`}}", - "http_proxy={{user `http_proxy`}}", - "https_proxy={{user `https_proxy`}}", - "CONSUL_VERSION={{user `consul_version`}}", - "WEAVE_VERSION={{user `weave_version`}}", - "MESOS_VERSION={{user `mesos_version`}}", - "MARATHON_VERSION={{user `marathon_version`}}", - "DOCKER_VERSION={{user `docker_version`}}" - ], - "scripts": [ - "scripts/ubuntu/base.sh", - "scripts/ubuntu/virtualbox/install-dkms.sh", - "scripts/common/virtualbox/install_vbox_guest_additions.sh", - "scripts/common/virtualbox/sudoers.sh", - "scripts/common/virtualbox/vagrant_ssh.sh", - "scripts/common/sshd.sh", - "scripts/ubuntu/install_docker.sh", - "scripts/common/install_consul.sh", - "scripts/common/install_weave.sh" - ], - "execute_command": "echo '{{user `ssh_pass`}}' | {{ .Vars }} sudo -E -S bash -c '{{ .Path }}'" - } - ], - "push": { - "name": "capgemini/apollo" - }, - "post-processors": [ - [{ - "type": "vagrant", - "output": "build/ubuntu-14.04_amd64_{{.Provider}}/apollo-ubuntu-14.04-amd64-{{.Provider}}.box", - "keep_input_artifact": true, - "compression_level": 9 - }, - { - "type": "atlas", - "only": ["apollo-ubuntu-14.04-amd64-vmware"], - "artifact": "capgemini/apollo", - "artifact_type": "vagrant.box", - "metadata": { - "provider": "vmware_desktop", - "version": "{{user `version`}}" - } - }, - { - "type": "atlas", - "only": ["apollo-ubuntu-14.04-amd64-virtualbox"], - "artifact": "capgemini/apollo", - "artifact_type": "vagrant.box", - "metadata": { - "provider": "virtualbox", - "version": "{{user `version`}}" - } - }] - ] -} diff --git a/wercker.yml b/wercker.yml index c855b0f8..672a1002 100644 --- a/wercker.yml +++ b/wercker.yml @@ -2,33 +2,8 @@ box: wercker/python no-response-timeout: 15 build: steps: - - install-packages: - packages: wget unzip - pip-install: requirements_file: "requirements-test.txt" - - script: - name: install packer - cwd: packer/ - code: | - wget https://dl.bintray.com/mitchellh/packer/packer_0.8.6_linux_amd64.zip - unzip packer_0.8.6_linux_amd64.zip - ./packer version - - script: - cwd: packer/ - name: validate packer template for AMI - code: ./packer validate ubuntu-14.04_amd64-amis.json - - script: - cwd: packer/ - name: validate packer template for Digitalocean - code: ./packer validate ubuntu-14.04_amd64-droplet.json - - script: - cwd: packer/ - name: validate packer template for Vagrant - code: ./packer validate ubuntu-14.04_amd64.json - - script: - cwd: packer/ - name: validate packer template for Google - code: ./packer validate ubuntu-14.04_amd64-google.json - capgemini/ansible-lint: name: run ansible-lint against the site.yml playbook playbook: site.yml @@ -37,6 +12,7 @@ build: code: | echo localhost > wercker_inventory ansible-galaxy install --force -r contrib-plugins/plugins.yml + ansible-galaxy install --force -r requirements.yml ansible-playbook -i wercker_inventory --syntax-check site.yml - script: name: scripts testing