Skip to content

Instantly share code, notes, and snippets.

View cheeseplus's full-sized avatar
🎯
Focusing

Seth Thomas cheeseplus

🎯
Focusing
View GitHub Profile
@cheeseplus
cheeseplus / basho.repo
Last active August 29, 2015 14:07
CentOS 5, packagecloud, and alternate repo
[basho]
name=Basho Stable Repo
baseurl=http://yum.basho.com/el/5/products/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://yum.basho.com/gpg/RPM-GPG-KEY-basho
sslverify=true
@cheeseplus
cheeseplus / serverspec-fixes.md
Last active August 29, 2015 14:07
serverspec :(

ServerSpec, Test Kitchen, and Sanity

We're big fans of the ServerSpec, the RSpec-based testing framework, for functional testing of cookbooks. We're also big fans of working test and if you've been paying attention, changes in ServerSpec are wreaking a bit of havoc for those that are users of test kitchen.

What Happened?

The fine folks behind ServerSpec (Specinfra too) released [version 2][1] which brings some syntax changes and is based on Rspec 3. These changes seem like a generally good idea so why is this a problem? Busser, a component of test kitchen that executes tests including serverspec via plugins,currently pulls the latest gems to run it's tests. This means that if you didn't update your tests for Serverspec v2 then you are going to have a bad time.

Version 2 tl;dr

* package[riak-cs-control] action install[2014-11-17T22:16:14+00:00] INFO: Processing package[riak-cs-control] action install (riak-cs::control line 32)
================================================================================
Error executing action `install` on resource 'package[riak-cs-control]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
require 'chef/provisioning'
machine_batch do
controller_config = <<-ENDCONFIG
config.vm.box = "centos65"
config.vm.network "forwarded_port", guest: 443, host: 9443 # dashboard-ssl
config.vm.network "forwarded_port", guest: 4002, host: 4002
config.vm.network "forwarded_port", guest: 5000, host: 5000
config.vm.network "forwarded_port", guest: 8773, host: 8773 # compute-ec2-api
config.vm.network "forwarded_port", guest: 8774, host: 8774 # compute-api
================================================================================
Error executing action `enable` on resource 'service[keystone]'
================================================================================
Chef::Exceptions::Exec
----------------------
/usr/sbin/update-rc.d keystone defaults returned 1, expected 0
Resource Declaration:
# This is an example software definition for a Ruby project.
#
# Lots of software definitions for popular open source software
# already exist in `opscode-omnibus`:
#
# https://github.com/opscode/omnibus-software/tree/master/config/software
#
name "manageiq"
default_version "master"
name 'manageiq'
maintainer 'sthomas@getchef.com'
homepage 'https://github.com/ManageIQ/manageiq'
install_dir '/opt/manageiq'
build_version Omnibus::BuildVersion.semver
build_iteration 1
override :ruby, version: "1.9.3-p550"
I, [2014-12-01T16:45:04.784477 #21954] INFO -- default-centos-5-8-x64: -----> Destroying <default-centos-5-8-x64>...
I, [2014-12-01T16:45:04.785261 #21954] INFO -- default-centos-5-8-x64: Finished destroying <default-centos-5-8-x64> (0m0.00s).
I, [2014-12-01T16:45:28.177984 #22073] INFO -- default-centos-5-8-x64: -----> Cleaning up any prior instances of <default-centos-5-8-x64>
I, [2014-12-01T16:45:28.178077 #22073] INFO -- default-centos-5-8-x64: -----> Destroying <default-centos-5-8-x64>...
I, [2014-12-01T16:45:28.180411 #22073] INFO -- default-centos-5-8-x64: Finished destroying <default-centos-5-8-x64> (0m0.00s).
I, [2014-12-01T16:45:28.181303 #22073] INFO -- default-centos-5-8-x64: -----> Testing <default-centos-5-8-x64>
I, [2014-12-01T16:45:28.181746 #22073] INFO -- default-centos-5-8-x64: -----> Creating <default-centos-5-8-x64>...
I, [2014-12-01T16:45:29.599448 #22073] INFO -- default-centos-5-8-x64: Digital Ocean instance <3350351> created.
I, [2014-12-01T16:46:53.668517 #22073] INFO -- def
---
provisioner:
name: chef_zero
require_chef_omnibus: latest
platforms:
- name: centos-6-5-x64
driver:
name: digitalocean
Resolving cookbook dependencies...
Fetching 'openstack-block-storage' from git://github.com/stackforge/cookbook-openstack-block-storage.git (at master)
Fetching 'openstack-common' from git://github.com/stackforge/cookbook-openstack-common.git (at master)
Fetching 'openstack-compute' from git://github.com/stackforge/cookbook-openstack-compute.git (at master)
Fetching 'openstack-dashboard' from git://github.com/stackforge/cookbook-openstack-dashboard.git (at master)
Fetching 'openstack-identity' from git://github.com/stackforge/cookbook-openstack-identity.git (at master)
Fetching 'openstack-image' from git://github.com/stackforge/cookbook-openstack-image.git (at master)
Fetching 'openstack-network' from git://github.com/stackforge/cookbook-openstack-network.git (at master)
Fetching 'openstack-object-storage' from git://github.com/stackforge/cookbook-openstack-object-storage.git (at master)
Fetching 'openstack-ops-database' from git://github.com/stackforge/cookbook-openstack-ops-database.git (at master)