From a9e294704d0b7cf77810064a0d252a16d47eb888 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Wed, 15 Mar 2017 17:57:18 +0000 Subject: [PATCH] Bug 1318295 - Vagrant: Remove the puppet provisioner Since it's now a no-op. --- .slugignore | 1 - Vagrantfile | 19 ------------------- puppet/manifests/classes/utils.pp | 15 --------------- puppet/manifests/vagrant.pp | 12 ------------ vagrant/setup.sh | 2 ++ 5 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 puppet/manifests/classes/utils.pp delete mode 100644 puppet/manifests/vagrant.pp diff --git a/.slugignore b/.slugignore index de97fe095..a7ab702a0 100644 --- a/.slugignore +++ b/.slugignore @@ -1,4 +1,3 @@ /docs/ -/puppet/ /tests/ /vagrant/ diff --git a/Vagrantfile b/Vagrantfile index f436a83d4..7c5a410f2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,16 +4,6 @@ # We require 1.5+ due to specifying only the box name and not config.vm.box_url. Vagrant.require_version ">= 1.5.0" -def puppet_provisioner(config) - config.vm.provision "puppet" do |puppet| - puppet.manifests_path = "puppet/manifests" - puppet.manifest_file = "vagrant.pp" - - # enable this to see verbose and debug puppet output - #puppet.options = "--verbose --debug" - end -end - Vagrant.configure("2") do |config| # required for NFS to work config.vm.network "private_network", type: "dhcp" @@ -28,21 +18,12 @@ Vagrant.configure("2") do |config| override.vm.box = "ubuntu/trusty64" vb.name = "treeherder" vb.memory = "3072" - - puppet_provisioner(override) end config.vm.provider "hyperv" do |hv, override| override.vm.box = "ericmann/trusty64" hv.vmname = "treeherder" hv.memory = "3072" - - # Hyper-V box doesn't have Puppet installed. So install it manually. - override.vm.provision "install-puppet", type: "shell" do |s| - s.inline = "apt-get update && apt-get -y install puppet" - end - - puppet_provisioner(override) end config.vm.provision "shell", privileged: false, path: "vagrant/setup.sh" diff --git a/puppet/manifests/classes/utils.pp b/puppet/manifests/classes/utils.pp deleted file mode 100644 index aa5eb41a3..000000000 --- a/puppet/manifests/classes/utils.pp +++ /dev/null @@ -1,15 +0,0 @@ -define line($file, $line, $ensure = 'present') { - case $ensure { - default : { err ( "unknown ensure value ${ensure}" ) } - present: { - exec { "/bin/echo '${line}' >> '${file}'": - unless => "/bin/grep -qFx '${line}' '${file}'" - } - } - absent: { - exec { "/usr/bin/perl -ni -e 'print unless /^\\Q${line}\\E\$/' '${file}'": - onlyif => "/bin/grep -qFx '${line}' '${file}'" - } - } - } -} diff --git a/puppet/manifests/vagrant.pp b/puppet/manifests/vagrant.pp deleted file mode 100644 index d7e20f42d..000000000 --- a/puppet/manifests/vagrant.pp +++ /dev/null @@ -1,12 +0,0 @@ -# Playdoh puppet magic for dev boxes -import "classes/*.pp" - -$APP_USER="vagrant" -$APP_GROUP="vagrant" -$HOME_DIR = "/home/${APP_USER}" -$PROJ_DIR = "${HOME_DIR}/treeherder" -$VENV_DIR = "${HOME_DIR}/venv" - -Exec { - path => "${VENV_DIR}/bin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin", -} diff --git a/vagrant/setup.sh b/vagrant/setup.sh index 979bc17f3..8b97dc8cf 100644 --- a/vagrant/setup.sh +++ b/vagrant/setup.sh @@ -113,3 +113,5 @@ mysql -u root -e 'CREATE DATABASE IF NOT EXISTS treeherder' echo '-----> Running Django migrations and loading reference data' ./manage.py migrate --noinput ./manage.py load_initial_data + +echo '-----> Setup complete!'