Skip to content

Commit d4fb00e

Browse files
authored
Chef 12 migration (#22)
* chef 12 migration * update for chef 12 * fix verify_version * fix deprecation warning * fix tests for chef 12 * updating filesystem cookbook * updating log spec for 100% coverage * updating ruby-version * updating rake and berks for chef12 * locking berksfile.lock * locking berksfile.lock * putting in apt-compile-time * adding apt to runlist
1 parent f21dbf9 commit d4fb00e

31 files changed

+486
-270
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.vagrant
2-
Berksfile.lock
32
*~
43
*#
54
.#*
65
\#*#
76
.*.sw[a-z]
87
*.un~
98
/cookbooks
9+
cache_dir
1010

1111
# Bundler
1212
Gemfile.lock
@@ -16,3 +16,10 @@ bin/*
1616
VERSION
1717
.kitchen/
1818
.kitchen.local.yml
19+
20+
doc/
21+
.yardoc/
22+
berks-cookbooks/
23+
knife.rb
24+
syntaxcache/
25+
coverage/

.kitchen.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
11
---
22
driver_plugin: vagrant
33
driver_config:
4-
require_chef_omnibus: '11.18'
4+
customize:
5+
cpus: 1
6+
memory: 512
7+
ssh:
8+
insert_key: false
9+
10+
provisioner:
11+
name: chef_zero
12+
always_update_cookbooks: true
13+
require_chef_omnibus: 12.16.42
14+
log_level: info
15+
log_file: /var/log/chef-solo.log
516

617
platforms:
18+
- name: centos-7.2
19+
driver_config:
20+
box: bento/centos-7.2
21+
- name: centos-6.8
22+
driver_config:
23+
box: bento/centos-6.8
724
- name: ubuntu-12.04
825
driver_config:
9-
box: opscode-ubuntu-12.04
10-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
26+
box: bento/ubuntu-12.04
1127
- name: ubuntu-14.04
1228
driver_config:
13-
box: opscode-ubuntu-14.04
14-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-14.04_provisionerless.box
15-
- name: centos-6.8
16-
driver_config:
17-
box: opscode-centos-6.8
18-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.8_provisionerless.box
29+
box: bento/ubuntu-14.04
30+
1931
suites:
2032
- name: default
21-
run_list: ["recipe[rs-storage]"]
22-
attributes: {}
33+
run_list: ['recipe[apt]','recipe[rs-storage]']
34+
attributes:
35+
apt:
36+
compile_time_update: true

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--format documentation

.rubocop.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
AllCops:
2+
Exclude:
3+
- 'berks-cookbooks/**/*'
4+
- 'knife.rb'
5+
Style/AccessorMethodName:
6+
Exclude:
7+
- 'Rakefile'
8+
- 'libraries/helper.rb'
9+
Lint/UselessAssignment:
10+
Exclude:
11+
- 'recipes/stripe.rb'
12+
- 'recipes/volume.rb'
13+
Style/PredicateName:
14+
Exclude:
15+
- 'libraries/helper.rb'
16+
Lint/EndAlignment:
17+
Exclude:
18+
- 'recipes/default.rb'
19+
Metrics/BlockNesting:
20+
Exclude:
21+
- 'recipes/default.rb'
22+
Style/DoubleNegation:
23+
Exclude:
24+
- 'libraries/helper.rb'
25+
Style/RegexpLiteral:
26+
Exclude:
27+
- 'libraries/helper.rb'
28+
Lint/ShadowingOuterLocalVariable:
29+
Exclude:
30+
- 'recipes/stripe.rb'

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.3.1

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
language: ruby
22
rvm:
3-
- 2.0.0
4-
- 1.9.3
5-
before_script: bundle exec berks install
6-
script: bundle exec strainer test --except kitchen
3+
- 2.3.1
4+
before_install:
5+
- curl -L https://www.getchef.com/chef/install.sh | sudo bash -s -- -P chefdk -v 1.0.3
6+
- gem install bundler -v 1.11.2
7+
install:
8+
- chef exec bundle install --jobs=3 --retry=3
9+
before_script: chef exec rake setup_test_environment
10+
script: "./.travis_install.sh"
711
notifications:
812
slack:
9-
secure: jypk2i83t2b5e1oAGGV3mcIWGesJYNk1MnH/kDsgClD16pLKfOE8rnyduhwNdNL1NlVURbFMjp9ZEGJQeYqnLs9ZXnr3ez7lDmFoM9YWVE030664tyTmaXYcksQBINfYwMrO13oih8bvXwStLshItxAbNHpKiu4/qmzDVl+rOtE=
13+
secure: FBCQb9ApoEzqZisD4IbFmw+ZujFU6kwRkCiwES6qmJB22cgMsFqBB/+KOv3OLAFTNVjQfsTGEyzeqXFW9Chhze+xOGSxBMKOtZI/+5OVTvNithBhwOBlcb3IW546mlfGMXorWlY6JEb9NO0c1oJ7Oe9wB9WIELaQy6MaF9PS7q0=

.travis_install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set -ev
2+
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
3+
git clone https://github.com/$TRAVIS_REPO_SLUG.git $TRAVIS_REPO_SLUG
4+
cd $TRAVIS_REPO_SLUG
5+
git checkout master
6+
git checkout -qf $TRAVIS_COMMIT
7+
fi
8+
chef exec rake except_kitchen

Berksfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
site :opscode
1+
source 'https://supermarket.chef.io'
22

3-
cookbook "rightscale_volume", github: 'rightscale-cookbooks/rightscale_volume'
4-
cookbook "rightscale_backup", github: 'rightscale-cookbooks/rightscale_backup'
5-
cookbook 'windows', '1.40.0'# keep for compatiblity with chef 11, can remove with chef 12
63
metadata
4+
5+
cookbook 'filesystem', github: 'rightscale-cookbooks-contrib/filesystem_cookbook', branch: 'update_lvm_cookbook_dependency_3'
6+
cookbook 'rightscale_volume', github: 'rightscale-cookbooks/rightscale_volume'
7+
cookbook 'rightscale_backup', github: 'rightscale-cookbooks/rightscale_backup'

Berksfile.lock

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
DEPENDENCIES
2+
filesystem
3+
git: https://github.com/rightscale-cookbooks-contrib/filesystem_cookbook.git
4+
revision: 9c2a21a8aa41b16d3774ed5292f9a31b018dee92
5+
branch: update_lvm_cookbook_dependency_3
6+
rightscale_backup
7+
git: https://github.com/rightscale-cookbooks/rightscale_backup.git
8+
revision: 454fa9f582943f0ace47dd90bf6106e7bf752a93
9+
rightscale_volume
10+
git: https://github.com/rightscale-cookbooks/rightscale_volume.git
11+
revision: 48c24ba0f0815e86200793ef50fe27dce9f09d8e
12+
rs-storage
13+
path: .
14+
metadata: true
15+
16+
GRAPH
17+
apt (5.0.1)
18+
compat_resource (>= 12.16.3)
19+
build-essential (7.0.3)
20+
compat_resource (>= 12.16.3)
21+
mingw (>= 1.1)
22+
seven_zip (>= 0.0.0)
23+
chef_handler (2.1.0)
24+
compat_resource (12.16.3)
25+
filesystem (0.11.0)
26+
lvm (~> 3.1)
27+
xfs (>= 0.0.0)
28+
lvm (3.1.0)
29+
marker (1.0.1)
30+
mingw (1.2.4)
31+
compat_resource (>= 0.0.0)
32+
seven_zip (>= 0.0.0)
33+
ohai (4.2.3)
34+
compat_resource (>= 12.14.7)
35+
rightscale_backup (2.0.0)
36+
build-essential (>= 0.0.0)
37+
rightscale_volume (~> 2.0.0)
38+
rightscale_volume (2.0.0)
39+
build-essential (>= 0.0.0)
40+
rs-storage (2.0.0)
41+
apt (>= 0.0.0)
42+
build-essential (>= 0.0.0)
43+
chef_handler (>= 0.0.0)
44+
filesystem (>= 0.0.0)
45+
lvm (~> 3.1)
46+
marker (>= 0.0.0)
47+
rightscale_backup (~> 2.0.0)
48+
rightscale_volume (~> 2.0.0)
49+
seven_zip (2.0.2)
50+
windows (>= 1.2.2)
51+
windows (2.1.1)
52+
ohai (>= 4.0.0)
53+
xfs (2.0.1)

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ rs-storage Cookbook CHANGELOG
33

44
This file is used to list changes made in each version of the rs-storage cookbook.
55

6-
v1.2.1
6+
v2.0.0
7+
------
8+
9+
- Add support for Chef 12
10+
- Remove support for Chef 11
711

12+
v1.2.1
13+
------
814
- pin Gems and cookbooks using Gemfile.lock and Berksfile.lock
915

1016

0 commit comments

Comments
 (0)