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 resources query --filter 'Package[mysql-server] and architecture=amd64' --resource-filter 'Package[mysql-server]' --render-as yaml --trace | |
--- | |
14fc9c1fbfa37e93afe9799fd927948b41280764: | |
title: mysql-server | |
type: Package | |
nodes: | |
- openstack-controller-20120802081343966964 | |
- openstack-controller-20120802081343948596 | |
- openstack-controller-20120802081343953097 | |
- openstack-controller-20120802081343967299 |
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
# These examples use functions that ship with the | |
# puppetlabs-nova module | |
$rabbit_connection_hash = collect_rabbit_connection('fqdn', 'architecture=amd64') | |
notice("rabbit host: ${rabbit_connection_hash[host]}") | |
notice("rabbit port: ${rabbit_connection_hash[port]}") | |
notice("rabbit user: ${rabbit_connection_hash[user]}") | |
notice("rabbit password: ${rabbit_connection_hash[password]}") |
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
foos-MacBook-Pro-5:stdlib danbode$ rspec spec/functions/ | |
...... | |
Finished in 0.41882 seconds | |
6 examples, 0 failures | |
foos-MacBook-Pro-5:stdlib danbode$ cd spec/ | |
foos-MacBook-Pro-5:spec danbode$ rspec functions/ | |
FFFFFF | |
Failures: |
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 webserver { | |
package { 'apache2': | |
ensure => present, | |
} | |
file { '/etc/apache2/apache2.conf': | |
content => template('apache2/apache2.erb'), | |
require => Package['apache2'], | |
} | |
service { 'apache2': | |
ensure => running |
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
user { ‘dan’: | |
ensure => present, | |
shell => ‘/bin/bash’, | |
} |
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::Type.type(:ini_setting)#.providers | |
Puppet::Type.type(:keystone_config).provide( | |
:ini_setting, | |
:parent => Puppet::Type::Ini_setting::ProviderRuby | |
) do |
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
notice: /Stage[main]/Nova::Api/Exec[nova-db-sync]/returns: No handlers could be found for logger "082_essex" | |
notice: /Stage[main]/Nova::Api/Exec[nova-db-sync]/returns: 2012-10-09 22:19:54 CRITICAL nova [-] (OperationalError) (1071, 'Specified key was too long; max key length is 767 bytes') '\nCREATE TABLE dns_domains (\n\tcreated_at DATETIME, \n\tupdated_at DATETIME, \n\tdeleted_at DATETIME, \n\tdeleted BOOL, \n\tdomain VARCHAR(512) NOT NULL, \n\tscope VARCHAR(255), \n\tavailability_zone VARCHAR(255), \n\tproject_id VARCHAR(255), \n\tPRIMARY KEY (domain), \n\tCHECK (deleted IN (0, 1)), \n\tFOREIGN KEY(project_id) REFERENCES projects (id)\n)ENGINE=InnoDB\n\n' () | |
notice: /Stage[main]/Nova::Api/Exec[nova-db-sync]/returns: Command failed, please check log for more info |
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
# manual steps | |
# apt-get update | |
# apt-get upgrade | |
# apt-get -y install linux-headers-3.2.0-23-generic | |
# apt-get -y install quantum-plugin-openvswitch-agent | |
# apt-get -y install openvswitch-datapath-dkms-source | |
# module-assistant auto-install openvswitch-datapath | |
# service openvswitch-switch restart |
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::Parser::AST::Resource failed with error ArgumentError: Cannot alias Package[quantum-backend-package] to ["python-mysqldb"] at /tmp/vagrant-puppet/modules-0/quantum/manifests/plugins/ovs.pp:47; resource ["Package", "python-mysqldb"] already declared at /tmp/vagrant-puppet/modules-0/mysql/manifests/python.pp:24 at /tmp/vagrant-puppet/modules-0/quantum/manifests/plugins/ovs.pp:47 on node openstack-controller-20121021101350805931 |
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 each_repo(&block) | |
require 'librarian/puppet' | |
require 'librarian/puppet/source/git' | |
# create a manifest | |
# TODO replace this to use librarian puppet | |
env = Librarian::Puppet::Environment.new() | |
# this is the lock file, so it assumes that install has been run | |
env.lock.manifests.each do |manifest| | |
# I only care about git sources | |
if manifest.source.is_a? Librarian::Puppet::Source::Git |