OSX Vagrant notes to take along the way as I get beaker working with boxen
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.configure("2") do |c| | |
| c.vm.define 'win-2008R2-std' do |v| | |
| v.vm.hostname = 'win-2008R2-std' | |
| v.vm.box = 'opentable/win-2008r2-standard-amd64-nocm' | |
| v.vm.box_check_update = 'true' | |
| v.vm.network :private_network, ip: "10.255.174.15", :netmask => "255.255.0.0", :mac => "080027E855B5" | |
| v.vm.network :forwarded_port, guest: 3389, host: 3389 | |
| v.vm.network :forwarded_port, guest: 5985, host: 5985, id: 'winrm', auto_correct: true | |
| v.vm.guest = :windows | |
| v.vm.provider :virtualbox do |vb| |
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
| BEAKER_debug=true bundle exec rspec spec/acceptance/ini_setting_spec.rb | |
| /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/beaker-rspec-5.0.1/lib/beaker-rspec/helpers/serverspec.rb:43: warning: already initialized constant Module::VALID_OPTIONS_KEYS | |
| /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/specinfra-2.12.3/lib/specinfra/configuration.rb:4: warning: previous definition of VALID_OPTIONS_KEYS was here | |
| Hypervisor for freebsd-9-x64 is vagrant | |
| Beaker::Hypervisor, found some vagrant boxes to create | |
| ==> freebsd-9-x64: VM not created. Moving on... | |
| created Vagrantfile for VagrantHost freebsd-9-x64 | |
| Bringing machine 'freebsd-9-x64' up with 'virtualbox' provider... | |
| ==> freebsd-9-x64: Importing base box 'freebsd-9-x64-vbox'... | |
| ==> freebsd-9-x64: Matching MAC address for NAT networking... |
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 validate_cmd_rspec { | |
| file {'/etc/haproxy/haproxy.cfg': | |
| ensure => present, | |
| content => template('validate_cmd_rspec/etc/haproxy/haproxy.cfg.erb'), | |
| } | |
| if versioncmp($::puppetversion, '3.5') >= 0 { | |
| File[$sudoers_user_file] { validate_cmd => '/usr/sbin/haproxy -f % -c', } | |
| } | |
| else { |
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 'sudo::sudoers', :type => :define do | |
| let(:title) { 'world.domination' } | |
| if (Puppet.version >= '3.5.0') | |
| context "validating content with puppet #{Puppet.version}" do | |
| let(:params) { { :users => ['joe'] } } | |
| let(:facts) {{ :puppetversion => Puppet.version }} |
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
| peterso@name ~/Projects/puppet-uchiwa (master=) $ git co add_beaker_tests | |
| Branch add_beaker_tests set up to track remote branch add_beaker_tests from petems. | |
| Switched to a new branch 'add_beaker_tests' | |
| peterso@name ~/Projects/puppet-uchiwa (add_beaker_tests=) $ bundle exec rake beaker | |
| /opt/rubies/2.0.0-p451/bin/ruby -S rspec spec/acceptance --color | |
| Hypervisor for ubuntu-server-12042-x64 is vagrant | |
| Beaker::Hypervisor, found some vagrant boxes to create | |
| created Vagrantfile for VagrantHost ubuntu-server-12042-x64 | |
| Bundler is using a binstub that was created for a different gem. | |
| This is deprecated, in future versions you may need to `bundle binstub vagrant` to work around a system/bundle conflict. |
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
| RUN yum install -y wget ntpdate rubygems ruby-augeas ruby-devel augeas-devel | |
| RUN touch /etc/sysconfig/network | |
| EXPOSE 22 | |
| CMD ["/sbin/init"] | |
| /opt/rubies/2.0.0-p451/lib/ruby/gems/2.0.0/gems/docker-api-1.13.2/lib/docker/connection.rb:52:in `rescue in request': read timeout reached (Docker::Error::TimeoutError) | |
| from /opt/rubies/2.0.0-p451/lib/ruby/gems/2.0.0/gems/docker-api-1.13.2/lib/docker/connection.rb:36:in `request' | |
| from /opt/rubies/2.0.0-p451/lib/ruby/gems/2.0.0/gems/docker-api-1.13.2/lib/docker/connection.rb:57:in `block (2 levels) in <class:Connection>' | |
| from /opt/rubies/2.0.0-p451/lib/ruby/gems/2.0.0/gems/docker-api-1.13.2/lib/docker/image.rb:153:in `build' | |
| from /opt/rubies/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/beaker-3aafc71dc284/lib/beaker/hypervisor/docker.rb:26:in `block in provision' |
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
| Go here: | |
| https://github.com/garethr/puppet-module-skeleton | |
| Get the skeleton | |
| Then generate a new module | |
| puppet module yourname-nameofmodule |
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
| peterso@name ~/Projects/cloudtunes (master *=) $ docker build --tag=cloudtunes-img . | |
| Sending build context to Docker daemon 28.06 MB | |
| Sending build context to Docker daemon | |
| Step 0 : FROM dockerfile/ubuntu | |
| Pulling repository dockerfile/ubuntu | |
| c05eb8a58dd8: Download complete | |
| 511136ea3c5a: Download complete | |
| b3553b91f79f: Download complete | |
| ca63a3899a99: Download complete | |
| ff01d67c9471: Download complete |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' # required for Ruby 1.8.x | |
| require 'bundler/setup' | |
| require 'fog' | |
| @service = Fog::Compute.new( | |
| provider: 'rackspace', | |
| rackspace_username: Fog.credentials[:rackspace_username], | |
| rackspace_api_key: Fog.credentials[:rackspace_api_key], |