This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/puppet/bin/ruby | |
require 'puppet' | |
require 'puppet/face' | |
require 'yaml' | |
# assumes that this credential file has been laid down | |
# should contain credentials with cloudformation:DescribeStackResource | |
# access to the resource being classified | |
credential_file='/var/lib/cfn-init/data/cfn-credentials' | |
# figure out which facts terminus to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ntp( | |
$server = 'UNSET' | |
) { | |
include ntp::params | |
$server\_real = $server ? { | |
'UNSET' => $::ntp::params::server, | |
default => $server, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it { should contain_service('glance-api').with_ensure('running') } | |
it { should contain_service('glance-api').with_enable('true') } | |
it { should contain_service('glance-api').with_hasstatus('true') } | |
it { should contain_service('glance-api').with_hasrestart('true') } | |
it { should contain_service('glance-api').with_subscribe('File[/etc/glance/glance-api.conf]') } | |
it { should contain_service('glance-api').with_require('Class[glance]') } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'glance::api' do | |
it { should contain_class 'glance' } | |
it { should contain_service('glance-api', | |
'ensure' => 'running', | |
'hasstatus' => 'true', | |
'hasrestart' => 'true', | |
'subscribe' => 'File[/etc/glance/glance-api.conf]' | |
) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'glance::api' do | |
it { should contain_class 'glance' } | |
it { should contain_service('glance-api').with( | |
'ensure' => 'running', | |
'hasstatus' => 'true', | |
'hasrestart' => 'true', | |
'subscribe' => 'File[/etc/glance/glance-api.conf]' | |
) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# keystone-manage tenant add adminTraceback (most recent call last): | |
File "/usr/bin/keystone-manage", line 13, in <module> | |
import keystone.manage | |
File "/usr/lib/python2.7/dist-packages/keystone/manage/__init__.py", line 31, in <module> | |
from keystone.backends.sqlalchemy import migration | |
File "/usr/lib/python2.7/dist-packages/keystone/backends/sqlalchemy/__init__.py", line 30, in <module> | |
from migrate import exceptions as versioning_exceptions | |
ImportError: No module named migrate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant::Config.run do |config| | |
#vagrant config file for building out multi-node with Puppet :) | |
box = 'natty' | |
remote_url_base = ENV['REMOTE_VAGRANT_STORE'] | |
config.vm.box = "#{box}" | |
#config.ssh.forwarded_port_key = "ssh" | |
ssh_forward = 2222 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
puppet apply /vagrant/manifests/hosts.pp --modulepath /vagrant/modules --debug | |
puppet apply /vagrant/manifests/site.pp --modulepath /vagrant/modules --graph --certname $* --graphdir /vagrant/graphs --debug --trace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puppet.conf: | |
root@ip-10-252-23-9:~# vi /etc/puppetlabs/puppet/puppet.conf | |
[main] | |
... | |
storeconfigs = true | |
dbadapter = mysql | |
dbname = console_inventory_service | |
dbuser = console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def param_value(subject, type, title, param) | |
subject.resource(type, title).send(:parameters)[param.to_sym] | |
end | |
def verify_contents(subject, title, expected_lines) | |
content = subject.resource('file', title).send(:parameters)[:content] | |
(content.split("\n") & expected_lines).should == expected_lines | |
end |