beaker-vagrant 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +14 -0
- data/docs/vagrant.md +39 -1
- data/lib/beaker-vagrant/version.rb +1 -1
- data/lib/beaker/hypervisor/vagrant_virtualbox.rb +4 -4
- data/spec/beaker/hypervisor/vagrant_virtualbox_spec.rb +25 -12
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4a6b7fd05dbad3dad572da7c2dcb0b6331d99759360ee6f13190dd663e4cb0c
|
4
|
+
data.tar.gz: 522a13a0e13bbbe36c0f789f9e1583f92cb09fddbe79c435c2b5d48c9b779c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41f1d7d61261464c2a1fafff23cc69c27cc8f7257ff6fd7f387cf4227e0e66fd3227c8ac56f0c7c7275c2dab409a9e1e635acd83f2a62b3554f97dbd0dc58741
|
7
|
+
data.tar.gz: bd51b818aea92e155e2c444d15d1db7e5423c09ad7ac667c4d92380438f5bcfc665cc2310e7ddd9abded88c45428ab512b609ed557ba0f638e1e49ba787fec37
|
data/.travis.yml
ADDED
data/docs/vagrant.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Vagrant
|
2
2
|
|
3
|
+
<!-- vim-markdown-toc GFM -->
|
4
|
+
|
5
|
+
* [Getting Started](#getting-started)
|
6
|
+
* [Requirements](#requirements)
|
7
|
+
* [Setup a Vagrant Hosts File](#setup-a-vagrant-hosts-file)
|
8
|
+
* [Vagrant-Specific Hosts File Settings](#vagrant-specific-hosts-file-settings)
|
9
|
+
* [Running With a GUI](#running-with-a-gui)
|
10
|
+
* [Mounting Local Folders](#mounting-local-folders)
|
11
|
+
* [Forwarding Ports to Guest](#forwarding-ports-to-guest)
|
12
|
+
* [Volumes Support](#volumes-support)
|
13
|
+
* [Adding vagrant shell provisioner](#adding-vagrant-shell-provisioner)
|
14
|
+
* [Using the host's resolver as a DNS proxy in NAT mode (virtualbox only)](#using-the-hosts-resolver-as-a-dns-proxy-in-nat-mode-virtualbox-only)
|
15
|
+
* [vagrant plugins](#vagrant-plugins)
|
16
|
+
|
17
|
+
<!-- vim-markdown-toc -->
|
18
|
+
|
3
19
|
Vagrant's slogan is "development environments made easy". Vagrant provides an
|
4
20
|
abstraction on top of a VM or cloud provider that allows you to manage
|
5
21
|
hosts and their provisioning. <https://www.vagrantup.com/>.
|
@@ -211,8 +227,30 @@ When using the Vagrant Hypervisor, beaker can create the Vagrantfile with a shel
|
|
211
227
|
|
212
228
|
In the above, beaker will create a Vagrantfile which runs the above shell script on the Agent guest.
|
213
229
|
|
230
|
+
### Using the host's resolver as a DNS proxy in NAT mode (virtualbox only)
|
231
|
+
|
232
|
+
When using the Vagrant hypervisor with the virtualbox provider, beaker can
|
233
|
+
configure the VirtualBox NAT engine's DHCP sever to proxy DNS queries through
|
234
|
+
to the host's resolver using the `natdns` setting in the nodeset file.
|
235
|
+
|
236
|
+
**Example hosts file**
|
237
|
+
|
238
|
+
HOSTS:
|
239
|
+
el7-server:
|
240
|
+
roles:
|
241
|
+
- default
|
242
|
+
platform: el-7-x86_64
|
243
|
+
box: centos/7
|
244
|
+
hypervisor: vagrant
|
245
|
+
natdns: on
|
246
|
+
yum_repos:
|
247
|
+
epel:
|
248
|
+
mirrorlist: 'https://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=$basearch&country=us'
|
249
|
+
gpgkeys:
|
250
|
+
- https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever
|
251
|
+
|
214
252
|
# vagrant plugins #
|
215
253
|
|
216
|
-
You can check more information for some
|
254
|
+
You can check more information for some supported vagrant plugins:
|
217
255
|
|
218
256
|
- [vagrant-libvirt](vagrant_libvirt.md)
|
@@ -63,15 +63,15 @@ class Beaker::VagrantVirtualbox < Beaker::Vagrant
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
provider_section << " vb.customize [
|
66
|
+
provider_section << " vb.customize ['modifyvm', :id, '--ioapic', 'on']\n" unless host['ioapic'].nil?
|
67
67
|
|
68
|
-
provider_section << " vb.customize [
|
68
|
+
provider_section << " vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']\n" unless host['natdns'].nil?
|
69
69
|
|
70
|
-
provider_section << " vb.customize [
|
70
|
+
provider_section << " vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']\n" unless host['natdns'].nil?
|
71
71
|
|
72
72
|
provider_section << " vb.gui = true\n" unless host['vb_gui'].nil?
|
73
73
|
|
74
|
-
provider_section << " [
|
74
|
+
provider_section << " vb.customize ['modifyvm', :id, '--cpuidset', '1','000206a7','02100800','1fbae3bf','bfebfbff']\n" if /osx/i.match(host['platform'])
|
75
75
|
|
76
76
|
if host['disk_path']
|
77
77
|
unless File.exist?(host['disk_path'])
|
@@ -3,6 +3,10 @@ require 'spec_helper'
|
|
3
3
|
describe Beaker::VagrantVirtualbox do
|
4
4
|
let( :options ) { make_opts.merge({ :hosts_file => 'sample.cfg', 'logger' => double().as_null_object }) }
|
5
5
|
let( :vagrant ) { Beaker::VagrantVirtualbox.new( @hosts, options ) }
|
6
|
+
let(:vagrantfile_path) do
|
7
|
+
path = vagrant.instance_variable_get( :@vagrant_path )
|
8
|
+
File.expand_path( File.join( path, 'Vagrantfile' ))
|
9
|
+
end
|
6
10
|
|
7
11
|
before :each do
|
8
12
|
@hosts = make_hosts()
|
@@ -41,14 +45,23 @@ describe Beaker::VagrantVirtualbox do
|
|
41
45
|
|
42
46
|
end
|
43
47
|
|
44
|
-
it "can enable ioapic(multiple cores) on hosts" do
|
48
|
+
it "can enable ioapic(multiple cores) on hosts" do
|
45
49
|
path = vagrant.instance_variable_get( :@vagrant_path )
|
46
50
|
hosts = make_hosts({:ioapic => 'true'},1)
|
47
51
|
|
48
52
|
vagrant.make_vfile( hosts )
|
49
53
|
|
50
54
|
vagrantfile = File.read( File.expand_path( File.join( path, 'Vagrantfile' )))
|
51
|
-
expect( vagrantfile ).to include(
|
55
|
+
expect( vagrantfile ).to include( " vb.customize ['modifyvm', :id, '--ioapic', 'on']")
|
56
|
+
end
|
57
|
+
|
58
|
+
it "can enable NAT DNS on hosts" do
|
59
|
+
hosts = make_hosts({:natdns => 'on'},1)
|
60
|
+
vagrant.make_vfile( hosts )
|
61
|
+
vagrantfile = File.read( vagrantfile_path )
|
62
|
+
|
63
|
+
expect( vagrantfile ).to include( " vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']")
|
64
|
+
expect( vagrantfile ).to include( " vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']")
|
52
65
|
end
|
53
66
|
|
54
67
|
it "correctly provisions storage with the USB controller" do
|
@@ -57,10 +70,10 @@ describe Beaker::VagrantVirtualbox do
|
|
57
70
|
|
58
71
|
vagrant.make_vfile( hosts )
|
59
72
|
vagrantfile = File.read( File.expand_path( File.join( path, 'Vagrantfile' )))
|
60
|
-
expect( vagrantfile ).to include(
|
61
|
-
expect( vagrantfile ).to include(
|
62
|
-
expect( vagrantfile ).to include(
|
63
|
-
expect( vagrantfile ).to include(
|
73
|
+
expect( vagrantfile ).to include(" vb.customize ['modifyvm', :id, '--usb', 'on']")
|
74
|
+
expect( vagrantfile ).to include(" vb.customize ['storagectl', :id, '--name', 'Beaker USB Controller', '--add', 'usb', '--portcount', '8', '--controller', 'USB', '--bootable', 'off']")
|
75
|
+
expect( vagrantfile ).to include(" vb.customize ['createhd', '--filename', 'vm1-test_disk.vdi', '--size', '5120']")
|
76
|
+
expect( vagrantfile ).to include(" vb.customize ['storageattach', :id, '--storagectl', 'Beaker USB Controller', '--port', '0', '--device', '0', '--type', 'hdd', '--medium', 'vm1-test_disk.vdi']")
|
64
77
|
end
|
65
78
|
|
66
79
|
it "correctly provisions storage with the LSILogic controller" do
|
@@ -69,9 +82,9 @@ describe Beaker::VagrantVirtualbox do
|
|
69
82
|
|
70
83
|
vagrant.make_vfile( hosts )
|
71
84
|
vagrantfile = File.read( File.expand_path( File.join( path, 'Vagrantfile' )))
|
72
|
-
expect( vagrantfile ).to include(
|
73
|
-
expect( vagrantfile ).to include(
|
74
|
-
expect( vagrantfile ).to include(
|
85
|
+
expect( vagrantfile ).to include(" vb.customize ['storagectl', :id, '--name', 'Beaker LSILogic Controller', '--add', 'scsi', '--portcount', '16', '--controller', 'LSILogic', '--bootable', 'off']")
|
86
|
+
expect( vagrantfile ).to include(" vb.customize ['createhd', '--filename', 'vm1-test_disk.vdi', '--size', '5120']")
|
87
|
+
expect( vagrantfile ).to include(" vb.customize ['storageattach', :id, '--storagectl', 'Beaker LSILogic Controller', '--port', '0', '--device', '0', '--type', 'hdd', '--medium', 'vm1-test_disk.vdi']")
|
75
88
|
end
|
76
89
|
|
77
90
|
it "correctly provisions storage with the default controller" do
|
@@ -80,8 +93,8 @@ describe Beaker::VagrantVirtualbox do
|
|
80
93
|
|
81
94
|
vagrant.make_vfile( hosts )
|
82
95
|
vagrantfile = File.read( File.expand_path( File.join( path, 'Vagrantfile' )))
|
83
|
-
expect( vagrantfile ).to include(
|
84
|
-
expect( vagrantfile ).to include(
|
85
|
-
expect( vagrantfile ).to include(
|
96
|
+
expect( vagrantfile ).to include(" vb.customize ['storagectl', :id, '--name', 'Beaker IntelAHCI Controller', '--add', 'sata', '--portcount', '2', '--controller', 'IntelAHCI', '--bootable', 'off']")
|
97
|
+
expect( vagrantfile ).to include(" vb.customize ['createhd', '--filename', 'vm1-test_disk.vdi', '--size', '5120']")
|
98
|
+
expect( vagrantfile ).to include(" vb.customize ['storageattach', :id, '--storagectl', 'Beaker IntelAHCI Controller', '--port', '0', '--device', '0', '--type', 'hdd', '--medium', 'vm1-test_disk.vdi']")
|
86
99
|
end
|
87
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rishi Javia, Kevin Imber, Tony Vu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- ".gitignore"
|
148
148
|
- ".rspec"
|
149
149
|
- ".simplecov"
|
150
|
+
- ".travis.yml"
|
150
151
|
- Gemfile
|
151
152
|
- LICENSE
|
152
153
|
- README.md
|