Skip to content

Commit

Permalink
Merge pull request #91 from MikaelSmith/fix-vagrant-acceptance
Browse files Browse the repository at this point in the history
(maint) Fix acceptance using Vagrant configs, allow flexible starting Puppet version
  • Loading branch information
highb committed Mar 14, 2016
2 parents 22f0d37 + e5b3886 commit cbd33ee
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 6 deletions.
14 changes: 11 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,20 @@ Beaker tests with:
bundle exec rake acceptance

This will use the host described in `spec/acceptance/nodeset/default.yml`
by default. To run against another host, set the `BEAKER_set` environment
variable to the name of a host described by a `.yml` file in the
`nodeset` directory. For example, to run against CentOS 6.4:
and start from Puppet 3.8.6 by default.

To run against another host, set the `BEAKER_set` environment variable to
the name of a host described by a `.yml` file in the `nodeset` directory.
For example, to run against CentOS 6.4:

BEAKER_set=centos-64-x64 bundle exec rake acceptance

To run starting from a different Puppet version, set the
`PUPPET_CLIENT_VERSION` environment variable to a full version string. For
example, to start with Puppet 3.7.1:

PUPPET_CLIENT_VERSION=3.7.1 bundle exec rake acceptance

If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will
at least need `BEAKER_provision` set to yes (the default). The Vagrantfile
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/nodesets/centos-5-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSTS:
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
vagrant_memsize: 3072

agent:
roles:
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/nodesets/centos-6-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSTS:
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
vagrant_memsize: 3072

agent:
roles:
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/nodesets/debian-6-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSTS:
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
vagrant_memsize: 3072

agent:
roles:
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/nodesets/debian-7-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSTS:
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
vagrant_memsize: 3072

agent:
roles:
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/nodesets/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSTS:
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
vagrant_memsize: 3072

agent:
roles:
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/nodesets/ubuntu-1204-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSTS:
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
vagrant_memsize: 3072

agent:
roles:
Expand Down
1 change: 1 addition & 0 deletions spec/acceptance/nodesets/ubuntu-1404-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSTS:
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
vagrant_memsize: 3072

agent:
roles:
Expand Down
6 changes: 3 additions & 3 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def install_modules_on(host)
master['puppetservice'] = 'puppetserver'
master['puppetserver-confdir'] = '/etc/puppetlabs/puppetserver/conf.d'
master['type'] = 'aio'
install_puppet_agent_on master, {:puppet_agent_version => '1.2.1'}
install_puppet_agent_on master, {}
install_package master, 'puppetserver'
master['use-service'] = true

Expand Down Expand Up @@ -91,7 +91,7 @@ def parser_opts

def server_opts
{
:master => {:autosign => true},
:master => {:autosign => true, :dns_alt_names => master},
}
end

Expand All @@ -100,7 +100,7 @@ def setup_puppet_on(host, opts = {})

puts "Setup foss puppet on #{host}"
configure_defaults_on host, 'foss'
install_puppet_on host
install_puppet_on host, :version => ENV['PUPPET_CLIENT_VERSION'] || '3.8.6'

configure_puppet_on(host, parser_opts)

Expand Down

0 comments on commit cbd33ee

Please sign in to comment.