Skip to content

Instantly share code, notes, and snippets.

@marcy-terui
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcy-terui/ac89c0538176d57f7dc9 to your computer and use it in GitHub Desktop.
Save marcy-terui/ac89c0538176d57f7dc9 to your computer and use it in GitHub Desktop.
DockerCli-Driver + LocalShell-Provisoner(Itamae) + Shell-Verifier(Serverspec)でTest-Kitchen最速フロー ref: http://qiita.com/Marcy/items/7ca000f83d08266ee352
---
platforms:
- name: ubuntu-14.04
suites:
# Vagrant-Driver + Itamae-Provisioner + Busser-Verifier
- name: example1
provisioner:
name: itamae
driver:
name: vagrant
run_list:
- recipes/default.rb
# DockerCli-Driver + Itamae-Provisioner + Shell-Verifier
- name: example2
provisioner:
name: itamae
driver:
name: docker_cli
transport:
name: docker_cli
run_list:
- recipes/default.rb
verifier:
name: shell
command: ./bin/rspec test/integration/docker_cli/serverspec/example_spec.rb
# DockerCli-Driver + LocalShell-Provisioner + Shell-Verifier
- name: example3
provisioner:
name: local_shell
command: ./bin/itamae docker kitchen/recipes/default.rb --container=$KITCHEN_CONTAINER_ID
driver:
name: docker_cli
transport:
name: docker_cli
run_list:
- recipes/default.rb
verifier:
name: shell
command: ./bin/rspec test/integration/docker_cli/serverspec/example_spec.rb
$ time ./bin/kitchen test example1 -l warn
>>>>>> wget, curl, fetch, perl or python not found on this instance.
real 3m56.800s
user 0m8.726s
sys 0m3.052s
$ time ./bin/kitchen test example2 -l warn
>>>>>> wget, curl, fetch, perl or python not found on this instance.
.
Finished in 7.07 seconds (files took 0.61411 seconds to load)
1 example, 0 failures
real 2m30.228s
user 0m4.245s
sys 0m1.049s
$ time ./bin/kitchen test example3 -l warn
INFO : Starting Itamae...
INFO : Recipe: /Users/marcy/github/high-speed-infra-ci/kitchen/recipes/default.rb
INFO : execute[apt-get update -y] executed will change from 'false' to 'true'
INFO : package[nginx] installed will change from 'false' to 'true'
INFO : Image created: edc827fdb43070818b41383cdfd9c6cb7aba0d67b98a0bd9cd90fcda138c61f0
.
Finished in 4.52 seconds (files took 0.31834 seconds to load)
1 example, 0 failures
real 1m9.589s
user 0m3.420s
sys 0m0.676s
source "https://rubygems.org"
gem 'test-kitchen'
gem 'kitchen-verifier-shell'
gem 'kitchen-provisioner-local_shell'
gem 'kitchen-docker_cli'
gem 'kitchen-vagrant'
gem 'serverspec'
gem 'docker-api'
gem 'kitchen-itamae'
gem 'itamae', '>= 1.3.3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment