Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Commit

Permalink
Sorry ruby, but chef has got to go.
Browse files Browse the repository at this point in the history
Apparently chef can't sit on its hands for a few months without breaking itself.  Out you go!  Once removed, there isn't much argument for ruby either: the next best provisioning tool for this use case is probably shell scripts.

Since the dev environment is tightly controlled, make is acceptable.

Rspec and serverspec is likewise abandoned for bats, a bash testing tool.
  • Loading branch information
phs committed Sep 22, 2016
1 parent e696d8a commit 96f1998
Show file tree
Hide file tree
Showing 57 changed files with 426 additions and 1,116 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is managed by chef, changes will be overwritten
# This file is managed by infrastructure, changes will be overwritten

root = true

Expand Down
16 changes: 0 additions & 16 deletions .gemspec

This file was deleted.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/bats"]
path = vendor/bats
url = https://github.com/sstephenson/bats.git
1 change: 0 additions & 1 deletion .rspec

This file was deleted.

5 changes: 0 additions & 5 deletions .rubocop.yml

This file was deleted.

21 changes: 5 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
sudo: true
dist: trusty
language: ruby
addons:
apt:
sources:
- chef-current-trusty
packages:
- chefdk
before_install:
- |
eval "$(/opt/chefdk/bin/chef shell-init bash)"
which ruby
ruby --version
which bundle
bundle --version
which gem
gem --version
language: c
env:
- PROJECT_DIR="$TRAVIS_BUILD_DIR"
install: bash scripts/provisioning/travis
script: make travis
deploy:
provider: releases
api_key:
Expand Down
3 changes: 0 additions & 3 deletions Berksfile

This file was deleted.

3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SHELL = /bin/bash

default: tests

travis: tests

tests: integration

integration:
vendor/bats/bin/bats test/integration
6 changes: 0 additions & 6 deletions Rakefile

This file was deleted.

26 changes: 8 additions & 18 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
require 'ostruct'
require 'pathname'

Vagrant.configure('2') do |config|
if Vagrant.has_plugin?('vagrant-cachier')
config.cache.scope = :box # http://fgrehm.viewdocs.io/vagrant-cachier/usage/
Expand All @@ -25,20 +22,13 @@ Vagrant.configure('2') do |config|
config.vm.provision :file, source: '~/.gitconfig', destination: '.gitconfig'
end

config.vm.provision :shell, inline: %(
which chef || wget -qO - https://www.chef.io/chef/install.sh | bash -s -- -P chefdk
berks vendor -b /vagrant/Berksfile /tmp/vagrant-chef/cookbooks
)

config.vm.provision :chef_solo do |chef_solo|
chef_solo.install = false
chef_solo.binary_path = '/opt/chefdk/bin'
chef_solo.add_recipe 'infrastructure::vagrant'
end

# If Vagrantfile.custom exists, read and eval it in this context
vagrant_custom = Pathname.new(__FILE__).parent + 'Vagrantfile.custom'
if File.exist?(vagrant_custom)
OpenStruct.new(config: config).instance_eval File.read(vagrant_custom)
config.vm.provision :shell do |shell|
shell.privileged = false
shell.keep_color = true
shell.path = 'scripts/provisioning/vagrant'
shell.env = {
PROJECT_DIR: '/vagrant',
PROJECT_NAME: 'infrastructure'
}
end
end
4 changes: 0 additions & 4 deletions attributes/default.rb

This file was deleted.

106 changes: 0 additions & 106 deletions chefignore

This file was deleted.

Loading

0 comments on commit 96f1998

Please sign in to comment.