Skip to content

Instantly share code, notes, and snippets.

View petems's full-sized avatar
🏠
Working from home

Peter Souter petems

🏠
Working from home
View GitHub Profile
export OS_AUTH_URL=https://lon.identity.api.rackspacecloud.com/v2.0/
export OS_VERSION=2.0
export OS_AUTH_SYSTEM=rackspace_uk
export OS_REGION_NAME=LON
export OS_SERVICE_NAME=cloudserversOpenStack
export OS_TENANT_NAME=#
export OS_USERNAME=#
export OS_PASSWORD=#
export OS_NO_CACHE=1
export OS_AUTH_URL OS_VERSION OS_AUTH_SYSTEM OS_REGION_NAME OS_SERVICE_NAME OS_TENANT_NAME OS_USERNAME OS_PASSWORD OS_NO_CACHE
@petems
petems / gist:8981223
Last active August 29, 2015 13:56
Get Nova working...

Instructions from rackspace failed with the following errors:

$ nova
ERROR: six
$ nova
ERROR: 'module' object has no attribute 'add_arg'
@petems
petems / Rakefile
Last active August 29, 2015 13:56
Parallel Tests
require 'parallel_tests'
require 'parallel_tests/cli'
require 'rspec/core/rake_task'
desc "Run rspec"
task :spec do
matched_files = FileList['**/*_spec.rb'].exclude(/vendor/)
cli_args = ['-t', 'rspec']
@petems
petems / gist:9091786
Created February 19, 2014 13:18
Vagrant error
undefined method `gsub' for nil:NilClass
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/shell_quote.rb:9:in `escape'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/ssh_run.rb:37:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Users/inakiabt/.vagrant.d/gems/gems/vagrant-puppet-install-2.0.0/lib/vagrant-puppet-install/action/install_puppet.rb:40:in `call'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
/Users/inakiabt/.vagrant.d/gems/gems/vagrant-puppet-install-2.0.0/lib/vagrant-puppet-install/action/read_puppet_version.rb:40:in `call'
@petems
petems / gist:9276196
Created February 28, 2014 17:59
Rackspace Base Repo typo (Line 8)
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
## If the mirrorlist= does not work for you, as a fall back you can try the
remarked out baseurl= line instead.
#
@petems
petems / gist:9513104
Created March 12, 2014 18:22
Puppet test
it "should return install_options as nil by default" do
provider.expects(:execute).with(anything, anything, anything, anything, anything, nil).returns ""
provider.install
end
it "should accept install_options" do
resource[:install_options] = "--force"
provider.expects(:execute).with(anything, anything, anything, anything, anything, '--force').returns ""
provider.install
end
@petems
petems / gist:d3c0f7bca02d7241ac71
Created June 2, 2014 15:11
Error without Vagrant wrapper
/opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:240:in `block in replace_gem': vagrant-wrapper is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /opt/boxen/rbenv/versions/2.0.0-p451/bin/vagrant:22:in `<main>'
/opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/beaker-1.12.1/lib/beaker/hypervisor/vagrant.rb:151:in `block in vagrant_cmd': Failed to exec 'vagrant destroy --force' (RuntimeError)
@petems
petems / gist:f55a33119ffc99cf08ca
Created June 2, 2014 15:41
Beaker error from Mongo module
/opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/beaker-rspec-2.0.0/lib/beaker-rspec/beaker_shim.rb:35:in `validate': uninitialized constant Beaker::Utils (NameError)
from /opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/beaker-rspec-2.0.0/lib/beaker-rspec/spec_helper.rb:22:in `block in <top (required)>'
from /opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core.rb:79:in `configure'
from /opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/beaker-rspec-2.0.0/lib/beaker-rspec/spec_helper.rb:5:in `<top (required)>'
from /opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/beaker-rspec-2.0.0/lib/beaker-rspec.rb:5:in `require'
from /opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/beaker-rspec-2.0.0/lib/beaker-rspec.rb:5:in `<module:BeakerRSpec>'
from /opt/boxen/rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/beaker-rspec-2.0.0/lib/beaker-rspec.rb:1:in `<top (required)>'
from /Users/peterso/Projects/puppetlab
@petems
petems / Error
Created June 18, 2014 10:30
Weird Error
Failures:
1) ClassMixedWithDSLHelpers#apply_manifest_on can set the --noops flag
Failure/Error: subject.apply_manifest_on(
#<ClassMixedWithDSLHelpers:0x007fd370940390> received :on with unexpected arguments
expected: (no args)
got: (#<Unix::Host:0x007fd370976dc8 @logger=#<RSpec::Mocks::Mock:0x3fe9b84a8774 @name="logger">, @options={:project=>"Beaker", :department=>"peterso", :validate=>true, :jenkins_build_url=>nil, :forge_host=>"vulcan-acceptance.delivery.puppetlabs.net", :log_level=>"verbose", :trace_limit=>10, :hosts_file=>"sample.cfg", :options_file=>nil, :type=>:foss, :provision=>true, :preserve_hosts=>"never", :root_keys=>false, :quiet=>false, :xml=>false, :color=>true, :dry_run=>false, :timeout=>300, :fail_mode=>"slow", :timesync=>false, :repo_proxy=>false, :package_proxy=>false, :add_el_extras=>false, :add_master_entry=>false, :consoleport=>443, :pe_dir=>"/opt/enterprise/dists", :pe_version_file=>"LATEST", :pe_version_file_win=>"LATEST-win", :dot_fog=>"/Users/pete
@petems
petems / Vagrantfile
Created June 27, 2014 14:23
Tries to open with VMWare...
config.vm.define "oracledb" do |oracledb|
puts ENV['VAGRANT_DEFAULT_PROVIDER']
oracledb.vm.box = "oracledb_201406241602"
oracledb.vm.box_url = "https://fakewebsite.com/capdoracledb_201406241602.box"
oracledb.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", 1024, "--ioapic", "on"]
end
oracledb.vm.host_name = 'oracledb.test'
oracledb.vm.provision :shell, :path => "vagrant.sh"
oracledb.vm.network "private_network", ip: "172.16.10.12"