Skip to content

Instantly share code, notes, and snippets.

@stevendanna
Created August 20, 2012 03:00
Show Gist options
  • Save stevendanna/3399851 to your computer and use it in GitHub Desktop.
Save stevendanna/3399851 to your computer and use it in GitHub Desktop.
Openstack Test-kitchen experiment
default_runner "openstack"
openstack do
auth_url "http://REDACTED:5000/v2.0/tokens"
username "steven"
password "REDACTED"
tenant "openstack"
end
cookbook "emacs" do
runtimes []
lint false
end
platform :centos do
end
platform :ubuntu do
version "12.04" do
image_id "c83e6a4e-2fc7-47be-b146-3ba9adefeba0"
flavor_id "10"
keyname "steven"
ssh_user "ubuntu"
install_chef true
end
end
sdanna@gaius ~/src/oc/cookbooks/emacs (master %) > kitchen status
ubuntu-12.04 active
sdanna@gaius ~/src/oc/cookbooks/emacs (master %) > kitchen destroy
[ubuntu-12.04] Terminating openstack server
sdanna@gaius ~/src/oc/cookbooks/emacs (master %) > kitchen test
Cookbook metadata specifies an unrecognized platform that will not be tested: centos
Cookbook metadata specifies an unrecognized platform that will not be tested: debian
Cookbook metadata specifies an unrecognized platform that will not be tested: fedora
Cookbook metadata specifies an unrecognized platform that will not be tested: freebsd
Cookbook metadata specifies an unrecognized platform that will not be tested: redhat
Cookbook metadata specifies an unrecognized platform that will not be tested: scientific
Assembling required cookbooks at [/Users/sdanna/src/oc/cookbooks/emacs/test/kitchen/.kitchen/cookbooks].
[ubuntu-12.04] Provisioning guest on Openstack
[ubuntu-12.04] Installing Chef
[...SNIP CHEF INSTALL...]
[ubuntu-12.04] Unpacking chef (from .../chef-full_10.12.0-1_amd64.deb) ...
[ubuntu-12.04] Setting up chef (10.12.0-1.ubuntu.11.04) ...
[ubuntu-12.04] Thank you for installing Chef!
[ubuntu-12.04] Processing triggers for initramfs-tools ...
[ubuntu-12.04] update-initramfs: Generating /boot/initrd.img-3.2.0-24-virtual
[ubuntu-12.04] Moving repo via SCP
[ubuntu-12.04] Moving cookbooks via SCP
[ubuntu-12.04] Creating node configuration JSON
[ubuntu-12.04] Creating chef-solo configuration
[ubuntu-12.04] Running chef-solo on host
[ubuntu-12.04] [Mon, 20 Aug 2012 03:07:17 +0000] INFO: *** Chef 10.12.0 ***
[ubuntu-12.04] [Mon, 20 Aug 2012 03:07:18 +0000] INFO: Setting the run_list to ["test-kitchen::default", "recipe[minitest-handler]", "emacs::default"] from JSON
[ubuntu-12.04] [Mon, 20 Aug 2012 03:07:18 +0000] INFO: Run List is [recipe[test-kitchen::default], recipe[minitest-handler], recipe[emacs::default]]
[ubuntu-12.04] [Mon, 20 Aug 2012 03:07:18 +0000] INFO: Run List expands to [test-kitchen::default, minitest-handler, emacs::default]
[ubuntu-12.04] [Mon, 20 Aug 2012 03:07:18 +0000] INFO: Starting Chef Run for cookbook-tester-ubuntu-12.novalocal
[ubuntu-12.04] [Mon, 20 Aug 2012 03:07:18 +0000] INFO: Running start handlers
[ubuntu-12.04] [Mon, 20 Aug 2012 03:07:18 +0000] INFO: Start handlers complete.
[ ... SNIP CHEF RUN ... ]
[ubuntu-12.04] [Mon, 20 Aug 2012 03:08:40 +0000] INFO: Processing package[emacs23-nox] action upgrade (emacs::default line 22)
[ubuntu-12.04] [Mon, 20 Aug 2012 03:09:27 +0000] INFO: package[emacs23-nox] upgraded from uninstalled to 23.3+1-1ubuntu9
[ubuntu-12.04] [Mon, 20 Aug 2012 03:09:27 +0000] INFO: Chef Run complete in 129.061279288 seconds
[ubuntu-12.04] [Mon, 20 Aug 2012 03:09:27 +0000] INFO: Running report handlers
[ubuntu-12.04] Run options: -v --seed 50121
[ubuntu-12.04] # Running tests:
[ubuntu-12.04] Finished tests in 0.002123s, 0.0000 tests/s, 0.0000 assertions/s.
[ubuntu-12.04] 0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
[ubuntu-12.04] [Mon, 20 Aug 2012 03:09:27 +0000] INFO: Report handlers complete
@jtimberman
Copy link

Does it work, e.g., for the apache2 or mysql cookbooks?

@stevendanna
Copy link
Author

It currently doesn't install the rvm runtimes for you, but if you have them installed it worked in my tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment