summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-05-24 15:20:44 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-05-24 15:20:44 -0700
commita5df2a8647b9ed8e03b62e0a42eec6fd5f9bd813 (patch)
treebed02a8b348a0bd81d005370bdbe00da7d2dd28f
parent37668e4b9a96b60c0a7ea5e7f9843c935163974a (diff)
parentd96e7295860896d08b1ee943e83c7bb828053a63 (diff)
downloadchef-a5df2a8647b9ed8e03b62e0a42eec6fd5f9bd813.tar.gz
Merge pull request #4928 from chef/lcg/kitchen-tests3
convert kitchen tests to docker + other fixes
-rw-r--r--.travis.yml120
-rw-r--r--kitchen-tests/.kitchen.travis.yml107
-rw-r--r--kitchen-tests/.kitchen.yml13
-rw-r--r--kitchen-tests/Berksfile6
-rw-r--r--kitchen-tests/Berksfile.lock35
-rw-r--r--kitchen-tests/Gemfile17
-rw-r--r--kitchen-tests/Gemfile.lock122
-rw-r--r--kitchen-tests/cookbooks/base/attributes/default.rb13
-rw-r--r--kitchen-tests/cookbooks/base/libraries/chef-sugar.rb4
-rw-r--r--kitchen-tests/cookbooks/base/metadata.rb4
-rw-r--r--kitchen-tests/cookbooks/base/recipes/default.rb6
-rw-r--r--kitchen-tests/cookbooks/base/recipes/packages.rb2
-rw-r--r--kitchen-tests/test/integration/webapp/default_spec.rb125
-rw-r--r--kitchen-tests/test/integration/webapp/serverspec/Gemfile4
-rw-r--r--kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock19
-rw-r--r--kitchen-tests/test/integration/webapp/serverspec/localhost/default_spec.rb127
16 files changed, 412 insertions, 312 deletions
diff --git a/.travis.yml b/.travis.yml
index 2416a064f3..dc2e89553a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -114,105 +114,73 @@ matrix:
### START TEST KITCHEN ONLY ###
#
- rvm: 2.2
+ services: docker
+ sudo: required
gemfile: kitchen-tests/Gemfile
before_install:
- gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
- gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
- - echo -n $DO_KEY_CHUNK_{0..30} >> ~/.ssh/id_aws.base64
- - cat ~/.ssh/id_aws.base64 | tr -d ' ' | base64 --decode > ~/.ssh/id_aws.pem
before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- cd kitchen-tests
script:
- - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then bundle exec kitchen test ubuntu-1404; fi
+ - bundle exec kitchen test ubuntu-1204
after_failure:
- cat .kitchen/logs/kitchen.log
- after_script:
- - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then bundle exec kitchen destroy ubuntu-1404; fi
env:
- - UBUNTU=1
+ - UBUNTU=1204
- KITCHEN_YAML=.kitchen.travis.yml
- - EC2_SSH_KEY_PATH=~/.ssh/id_aws.pem
- - secure: VAauyVnAMWhqvnhJOJ/tCDn3XAdWqzbWiDVQPNBkqtm2SBIvhmZl2hlrusvw6YLU31Prdf8fSFhOSysVQQs/rJYrmD/1BfV79p6M7cGXYZ0nGWwldF81N296lyFoZLyrqtmG4G0cx3Pw2ojADFgFe+B5eTGlqJFD+z371g4RF/Y=
- - secure: A+qtUF2LPJGkUAdvt04AwZMt69rzaeTyR0/1XEOAuntBKKXSCzddUzr5ePDc9QQ/57AWywKxhVLpnxk3QzKN7r7zerDxyIJBgklNDpNAKkeQjP3T6FpaKEIN9ROcpPtsM6FJ5Agb+bEQoRJF7s+ampO3wLV3XpTiWNuWkcAhv9A=
- - secure: J8JIg15trrPgc8X/1DsaUWDQCdDWTvN/AorXzZ/ReudHS6G/KpoynZ5lTmKjlgFiFNE/TGMDv486pStGtIcarTKTuIEmNADdEWlAVH7bxclpayMjtppVuapRCkZWccs5gz5CJyhX7yhQCFTYoqVox9Y4qHGCluF3oqCcPRtCOOw=
- - secure: NJYn0blTMwIoFxZlsoMWK8hPO/fi45rgWOqEImnjvSRk++5WL+GgjLBgLvEi7wCMkBijhIMWtnva60ojd4MrxeS7evrmGRjJKXnPuSKEsrGbArZPskBjCAcg+3PlnQQUkFf6hvbGD3HZlJtcbs4hrx8tbDT2Ie7bmQfqpsawKY4=
- - secure: FipoX1VzZkzPUP6Gxd05DEva7cX6xKK2Wdq+Y18nNkyW2afPLXCNl5kCsNrgvbqAzbjKaP2M8+b0zwKjrFzNebqmmx1RRfZUJWUkNRF1EgE+tHytmMZW6tNcQlTlvA0KqXi4Dt6SIQ0l/DhwwNKZ80jmpiyYi/ErxIXzbVgVtYA=
- - secure: T2MbE9twIkdaor796/lDioCgb2+FP3G8lXq+lIqnjaL22WMP8yKtkjNo8ggSlvQZE7MAQHqi5LISw5MU2MI6ImTU50/pgdWreM5Cx37WWYqntcbJ0Sz7v396KGJzeqbDql1fGolHDlykfi+OJzzbIGC8cjz7iAD2RUZU95wEC5s=
- - secure: hWEQInvuanQavFCE3m6/q9BjNEFZQmLc94EWnBKTMiwUAdYgQQMLohN7K1Gc8irxYKp86F+P+XWE4lfDZNK3sqmxyk51TtT2EfmKWs+jSLq4+NBYQwXCpRELC5Irpm0GRCYthhsQSuarpVWss/0s0o7iJQaHxrSPcQiwDouIpwU=
- - secure: OllJUaR/WUu+H0FIjU7vQxU10JT4d+/FZuTqnX6ZTcXN3dXCirnabYp/j+r5OBY3QeOojOyzGfHUWYEUGH/PTxcxYjrohtFTWht9N9x+SxfX2fLqieH/kRKyDmIidsY8qKChf/LD9f+SwpXRXND/PctKhNR4C5BH57fGUEqE9FU=
- - secure: KgKnGtM4e+cVYfLn78eTWJ1q4ORv128abB72QBc/xiSh0rvxSIojVKZCXmRetQPXIl7NoIzU2IyjR1ABEZ+vA83PayTEsOr2KDRDgolSIgZSSiDFt4U2phQsxl4fX7wFv/jWlbxM2fysKBSIRAF57CwBjGhLjmpUO+5PdoR7N2s=
- - secure: IgOx4STauKnJWENQGcn2iBp32XcNd2anNR0Fua0ugjudu1+CV+IxcIhI8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6mAEWKEil9xNk4aYV9FywinwUs4fnFlnIW/Gj1gLkUjm4DtxdmRZIlRXIbgsNch6H916TCPg4Q2oPsW2nVdXPjW/2jhkfLUiSnuhL+ylami1NF8Up7vokXknh/jFNZU=
- - secure: GTfrUVmMQSxho3Ia4Y1ONqKvVMD34GHF2/TJb8UdQV7iH+nVxVXpy3nWaCXa9ri7lRzMefkoVLy0gKK13YoVd7w3d2S3/IfNakC85XfN6VuOzK/FDkA0WoPrgKjcQ64I+3dQ6cgrMWWTieKwRZy+Ve24iRbnN055Hk+VRMu6OGw=
- - secure: SOMYGVfHLkHsH6koxpw68YQ4ydEo6YXPhHbrYGQbehUbFa6+OZzBcAJRJbKjyhD2AZRvNr2jB8XnjYKvVyDGQRpkWhGYZ7CpHqINpDsqKBsbiMe3/+KmKQqS+UKxNGefquoOvyQ1N8Xy77dkWYokRtGMEuR12RkZLonxiDW8Qyg=
- - secure: bSsDg+dJnPFdFiC/tbb61HdLh/Q0z2RVVAReT1wvV1BN4fN4NydvkUGbQmyFNyyunLulEs+X0oFma9L0497nUlTnan8UOg9sIleTSybPX6E9xSKKCItH1GgDw8bM9Igez5OOrrePBD3altVrH+FmGx0dlTQgM/KZMN50BJ79cXw=
- rvm: 2.2
+ services: docker
+ sudo: required
gemfile: kitchen-tests/Gemfile
before_install:
- gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
- gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
- - echo -n $DO_KEY_CHUNK_{0..30} >> ~/.ssh/id_aws.base64
- - cat ~/.ssh/id_aws.base64 | tr -d ' ' | base64 --decode > ~/.ssh/id_aws.pem
before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- cd kitchen-tests
script:
- - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then bundle exec kitchen test centos-6; fi
+ - bundle exec kitchen test ubuntu-1404
+ after_failure:
+ - cat .kitchen/logs/kitchen.log
+ env:
+ - UBUNTU=1404
+ - KITCHEN_YAML=.kitchen.travis.yml
+ - rvm: 2.2
+ services: docker
+ sudo: required
+ gemfile: kitchen-tests/Gemfile
+ before_install:
+ - gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
+ - gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
+ before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
+ - cd kitchen-tests
+ script:
+ - bundle exec kitchen test ubuntu-1604
+ after_failure:
+ - cat .kitchen/logs/kitchen.log
+ env:
+ - UBUNTU=1604
+ - KITCHEN_YAML=.kitchen.travis.yml
+ - rvm: 2.2
+ services: docker
+ sudo: required
+ gemfile: kitchen-tests/Gemfile
+ before_install:
+ - gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
+ - gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
+ before_script:
+ - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
+ - cd kitchen-tests
+ script:
+ - bundle exec kitchen test centos-6
after_failure:
- cat .kitchen/logs/kitchen.log
- after_script:
- - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then bundle exec kitchen destroy centos-6; fi
env:
- - CENTOS=1
+ - CENTOS=6
- KITCHEN_YAML=.kitchen.travis.yml
- - EC2_SSH_KEY_PATH=~/.ssh/id_aws.pem
- - secure: VAauyVnAMWhqvnhJOJ/tCDn3XAdWqzbWiDVQPNBkqtm2SBIvhmZl2hlrusvw6YLU31Prdf8fSFhOSysVQQs/rJYrmD/1BfV79p6M7cGXYZ0nGWwldF81N296lyFoZLyrqtmG4G0cx3Pw2ojADFgFe+B5eTGlqJFD+z371g4RF/Y=
- - secure: A+qtUF2LPJGkUAdvt04AwZMt69rzaeTyR0/1XEOAuntBKKXSCzddUzr5ePDc9QQ/57AWywKxhVLpnxk3QzKN7r7zerDxyIJBgklND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qqe+jX8dxePSy26MSTfG8eo9/NxN9uXr+tKaHoi6G7BRXDHtQ8dQ=
- - secure: TRkW9pIuIYHXJmPlDYoddxIp2M2W2f7qBGNJKEMB5xrOezES7w9XTg2eQXrD8jBO+fUUmMnAaDAXZuU58nMysPXx3vhtZKncg8w5CyuXJk2P8nkdPh0u5nmRhEpWrLKtLwJrX48xmJhNQvQqDAyL5c9WUzlWJ4WJFgoP5IDWmLc=
- - secure: QHuMdtFCvttiIOx6iS+lH4bKXZMwsgVQ6FPsUW5zJ7uw6mAEWKEil9xNk4aYV9FywinwUs4fnFlnIW/Gj1gLkUjm4DtxdmRZIlRXIbgsNch6H916TCPg4Q2oPsW2nVdXPjW/2jhkfLUiSnuhL+ylami1NF8Up7vokXknh/jFNZU=
- - secure: GTfrUVmMQSxho3Ia4Y1ONqKvVMD34GHF2/TJb8UdQV7iH+nVxVXpy3nWaCXa9ri7lRzMefkoVLy0gKK13YoVd7w3d2S3/IfNakC85XfN6VuOzK/FDkA0WoPrgKjcQ64I+3dQ6cgrMWWTieKwRZy+Ve24iRbnN055Hk+VRMu6OGw=
- - secure: SOMYGVfHLkHsH6koxpw68YQ4ydEo6YXPhHbrYGQbehUbFa6+OZzBcAJRJbKjyhD2AZRvNr2jB8XnjYKvVyDGQRpkWhGYZ7CpHqINpDsqKBsbiMe3/+KmKQqS+UKxNGefquoOvyQ1N8Xy77dkWYokRtGMEuR12RkZLonxiDW8Qyg=
- - secure: bSsDg+dJnPFdFiC/tbb61HdLh/Q0z2RVVAReT1wvV1BN4fN4NydvkUGbQmyFNyyunLulEs+X0oFma9L0497nUlTnan8UOg9sIleTSybPX6E9xSKKCItH1GgDw8bM9Igez5OOrrePBD3altVrH+FmGx0dlTQgM/KZMN50BJ79cXw=
### END TEST KITCHEN ONLY ###
- rvm: 2.2
sudo: required
diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml
index 682a1a5f68..9946935917 100644
--- a/kitchen-tests/.kitchen.travis.yml
+++ b/kitchen-tests/.kitchen.travis.yml
@@ -1,14 +1,16 @@
---
driver:
- name: ec2
- aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
- region: "us-west-2"
- availability_zone: "us-west-2a"
- security_group_ids: ["travis-ci"]
- instance_type: "m3.medium"
+ name: dokken
+ privileged: true
+ chef_version: latest
+
+transport:
+ name: dokken
provisioner:
name: chef_github
+ root_path: /opt/kitchen
+ chef_version: latest
chef_omnibus_url: "https://omnitruck.chef.io/install.sh"
chef_omnibus_install_options: "-c current"
github_owner: "chef"
@@ -20,22 +22,91 @@ provisioner:
client_rb:
diff_disabled: true
-transport:
- ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %>
+verifier:
+ name: inspec
platforms:
- - name: ubuntu-14.04
- driver:
- # http://cloud-images.ubuntu.com/locator/ec2/
- # 14.04 amd64 us-west-2 hvm:ebs-ssd
- image_id: ami-63ac5803
- - name: centos-6
- driver:
- image_id: ami-05cf2265
+- name: debian-7
+ driver:
+ image: debian:7
+ pid_one_command: /sbin/init
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get -y install zlib1g-dev sudo net-tools
+
+- name: debian-8
+ driver:
+ image: debian:8
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get -y install zlib1g-dev sudo net-tools
+
+- name: centos-5
+ driver:
+ image: centos:5
+ platform: rhel
+ run_command: /sbin/init
+ intermediate_instructions:
+ - RUN yum clean all
+ - RUN yum install -y which initscripts net-tools sudo
+
+- name: centos-6
+ driver:
+ image: centos:6
+ run_command: /sbin/init
+ intermediate_instructions:
+ - RUN yum clean all
+ - RUN yum -y install which initscripts net-tools sudo
+
+- name: centos-7
+ driver:
+ image: centos:7
+ pid_one_command: /usr/lib/systemd/systemd
+ intermediate_instructions:
+ - RUN yum clean all
+ - RUN yum -y install which initscripts net-tools sudo
+
+- name: fedora-23
+ driver:
+ image: fedora:23
+ pid_one_command: /usr/lib/systemd/systemd
+ intermediate_instructions:
+ - RUN dnf -y install yum which initscripts net-tools
+
+- name: ubuntu-12.04
+ driver:
+ image: ubuntu-upstart:12.04
+ pid_one_command: /sbin/init
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get -y install zlib1g-dev sudo net-tools
+
+- name: ubuntu-14.04
+ driver:
+ image: ubuntu-upstart:14.04
+ pid_one_command: /sbin/init
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get -y install zlib1g-dev sudo net-tools
+
+- name: ubuntu-16.04
+ driver:
+ image: ubuntu:16.04
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get -y install zlib1g-dev sudo net-tools
+
+- name: opensuse-13.2
+ driver:
+ image: opensuse:13.2
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN zypper refresh
suites:
- name: webapp
run_list:
- recipe[base::default]
- - recipe[webapp::default]
- attributes:
+# - recipe[webapp::default]
diff --git a/kitchen-tests/.kitchen.yml b/kitchen-tests/.kitchen.yml
index af7ac3cde5..c02ea55a02 100644
--- a/kitchen-tests/.kitchen.yml
+++ b/kitchen-tests/.kitchen.yml
@@ -5,6 +5,9 @@ driver:
cpus: 4
memory: 2048
+verifier:
+ name: inspec
+
provisioner:
name: chef_github
chef_omnibus_url: "https://omnitruck.chef.io/install.sh"
@@ -19,17 +22,15 @@ provisioner:
platforms:
- name: ubuntu-12.04
- name: ubuntu-14.04
- # needs updates for 16.04
- #- name: ubuntu-16.04
- # needs updates for 7.2
- #- name: centos-7.2
+ - name: ubuntu-16.04
+ - name: centos-7.2
- name: centos-6.7
# needs fixing for 5.11
- #- name: centos-5.11
+ # - name: centos-5.11
suites:
- name: webapp
run_list:
- recipe[base::default]
- - recipe[webapp::default]
+# - recipe[webapp::default]
attributes:
diff --git a/kitchen-tests/Berksfile b/kitchen-tests/Berksfile
index 23c72d5394..31e49b3e18 100644
--- a/kitchen-tests/Berksfile
+++ b/kitchen-tests/Berksfile
@@ -1,6 +1,8 @@
source "https://supermarket.getchef.com"
-cookbook "webapp", :path => "cookbooks/webapp"
-cookbook "base", :path => "cookbooks/base"
+cookbook "webapp", path: "cookbooks/webapp"
+cookbook "base", path: "cookbooks/base"
cookbook "php", "~> 1.5.0"
+
+cookbook "resolver", github: "chef-cookbooks/resolver", branch: "lcg/docker"
diff --git a/kitchen-tests/Berksfile.lock b/kitchen-tests/Berksfile.lock
index b5fa7aba13..f4a9de89e2 100644
--- a/kitchen-tests/Berksfile.lock
+++ b/kitchen-tests/Berksfile.lock
@@ -2,6 +2,10 @@ DEPENDENCIES
base
path: cookbooks/base
php (~> 1.5.0)
+ resolver
+ git: git://github.com/chef-cookbooks/resolver.git
+ revision: dd65ab8e2346cc0739c13682c74868f5b939b06a
+ branch: lcg/docker
webapp
path: cookbooks/webapp
@@ -14,7 +18,7 @@ GRAPH
apt (>= 0.0.0)
build-essential (>= 0.0.0)
chef-client (>= 0.0.0)
- fail2ban (>= 0.0.0)
+ chef_hostname (>= 0.0.0)
logrotate (>= 0.0.0)
multipackage (>= 0.0.0)
nscd (>= 0.0.0)
@@ -26,15 +30,18 @@ GRAPH
ubuntu (>= 0.0.0)
users (>= 0.0.0)
yum-epel (>= 0.0.0)
- build-essential (3.2.0)
+ build-essential (4.0.0)
+ mingw (>= 0.0.0)
seven_zip (>= 0.0.0)
- chef-client (4.5.0)
+ chef-client (4.5.2)
cron (>= 1.7.0)
logrotate (>= 1.9.0)
windows (>= 1.39.0)
chef-sugar (3.3.0)
- chef_handler (1.3.0)
- compat_resource (12.9.1)
+ chef_handler (1.4.0)
+ chef_hostname (0.4.1)
+ compat_resource (>= 0.0.0)
+ compat_resource (12.10.4)
cron (1.7.6)
database (2.3.1)
aws (>= 0.0.0)
@@ -42,12 +49,13 @@ GRAPH
mysql-chef_gem (~> 0.0)
postgresql (>= 1.0.0)
xfs (>= 0.0.0)
- fail2ban (2.3.0)
- yum-epel (>= 0.0.0)
iis (4.1.7)
windows (>= 1.34.6)
iptables (2.2.0)
logrotate (1.9.2)
+ mingw (1.0.0)
+ compat_resource (>= 0.0.0)
+ seven_zip (>= 0.0.0)
multipackage (3.0.28)
compat_resource (>= 0.0.0)
mysql (5.6.3)
@@ -55,11 +63,12 @@ GRAPH
mysql-chef_gem (0.0.5)
build-essential (>= 0.0.0)
mysql (>= 0.0.0)
- nscd (2.0.0)
+ nscd (4.0.0)
compat_resource (>= 0.0.0)
- ntp (1.11.0)
+ ntp (2.0.0)
windows (>= 1.38.0)
- ohai (3.0.1)
+ ohai (4.0.2)
+ compat_resource (>= 12.9.0)
openssh (2.0.0)
iptables (>= 1.0)
openssl (4.4.0)
@@ -75,9 +84,9 @@ GRAPH
apt (>= 1.9.0)
build-essential (>= 0.0.0)
openssl (~> 4.0)
- resolver (1.3.0)
+ resolver (1.3.1)
selinux (0.9.0)
- seven_zip (2.0.0)
+ seven_zip (2.0.1)
windows (>= 1.2.2)
sudo (2.9.0)
ubuntu (1.2.0)
@@ -88,7 +97,7 @@ GRAPH
database (~> 2.3.1)
mysql (~> 5.6.3)
php (~> 1.5.0)
- windows (1.40.0)
+ windows (1.41.0)
chef_handler (>= 0.0.0)
xfs (2.0.1)
xml (2.0.0)
diff --git a/kitchen-tests/Gemfile b/kitchen-tests/Gemfile
index acc62156ae..ad89269a75 100644
--- a/kitchen-tests/Gemfile
+++ b/kitchen-tests/Gemfile
@@ -1,10 +1,11 @@
source "https://rubygems.org"
-group :end_to_end do
- gem "berkshelf"
- gem "test-kitchen", "~> 1.4"
- gem "kitchen-appbundle-updater"
- gem "kitchen-vagrant", "~> 0.17"
- gem "kitchen-ec2", github: "test-kitchen/kitchen-ec2"
- gem "vagrant-wrapper"
-end
+gem "berkshelf"
+gem "kitchen-appbundle-updater"
+gem "kitchen-dokken"
+gem "kitchen-ec2"
+gem "kitchen-inspec"
+gem "kitchen-vagrant"
+gem "ridley"
+gem "test-kitchen"
+gem "vagrant-wrapper"
diff --git a/kitchen-tests/Gemfile.lock b/kitchen-tests/Gemfile.lock
index 69c23ad156..3f59bf90fe 100644
--- a/kitchen-tests/Gemfile.lock
+++ b/kitchen-tests/Gemfile.lock
@@ -1,26 +1,15 @@
-GIT
- remote: git://github.com/test-kitchen/kitchen-ec2.git
- revision: fec3f199a646980dc289ac6db9f90e9a9e4b0f6b
- specs:
- kitchen-ec2 (1.0.0)
- aws-sdk (~> 2)
- excon
- multi_json
- retryable (~> 2.0)
- test-kitchen (~> 1.4, >= 1.4.1)
-
GEM
remote: https://rubygems.org/
specs:
addressable (2.4.0)
artifactory (2.3.2)
- aws-sdk (2.3.2)
- aws-sdk-resources (= 2.3.2)
- aws-sdk-core (2.3.2)
+ aws-sdk (2.3.8)
+ aws-sdk-resources (= 2.3.8)
+ aws-sdk-core (2.3.8)
jmespath (~> 1.0)
- aws-sdk-resources (2.3.2)
- aws-sdk-core (= 2.3.2)
- berkshelf (4.3.2)
+ aws-sdk-resources (2.3.8)
+ aws-sdk-core (= 2.3.8)
+ berkshelf (4.3.3)
addressable (~> 2.3, >= 2.3.4)
berkshelf-api-client (~> 2.0, >= 2.0.2)
buff-config (~> 1.0)
@@ -49,34 +38,70 @@ GEM
buff-ruby_engine (0.1.0)
buff-shell_out (0.2.0)
buff-ruby_engine (~> 0.1.0)
+ builder (3.2.2)
celluloid (0.16.0)
timers (~> 4.0.0)
celluloid-io (0.16.2)
celluloid (>= 0.16.0)
nio4r (>= 1.1.0)
- chef-config (12.9.41)
+ chef-config (12.10.24)
fuzzyurl (~> 0.8.0)
mixlib-config (~> 2.0)
mixlib-shellout (~> 2.0)
cleanroom (1.0.0)
+ coderay (1.1.1)
diff-lcs (1.2.5)
+ docker-api (1.26.2)
+ excon (>= 0.38.0)
+ json
erubis (2.7.0)
excon (0.49.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
- ffi (1.9.10-x86-mingw32)
+ ffi (1.9.10)
fuzzyurl (0.8.0)
+ gssapi (1.2.0)
+ ffi (>= 1.0.1)
+ gyoku (1.3.1)
+ builder (>= 2.1.2)
hashie (3.4.4)
hitimes (1.2.4)
- hitimes (1.2.4-x86-mingw32)
httpclient (2.7.2)
+ inspec (0.22.1)
+ hashie (~> 3.4)
+ json (~> 1.8)
+ method_source (~> 0.8)
+ pry (~> 0)
+ r-train (~> 0.12)
+ rainbow (~> 2)
+ rspec (~> 3)
+ rspec-its (~> 1.2)
+ rubyzip (~> 1.1)
+ thor (~> 0.19)
jmespath (1.2.4)
json_pure (>= 1.8.1)
json (1.8.3)
json_pure (1.8.3)
kitchen-appbundle-updater (0.1.2)
+ kitchen-dokken (0.0.29)
+ docker-api (~> 1.26.2)
+ test-kitchen (~> 1.5)
+ kitchen-ec2 (1.0.0)
+ aws-sdk (~> 2)
+ excon
+ multi_json
+ retryable (~> 2.0)
+ test-kitchen (~> 1.4, >= 1.4.1)
+ kitchen-inspec (0.13.0)
+ inspec (>= 0.20.0, < 1.0.0)
+ test-kitchen (~> 1.6)
kitchen-vagrant (0.20.0)
test-kitchen (~> 1.4)
+ little-plugger (1.1.4)
+ logging (2.1.0)
+ little-plugger (~> 1.1)
+ multi_json (~> 1.10)
+ method_source (0.8.2)
minitar (0.5.4)
mixlib-authentication (1.4.0)
mixlib-log
@@ -90,21 +115,32 @@ GEM
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
- mixlib-shellout (2.2.6-universal-mingw32)
- win32-process (~> 0.8.2)
- wmi-lite (~> 1.0)
mixlib-versioning (1.1.0)
molinillo (0.4.5)
- multi_json (1.12.0)
+ multi_json (1.12.1)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.1.1)
nio4r (1.2.1)
+ nori (2.6.0)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
+ pry (0.10.3)
+ coderay (~> 1.1.0)
+ method_source (~> 0.8.1)
+ slop (~> 3.4)
+ r-train (0.12.1)
+ docker-api (~> 1.26)
+ json (~> 1.8)
+ mixlib-shellout (~> 2.0)
+ net-scp (~> 1.2)
+ net-ssh (>= 2.9, < 4.0)
+ winrm (~> 1.6)
+ winrm-fs (~> 0.3)
+ rainbow (2.1.0)
retryable (2.0.3)
- ridley (4.5.0)
+ ridley (4.5.1)
addressable
buff-config (~> 1.0)
buff-extensions (~> 1.0)
@@ -122,20 +158,30 @@ GEM
retryable (~> 2.0)
semverse (~> 1.1)
varia_model (~> 0.4.0)
+ rspec (3.4.0)
+ rspec-core (~> 3.4.0)
+ rspec-expectations (~> 3.4.0)
+ rspec-mocks (~> 3.4.0)
rspec-core (3.4.4)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
+ rspec-its (1.2.0)
+ rspec-core (>= 3.0.0)
+ rspec-expectations (>= 3.0.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
+ rubyntlm (0.6.0)
+ rubyzip (1.2.0)
safe_yaml (1.0.4)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
semverse (1.2.1)
+ slop (3.6.0)
solve (2.0.3)
molinillo (~> 0.4.2)
semverse (~> 1.1)
@@ -153,20 +199,32 @@ GEM
varia_model (0.4.1)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 4.0.0)
- win32-process (0.8.3)
- ffi (>= 1.0.0)
- wmi-lite (1.0.0)
+ winrm (1.8.1)
+ builder (>= 2.1.2)
+ gssapi (~> 1.2)
+ gyoku (~> 1.0)
+ httpclient (~> 2.2, >= 2.2.0.2)
+ logging (>= 1.6.1, < 3.0)
+ nori (~> 2.0)
+ rubyntlm (~> 0.6.0)
+ winrm-fs (0.4.2)
+ erubis (~> 2.7)
+ logging (>= 1.6.1, < 3.0)
+ rubyzip (~> 1.1)
+ winrm (~> 1.5)
PLATFORMS
ruby
- x86-mingw32
DEPENDENCIES
berkshelf
kitchen-appbundle-updater
- kitchen-ec2!
- kitchen-vagrant (~> 0.17)
- test-kitchen (~> 1.4)
+ kitchen-dokken
+ kitchen-ec2
+ kitchen-inspec
+ kitchen-vagrant
+ ridley
+ test-kitchen
vagrant-wrapper
BUNDLED WITH
diff --git a/kitchen-tests/cookbooks/base/attributes/default.rb b/kitchen-tests/cookbooks/base/attributes/default.rb
index d4e5d1ee5a..f3bcb4f21a 100644
--- a/kitchen-tests/cookbooks/base/attributes/default.rb
+++ b/kitchen-tests/cookbooks/base/attributes/default.rb
@@ -1,9 +1,12 @@
+puts "CHEF SUGAR THINKS WE ARE ON UBUNTU" if ubuntu?
+puts "CHEF SUGAR THINKS WE ARE ON RHEL" if rhel?
+
#
# ubuntu cookbook overrides
#
-default["ubuntu"]["archive_url"] = "mirror://mirrors.ubuntu.com/mirrors.txt"
-default["ubuntu"]["security_url"] = "mirror://mirrors.ubuntu.com/mirrors.txt"
+default["ubuntu"]["archive_url"] = "http://us-west-2.ec2.archive.ubuntu.com/ubuntu"
+default["ubuntu"]["security_url"] = "http://us-west-2.ec2.archive.ubuntu.com/ubuntu"
default["ubuntu"]["include_source_packages"] = true
default["ubuntu"]["components"] = "main restricted universe multiverse"
@@ -78,3 +81,9 @@ default["resolver"]["search"] = "chef.io"
default["authorization"]["sudo"]["passwordless"] = true
default["authorization"]["sudo"]["users"] = %w{vagrant centos ubuntu}
+
+#
+# nscd cookbook overrides
+#
+
+default["nscd"]["server_user"] = "nobody"
diff --git a/kitchen-tests/cookbooks/base/libraries/chef-sugar.rb b/kitchen-tests/cookbooks/base/libraries/chef-sugar.rb
new file mode 100644
index 0000000000..90d02a361f
--- /dev/null
+++ b/kitchen-tests/cookbooks/base/libraries/chef-sugar.rb
@@ -0,0 +1,4 @@
+require "chef/sugar"
+
+# hack until this gets baked into chef-sugar so we can use chef-sugar in attributes files
+Chef::Node.send(:include, Chef::Sugar::DSL)
diff --git a/kitchen-tests/cookbooks/base/metadata.rb b/kitchen-tests/cookbooks/base/metadata.rb
index 9e5e792f89..3811fe914d 100644
--- a/kitchen-tests/cookbooks/base/metadata.rb
+++ b/kitchen-tests/cookbooks/base/metadata.rb
@@ -6,10 +6,12 @@ description "Installs/Configures base"
long_description "Installs/Configures base"
version "0.1.0"
+gem "chef-sugar"
+
depends "apt"
depends "build-essential"
depends "chef-client"
-depends "fail2ban"
+depends "chef_hostname"
depends "logrotate"
depends "multipackage"
depends "nscd"
diff --git a/kitchen-tests/cookbooks/base/recipes/default.rb b/kitchen-tests/cookbooks/base/recipes/default.rb
index 4ddd7a7b04..be939b78e6 100644
--- a/kitchen-tests/cookbooks/base/recipes/default.rb
+++ b/kitchen-tests/cookbooks/base/recipes/default.rb
@@ -5,9 +5,11 @@
# Copyright (C) 2014
#
+hostname "chef-travis-ci.chef.io"
+
if node[:platform_family] == "debian"
- include_recipe "apt"
include_recipe "ubuntu"
+ apt_update "packages"
end
if %w{rhel fedora}.include?(node[:platform_family])
@@ -33,8 +35,6 @@ include_recipe "chef-client"
include_recipe "openssh"
-include_recipe "fail2ban"
-
include_recipe "nscd"
include_recipe "logrotate"
diff --git a/kitchen-tests/cookbooks/base/recipes/packages.rb b/kitchen-tests/cookbooks/base/recipes/packages.rb
index f242951a4c..c3a552b05c 100644
--- a/kitchen-tests/cookbooks/base/recipes/packages.rb
+++ b/kitchen-tests/cookbooks/base/recipes/packages.rb
@@ -1,6 +1,6 @@
-pkgs = %w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop iptraf tmux s3cmd sysbench }
+pkgs = %w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop tmux s3cmd sysbench }
# this deliberately calls the multipackage API N times in order to do one package installation in order to exercise the
# multipackage cookbook.
diff --git a/kitchen-tests/test/integration/webapp/default_spec.rb b/kitchen-tests/test/integration/webapp/default_spec.rb
new file mode 100644
index 0000000000..fbd1e0e782
--- /dev/null
+++ b/kitchen-tests/test/integration/webapp/default_spec.rb
@@ -0,0 +1,125 @@
+#describe port(80) do
+# it { should be_listening }
+# its('processes') {should include 'http'}
+#end
+#
+#describe command("curl http://localhost/index.html") do
+# its("stdout") { should match /Hello, World!/ }
+#end
+
+case os[:family]
+when "debian", "ubuntu"
+ ssh_package = "openssh-client"
+ ssh_service = "ssh"
+ ntp_service = "ntp"
+when "centos", "redhat", "fedora"
+ ssh_package = "openssh-clients"
+ ssh_service = "sshd"
+ ntp_service = "ntpd"
+else
+ raise "i don't know the family #{os[:family]}"
+end
+
+describe package("nscd") do
+ it { should be_installed }
+end
+
+describe service("nscd") do
+ # broken?
+ # it { should be_enabled }
+ it { should be_installed }
+ it { should be_running }
+end
+
+describe package(ssh_package) do
+ it { should be_installed }
+end
+
+describe service(ssh_service) do
+ it { should be_enabled }
+ it { should be_installed }
+ it { should be_running }
+end
+
+describe sshd_config do
+ its("Protocol") { should cmp 2 }
+ its("GssapiAuthentication") { should cmp "no" }
+ its("UseDns") { should cmp "no" }
+end
+
+describe ssh_config do
+ its("StrictHostKeyChecking") { should cmp "no" }
+ its("GssapiAuthentication") { should cmp "no" }
+end
+
+describe package("ntp") do
+ it { should be_installed }
+end
+
+describe service(ntp_service) do
+ # broken?
+ # it { should be_enabled }
+ it { should be_installed }
+ it { should be_running }
+end
+
+describe service("chef-client") do
+ it { should be_enabled }
+ it { should be_installed }
+ it { should be_running }
+end
+
+describe file("/etc/resolv.conf") do
+ its("content") { should match /search\s+chef.io/ }
+ its("content") { should match /nameserver\s+8.8.8.8/ }
+ its("content") { should match /nameserver\s+8.8.4.4/ }
+end
+
+describe package("gcc") do
+ it { should be_installed }
+end
+
+describe package("flex") do
+ it { should be_installed }
+end
+
+describe package("bison") do
+ it { should be_installed }
+end
+
+describe package("autoconf") do
+ it { should be_installed }
+end
+
+%w{lsof tcpdump strace zsh dmidecode ltrace bc curl wget telnet subversion git traceroute htop tmux s3cmd sysbench }.each do |pkg|
+ describe package pkg do
+ it { should be_installed }
+ end
+end
+
+if %w{debian ubuntu}.include?(os[:family])
+ describe apt("http://us-west-2.ec2.archive.ubuntu.com/ubuntu") do
+ it { should be_enabled }
+ it { should exist }
+ end
+end
+
+describe etc_group.where(group_name: "sysadmin") do
+ its("users") { should include "adam" }
+ its("gids") { should eq [2300] }
+end
+
+describe passwd.users("adam") do
+ its("uids") { should eq ["666"] }
+end
+
+describe ntp_conf do
+ its("server") { should_not eq nil }
+end
+
+# busted inside of docker containers?
+describe port(22) do
+ it { should be_listening }
+ its("protocols") { should include "tcp" }
+ its("processes") { should eq ["sshd"] }
+end
diff --git a/kitchen-tests/test/integration/webapp/serverspec/Gemfile b/kitchen-tests/test/integration/webapp/serverspec/Gemfile
deleted file mode 100644
index eef1450f7a..0000000000
--- a/kitchen-tests/test/integration/webapp/serverspec/Gemfile
+++ /dev/null
@@ -1,4 +0,0 @@
-# This Gemfile is only needed so that busser will install gems it needs for serverspec_helper.rb to work
-source "https://rubygems.org"
-
-gem "ffi-yajl", "~> 1.1" # Go away, JSON gem
diff --git a/kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock b/kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock
deleted file mode 100644
index ac6c11f28c..0000000000
--- a/kitchen-tests/test/integration/webapp/serverspec/Gemfile.lock
+++ /dev/null
@@ -1,19 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- ffi (1.9.10)
- ffi (1.9.10-x86-mingw32)
- ffi-yajl (1.4.0)
- ffi (~> 1.5)
- libyajl2 (~> 1.2)
- libyajl2 (1.2.0)
-
-PLATFORMS
- ruby
- x86-mingw32
-
-DEPENDENCIES
- ffi-yajl (~> 1.1)
-
-BUNDLED WITH
- 1.11.2
diff --git a/kitchen-tests/test/integration/webapp/serverspec/localhost/default_spec.rb b/kitchen-tests/test/integration/webapp/serverspec/localhost/default_spec.rb
deleted file mode 100644
index 992e4f7683..0000000000
--- a/kitchen-tests/test/integration/webapp/serverspec/localhost/default_spec.rb
+++ /dev/null
@@ -1,127 +0,0 @@
-
-require "net/http"
-require "uri"
-
-require "#{ENV['BUSSER_ROOT']}/../kitchen/data/serverspec_helper"
-
-describe "webapp::default", :end_to_end => true do
-
- describe "installed packages" do
- shared_examples_for "a package" do
- it "is installed" do
- expect(package(package_name)).to be_installed
- end
- end
-
- describe "#{property[:apache][:package]} package" do
- include_examples "a package" do
- let(:package_name) { property[:apache][:package] }
- end
- end
-
- describe "#{property[:mysql][:server_package]} package" do
- include_examples "a package" do
- let(:package_name) { property[:mysql][:server_package] }
- end
- end
-
- describe "#{property[:mysql][:client_package]} package" do
- include_examples "a package" do
- let(:package_name) { property[:mysql][:client_package] }
- end
- end
-
- describe "php package" do
- include_examples "a package" do
- let(:package_name) { property[:php][:package] }
- end
- end
- end
-
- describe "enabled/running services" do
- shared_examples_for "a service" do
- it "is enabled" do
- expect(service(service_name)).to be_enabled
- end
-
- it "is running" do
- expect(service(service_name)).to be_enabled
- end
- end
-
- describe "#{property[:apache][:service_name]} service" do
- include_examples "a service" do
- let(:service_name) { property[:apache][:service_name] }
- end
- end
-
- describe "mysql service" do
- include_examples "a service" do
- let(:service_name) { property[:mysql][:service_name] }
- end
- end
-
- end
-
- describe "mysql database" do
- let(:db_query) { "mysql -u root -pilikerandompasswordstoo -e \"#{statement}\"" }
- let(:statement) { "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='webapp'" }
- it "creates a database called 'webapp'" do
- expect(command(db_query).stdout).to match /webapp/
- end
-
- describe "mysql database user 'webapp'" do
- let(:statement) { "SELECT Host, Db FROM mysql.db WHERE User='webapp'\\G" }
- it "adds user 'webapp' to database 'webapp@localhost'" do
- expect(command(db_query).stdout).to match /Host: localhost\n Db: webapp/
- end
-
- describe "grants" do
- shared_examples_for "a privilege" do |priv|
- let(:statement) {
- "SELECT #{priv_query}" \
- " FROM mysql.db" \
- " WHERE Host='localhost' AND Db='webapp' AND User='webapp'\\G"
- }
- let(:priv_query) { "#{priv.capitalize}_priv" }
-
- it "has privilege #{priv} on 'webapp@localhost'" do
- expect(command(db_query).stdout).to match /#{priv_query}: Y/
- end
- end
-
- %w{select update insert delete create}.each do |priv|
- include_examples "a privilege", priv do
- end
- end
- end
- end
- end
-
- describe "generated webpages" do
- let(:get_response) { Net::HTTP.get_response(uri) }
- shared_examples_for "a webpage" do
- it "exists" do
- expect(get_response).to be_kind_of(Net::HTTPSuccess)
- end
-
- it "displays content" do
- expect(get_response.body).to include(content)
- end
- end
-
- describe "http://localhost/index.html" do
- include_examples "a webpage" do
- let(:uri) { URI.parse("http://localhost/index.html") }
- let(:content) { "Hello, World!" }
- end
- end
-
- describe "http://localhost/index.php" do
- include_examples "a webpage" do
- let(:uri) { URI.parse("http://localhost/index.php") }
- let(:content) { "Hello, World!" }
- end
- end
- end
-end