beaker 3.20.0 → 3.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/beaker.gemspec +4 -5
- data/docs/how_to/hypervisors/README.md +7 -3
- data/docs/tutorials/quick_start_rake_tasks.md +1 -1
- data/lib/beaker/command.rb +1 -1
- data/lib/beaker/host.rb +6 -4
- data/lib/beaker/host/windows/exec.rb +10 -0
- data/lib/beaker/host/windows/pkg.rb +1 -29
- data/lib/beaker/host_prebuilt_steps.rb +1 -0
- data/lib/beaker/hypervisor.rb +26 -37
- data/lib/beaker/ssh_connection.rb +8 -15
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/dsl/install_utils/windows_utils_spec.rb +1 -1
- data/spec/beaker/host/windows/exec_spec.rb +18 -0
- data/spec/beaker/host/windows/pkg_spec.rb +0 -7
- data/spec/beaker/host_prebuilt_steps_spec.rb +1 -0
- data/spec/beaker/host_spec.rb +31 -40
- data/spec/beaker/hypervisor/hypervisor_spec.rb +20 -34
- data/spec/beaker/ssh_connection_spec.rb +18 -19
- data/spec/spec_helper.rb +0 -1
- metadata +23 -57
- data/docs/how_to/hypervisors/aws.md +0 -149
- data/docs/how_to/hypervisors/ec2.md +0 -81
- data/docs/how_to/hypervisors/google_compute_engine.md +0 -41
- data/docs/how_to/hypervisors/vagrant.md +0 -165
- data/docs/how_to/hypervisors/vagrant_hosts_file_examples.md +0 -60
- data/docs/how_to/hypervisors/vagrant_libvirt.md +0 -58
- data/docs/how_to/hypervisors/vmware_fusion.md +0 -36
- data/docs/how_to/hypervisors/vsphere.md +0 -54
- data/lib/beaker/hypervisor/aws_sdk.rb +0 -989
- data/lib/beaker/hypervisor/ec2_helper.rb +0 -41
- data/lib/beaker/hypervisor/fusion.rb +0 -65
- data/lib/beaker/hypervisor/google_compute.rb +0 -164
- data/lib/beaker/hypervisor/google_compute_helper.rb +0 -577
- data/lib/beaker/hypervisor/vagrant.rb +0 -286
- data/lib/beaker/hypervisor/vagrant_custom.rb +0 -11
- data/lib/beaker/hypervisor/vagrant_fusion.rb +0 -17
- data/lib/beaker/hypervisor/vagrant_libvirt.rb +0 -41
- data/lib/beaker/hypervisor/vagrant_parallels.rb +0 -18
- data/lib/beaker/hypervisor/vagrant_virtualbox.rb +0 -76
- data/lib/beaker/hypervisor/vagrant_workstation.rb +0 -13
- data/lib/beaker/hypervisor/vsphere.rb +0 -85
- data/lib/beaker/hypervisor/vsphere_helper.rb +0 -204
- data/spec/beaker/hypervisor/aws_sdk_spec.rb +0 -980
- data/spec/beaker/hypervisor/ec2_helper_spec.rb +0 -44
- data/spec/beaker/hypervisor/fusion_spec.rb +0 -41
- data/spec/beaker/hypervisor/vagrant_custom_spec.rb +0 -46
- data/spec/beaker/hypervisor/vagrant_fusion_spec.rb +0 -32
- data/spec/beaker/hypervisor/vagrant_libvirt_spec.rb +0 -61
- data/spec/beaker/hypervisor/vagrant_parallels_spec.rb +0 -44
- data/spec/beaker/hypervisor/vagrant_spec.rb +0 -479
- data/spec/beaker/hypervisor/vagrant_virtualbox_spec.rb +0 -44
- data/spec/beaker/hypervisor/vagrant_workstation_spec.rb +0 -32
- data/spec/beaker/hypervisor/vsphere_helper_spec.rb +0 -163
- data/spec/beaker/hypervisor/vsphere_spec.rb +0 -90
@@ -1,81 +0,0 @@
|
|
1
|
-
Pre-requisite: .fog file correctly configured with your credentials.
|
2
|
-
|
3
|
-
hypervisor: ec2
|
4
|
-
|
5
|
-
### example .fog file ###
|
6
|
-
:default:
|
7
|
-
:aws_access_key_id: IMTHEKEYID
|
8
|
-
:aws_secret_access_key: IMALONGACCESSKYE
|
9
|
-
|
10
|
-
### Basic ec2 hosts file ###
|
11
|
-
HOSTS:
|
12
|
-
centos-5-64-1:
|
13
|
-
roles:
|
14
|
-
- master
|
15
|
-
- dashboard
|
16
|
-
- database
|
17
|
-
- agent
|
18
|
-
vmname: centos-5-x86-64-west
|
19
|
-
platform: el-5-x86_64
|
20
|
-
hypervisor: ec2
|
21
|
-
amisize: c1.medium
|
22
|
-
snapshot: pe
|
23
|
-
user: ec2-user
|
24
|
-
centos-5-64-1:
|
25
|
-
roles:
|
26
|
-
- agent
|
27
|
-
vmname: centos-5-x86-64-west
|
28
|
-
platform: el-5-x86_64
|
29
|
-
hypervisor: ec2
|
30
|
-
amisize: c1.medium
|
31
|
-
snapshot: pe
|
32
|
-
user: ec2-user
|
33
|
-
CONFIG:
|
34
|
-
nfs_server: none
|
35
|
-
consoleport: 443
|
36
|
-
|
37
|
-
Currently, there is limited support EC2 nodes; we are adding support for new platforms shortly.
|
38
|
-
|
39
|
-
AMIs are built for PE based installs on:
|
40
|
-
- Enterprise Linux 6, 64 and 32 bit
|
41
|
-
- Enterprise Linux 5, 32 bit
|
42
|
-
- Ubuntu 10.04, 32 bit
|
43
|
-
|
44
|
-
Beaker will automagically provision EC2 nodes, provided the 'platform:' section of your config file lists a supported platform type: ubuntu-10.04-i386, el-6-x86_64, el-6-i386, el-5-i386.
|
45
|
-
|
46
|
-
### Supported EC2 Variables ###
|
47
|
-
These variables can either be set per-host or globally.
|
48
|
-
####`additional_ports`####
|
49
|
-
Ports to be opened on the instance, in addition to those opened by Beaker to support Puppet functionality. Can be a single value or an array. Example valid values: 1001, [1001], [1001, 1002].
|
50
|
-
|
51
|
-
Ports opened by default:
|
52
|
-
* all hosts have [22, 61613, 8139] opened
|
53
|
-
* `master` will also have 8140 opened
|
54
|
-
* `dashboard` will also have [443, 4433, 4435] opened
|
55
|
-
* `database` will also have [5432, 8080, 8081] opened
|
56
|
-
|
57
|
-
####`amisize` ####
|
58
|
-
The [instance type](https://aws.amazon.com/ec2/instance-types/) - defaults to `m1.small`.
|
59
|
-
####`snapshot`####
|
60
|
-
The snapshot to use for ec2 instance creation.
|
61
|
-
####`subnet_id`####
|
62
|
-
If defined the instance will be created in this EC2 subnet. `vpc_id` must be defined. Cannot be defined at the same time as `subnet_ids`.
|
63
|
-
####`subnet_ids`####
|
64
|
-
If defined the instace will be crated in one of the provided array of EC2 subnets. `vpc_id` must be defined. Cannot be defined at the same time as `subnet_id`.
|
65
|
-
####`vmname`####
|
66
|
-
Used to look up the pre-defined AMI information in `config/image_templates/ec2.yaml`. Will default to `platform` if not defined.
|
67
|
-
#####Example ec2.yaml#####
|
68
|
-
In this example the `vmname` would be `puppetlabs-centos-5-x86-64-west`. Looking up the `vmname` in the `ec2.yaml` file provides an AMI ID by type (`pe` or `foss`) and the region.
|
69
|
-
```
|
70
|
-
AMI:
|
71
|
-
puppetlabs-centos-5-x86-64-west:
|
72
|
-
:image:
|
73
|
-
:pe: ami-pl-12345
|
74
|
-
:region: us-west-2
|
75
|
-
```
|
76
|
-
####`volume_size`####
|
77
|
-
Size of the [EBS Volume](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) that will be attached to the EC2 instance.
|
78
|
-
####`vpc_id`####
|
79
|
-
ID of the [VPC](https://aws.amazon.com/vpc/) to create the instances in. If not provided will either use the default VPC for the provided region (marked as `isDefault`), otherwise falls back to `nil`. If subnet information is provided (`subnet_id`/`subnet_ids`) this must be defined.
|
80
|
-
####`user`####
|
81
|
-
By default root login is not allowed with Amazon Linux. Setting it to ec2-user will trigger `sshd_config` and `authorized_keys` changes by beaker.
|
@@ -1,41 +0,0 @@
|
|
1
|
-
This option provisions instances from pre-existing Google Compute Engine images. Currently only supports debian-7 and centos-6 platforms (<a href = "https://developers.google.com/compute/docs/images#availableimages">Google Compute Engine available images</a>)
|
2
|
-
|
3
|
-
Pre-requisites:
|
4
|
-
|
5
|
-
* A Google Compute Engine project.
|
6
|
-
* An active service account to your Google Compute Engine project (<a href = "https://developers.google.com/drive/service-accounts">Service Accounts Documentation</a>), along with the following information:
|
7
|
-
* The service account private key file (named xxx-privatekey.p12).
|
8
|
-
* The service account email address (named xxx@developer.gserviceaccount.com).
|
9
|
-
* The service account password.
|
10
|
-
* A passwordless ssh keypair (<a href = "http://www.linuxproblem.org/art_9.html">SSH login without password</a>, <a href = "https://developers.google.com/compute/docs/console#sshkeys">Setting up Google Compute sshKeys metadata</a>).
|
11
|
-
* Name the pair `google-compute`
|
12
|
-
* Place the public key in your Google Compute Engine project metadata
|
13
|
-
* `key`: `sshKeys`
|
14
|
-
* `value` is the contents of your google_compute.pub with "google_compute:" prepended, eg:
|
15
|
-
<pre>
|
16
|
-
google_compute:ssh-rsaAAAABCCCCCCCCCCDDDDDeeeeeeeeFFFFFFFGGGGGGGGGGGGGGGGHHHHHHHHiiiiiiiiiiiJJJJJJJJKKKKKKKKKlllllllllllllllllllMNOppppppppppppppppppQRSTUV123456789101010101101010101011010101010110/ABCDEFGHIJKLMNOP+AB user@machine.local </pre>
|
17
|
-
|
18
|
-
### example GCE hosts file###
|
19
|
-
|
20
|
-
HOSTS:
|
21
|
-
debian-7-master:
|
22
|
-
roles:
|
23
|
-
- master
|
24
|
-
- agent
|
25
|
-
- database
|
26
|
-
platform: debian-7-wheezy-xxx
|
27
|
-
hypervisor: google
|
28
|
-
centos-6-agent:
|
29
|
-
roles:
|
30
|
-
- agent
|
31
|
-
platform: centos-6-xxx
|
32
|
-
hypervisor: google
|
33
|
-
CONFIG:
|
34
|
-
nfs_server: none
|
35
|
-
consoleport: 443
|
36
|
-
gce_project: google-compute-project-name
|
37
|
-
gce_keyfile: /path/to/*****-privatekey.p12
|
38
|
-
gce_password: notasecret
|
39
|
-
gce_email: *********@developer.gserviceaccount.com
|
40
|
-
|
41
|
-
Google Compute cloud instances and disks are deleted after test runs, but it is up to the owner of the Google Compute Engine project to ensure that any zombie instances/disks are properly removed should Beaker fail during cleanup.
|
@@ -1,165 +0,0 @@
|
|
1
|
-
# Vagrant
|
2
|
-
|
3
|
-
Vagrant's slogan is "development environments made easy". They provide an
|
4
|
-
abstraction on top of a VM or cloud provider that allows you to manage
|
5
|
-
hosts and their provisioning. [Their Site](https://www.vagrantup.com/).
|
6
|
-
|
7
|
-
# Getting Started
|
8
|
-
|
9
|
-
### Requirements
|
10
|
-
|
11
|
-
A prerequisite for using the vagrant hypervisor with beaker is that the
|
12
|
-
**Vagrant 1.7+** package needs to installed -
|
13
|
-
see [downloads.vagrantup.com](http://downloads.vagrantup.com/) for downloads.
|
14
|
-
|
15
|
-
Currently, we provide a suite of pre-built, publicly available vagrant boxes for
|
16
|
-
use in constructing tests: [Puppet Labs Vagrant Boxes](https://vagrantcloud.com/puppetlabs/).
|
17
|
-
You can use these boxes easily by pulling one of our
|
18
|
-
[Example Vagrant Hosts Files](vagrant_hosts_file_examples.md).
|
19
|
-
|
20
|
-
### Setup a Vagrant Hosts File
|
21
|
-
|
22
|
-
A vm is identified by `box` or `box_url` in the config file. No snapshot name
|
23
|
-
is required as the vm is reverted back to original state post testing using
|
24
|
-
`vagrant destroy --force`.
|
25
|
-
|
26
|
-
**Example Vagrant hosts file**
|
27
|
-
|
28
|
-
HOSTS:
|
29
|
-
ubuntu-1404-x64:
|
30
|
-
roles:
|
31
|
-
- master
|
32
|
-
- agent
|
33
|
-
- dashboard
|
34
|
-
- cloudpro
|
35
|
-
platform: ubuntu-1404-x86_64
|
36
|
-
hypervisor: vagrant
|
37
|
-
box: puppetlabs/ubuntu-14.04-64-nocm
|
38
|
-
box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
|
39
|
-
CONFIG:
|
40
|
-
nfs_server: none
|
41
|
-
consoleport: 443
|
42
|
-
|
43
|
-
VagrantFiles are created per host configuration file. They can be found in the
|
44
|
-
`.vagrant/beaker_vagrant_files` directory of the current working directory in a
|
45
|
-
subdirectory named after the host configuration file.
|
46
|
-
|
47
|
-
> beaker --hosts sample.cfg
|
48
|
-
> cd .vagrant/beaker_vagrant_files; ls
|
49
|
-
sample.cfg
|
50
|
-
> cd sample.c
|
51
|
-
|
52
|
-
Below are details of vagrants features as they're supported through beaker. If
|
53
|
-
you'd like to see more examples of vagrant hosts files, checkout our
|
54
|
-
[vagrant hosts file examples doc](vagrant_hosts_file_examples.md).
|
55
|
-
|
56
|
-
# Vagrant-Specific Hosts File Settings
|
57
|
-
|
58
|
-
### Running With a GUI
|
59
|
-
|
60
|
-
It is possible to have the VirtualBox VM run with a GUI (i.e. non-headless mode)
|
61
|
-
by specifying ``vb_gui`` of any non-nil value in the config file, i.e.:
|
62
|
-
|
63
|
-
**Example Vagrant hosts file with vb_gui**
|
64
|
-
|
65
|
-
HOSTS:
|
66
|
-
ubuntu-1404-x64:
|
67
|
-
roles:
|
68
|
-
- master
|
69
|
-
- agent
|
70
|
-
- dashboard
|
71
|
-
- cloudpro
|
72
|
-
platform: ubuntu-1404-x86_64
|
73
|
-
hypervisor: vagrant
|
74
|
-
box: puppetlabs/ubuntu-14.04-64-nocm
|
75
|
-
box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
|
76
|
-
vb_gui: true
|
77
|
-
CONFIG:
|
78
|
-
nfs_server: none
|
79
|
-
consoleport: 443
|
80
|
-
|
81
|
-
### Mounting Local Folders
|
82
|
-
|
83
|
-
When using the Vagrant Hypervisor, beaker can mount specific local directories
|
84
|
-
as synced_folders inside the vagrant box. This is done by using the
|
85
|
-
`mount_folders` option in the nodeset file.
|
86
|
-
|
87
|
-
**Example hosts file**
|
88
|
-
|
89
|
-
HOSTS:
|
90
|
-
ubuntu-1404-x64-master:
|
91
|
-
roles:
|
92
|
-
- master
|
93
|
-
- agent
|
94
|
-
- dashboard
|
95
|
-
- database
|
96
|
-
platform: ubuntu-1404-x86_64
|
97
|
-
hypervisor: vagrant
|
98
|
-
box: puppetlabs/ubuntu-14.04-64-nocm
|
99
|
-
box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
|
100
|
-
mount_folders:
|
101
|
-
folder1:
|
102
|
-
from: ./
|
103
|
-
to: /vagrant/folder1
|
104
|
-
tmp:
|
105
|
-
from: /tmp
|
106
|
-
to: /vagrant/tmp
|
107
|
-
ip: 192.168.20.20
|
108
|
-
ubuntu-1404-x64-agent:
|
109
|
-
roles:
|
110
|
-
- agent
|
111
|
-
platform: ubuntu-1404-x86_64
|
112
|
-
hypervisor: vagrant
|
113
|
-
box: puppetlabs/ubuntu-14.04-64-nocm
|
114
|
-
box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
|
115
|
-
ip: 192.168.21.21
|
116
|
-
CONFIG:
|
117
|
-
nfs_server: none
|
118
|
-
consoleport: 443
|
119
|
-
|
120
|
-
In the above beaker will mount the folders `./` to `/vagrant/folder1` and the
|
121
|
-
folder `/tmp` to `/vagrant/tmp`.
|
122
|
-
|
123
|
-
### Forwarding Ports to Guest
|
124
|
-
|
125
|
-
When using the Vagrant Hypervisor, beaker can create the Vagrantfile to forward specified ports to a specific box. This is done by using the `forwarded_ports` option in the nodeset file.
|
126
|
-
|
127
|
-
**Example hosts file**
|
128
|
-
|
129
|
-
HOSTS:
|
130
|
-
ubuntu-1404-x64-master:
|
131
|
-
roles:
|
132
|
-
- master
|
133
|
-
- agent
|
134
|
-
- dashboard
|
135
|
-
- database
|
136
|
-
platform: ubuntu-1404-x86_64
|
137
|
-
hypervisor: vagrant
|
138
|
-
box: puppetlabs/ubuntu-14.04-64-nocm
|
139
|
-
box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
|
140
|
-
ip: 192.168.20.20
|
141
|
-
ubuntu-1404-x64-agent:
|
142
|
-
roles:
|
143
|
-
- agent
|
144
|
-
platform: ubuntu-1404-x86_64
|
145
|
-
hypervisor: vagrant
|
146
|
-
box: puppetlabs/ubuntu-14.04-64-nocm
|
147
|
-
box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
|
148
|
-
ip: 192.168.21.21
|
149
|
-
forwarded_ports:
|
150
|
-
apache:
|
151
|
-
from: 10080
|
152
|
-
to: 80
|
153
|
-
tomcat:
|
154
|
-
from: 8080
|
155
|
-
to: 8080
|
156
|
-
from_ip: '127.0.0.1'
|
157
|
-
to_ip: '0.0.0.0'
|
158
|
-
|
159
|
-
In the above, beaker will forward port 10080 and 8080 on the Host to port 80 and 8080 (respectively) on the Agent guest.
|
160
|
-
|
161
|
-
# vagrant plugins #
|
162
|
-
|
163
|
-
You can check more information for some suported vagrant plugins:
|
164
|
-
|
165
|
-
- [vagrant-libvirt](vagrant_libvirt.md)
|
@@ -1,60 +0,0 @@
|
|
1
|
-
#centos-511-x64.yml
|
2
|
-
```
|
3
|
-
HOSTS:
|
4
|
-
centos-511-x64:
|
5
|
-
roles:
|
6
|
-
- master
|
7
|
-
platform: el-5-x86_64
|
8
|
-
box: puppetlabs/centos-5.11-64-nocm
|
9
|
-
hypervisor: vagrant
|
10
|
-
```
|
11
|
-
#centos-65-x64.yml
|
12
|
-
```
|
13
|
-
HOSTS:
|
14
|
-
centos-65-x64:
|
15
|
-
roles:
|
16
|
-
- master
|
17
|
-
platform: el-6-x86_64
|
18
|
-
box: puppetlabs/centos-6.5-64-nocm
|
19
|
-
hypervisor: vagrant
|
20
|
-
```
|
21
|
-
#debian-609-x64.yml
|
22
|
-
```
|
23
|
-
HOSTS:
|
24
|
-
debian-609-x64:
|
25
|
-
roles:
|
26
|
-
- master
|
27
|
-
platform: debian-6-amd64
|
28
|
-
box: puppetlabs/debian-6.0.9-64-nocm
|
29
|
-
hypervisor: vagrant
|
30
|
-
```
|
31
|
-
#debian-78-x64.yml
|
32
|
-
```
|
33
|
-
HOSTS:
|
34
|
-
debian-78-x64:
|
35
|
-
roles:
|
36
|
-
- master
|
37
|
-
platform: debian-7-amd64
|
38
|
-
box: puppetlabs/debian-7.8-64-nocm
|
39
|
-
hypervisor: vagrant
|
40
|
-
```
|
41
|
-
#ubuntu-server-1204-x64.yml
|
42
|
-
```
|
43
|
-
HOSTS:
|
44
|
-
ubuntu-server-1204-x64:
|
45
|
-
roles:
|
46
|
-
- master
|
47
|
-
platform: ubuntu-1204-amd64
|
48
|
-
box: puppetlabs/ubuntu-12.04-64-nocm
|
49
|
-
hypervisor: vagrant
|
50
|
-
```
|
51
|
-
#ubuntu-server-1404-x64.yml
|
52
|
-
```
|
53
|
-
HOSTS:
|
54
|
-
ubuntu-server-1404-x64:
|
55
|
-
roles:
|
56
|
-
- master
|
57
|
-
platform: ubuntu-14.04-amd64
|
58
|
-
box: puppetlabs/ubuntu-14.04-64-nocm
|
59
|
-
hypervisor: vagrant
|
60
|
-
```
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# Vagrant Libvirt #
|
2
|
-
|
3
|
-
This driver enabled a tester to trigger tests using libvirtd daemon.
|
4
|
-
It is based
|
5
|
-
on [libvirt](https://github.com/vagrant-libvirt/vagrant-libvirt)'s
|
6
|
-
plugin for vagrant.
|
7
|
-
|
8
|
-
## Basic Options ##
|
9
|
-
|
10
|
-
Once you've setup the libvirt daemon on your beaker coordinator, you
|
11
|
-
can use the vagrant_libvirt hypervisor by providing beaker with a
|
12
|
-
configuration similar to this:
|
13
|
-
|
14
|
-
```yaml
|
15
|
-
HOSTS
|
16
|
-
centos-puppet-keystone:
|
17
|
-
hostname: puppet-keystone.example.net
|
18
|
-
roles:
|
19
|
-
- master
|
20
|
-
platform: el-7-x86_64
|
21
|
-
box: centos/7
|
22
|
-
box_url: http://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7.LibVirt.box
|
23
|
-
hypervisor: vagrant_libvirt
|
24
|
-
vagrant_memsize: 4096
|
25
|
-
vagrant_cpus: 2
|
26
|
-
```
|
27
|
-
|
28
|
-
Those are the usual beaker parameters. Note the `hypervisor`
|
29
|
-
parameter. Multiple VMs is supported.
|
30
|
-
|
31
|
-
|
32
|
-
## Advanced Options and remote libvirt daemon ##
|
33
|
-
|
34
|
-
This driver gives the tester access to all available parameters from
|
35
|
-
the vagrant-libvirt plugin. Beware there could be dragons here as
|
36
|
-
beaker has some expectations about the created VMs.
|
37
|
-
|
38
|
-
To pass them down the operator adds them in the config section, here
|
39
|
-
is a example.
|
40
|
-
|
41
|
-
```yaml
|
42
|
-
CONFIG:
|
43
|
-
libvirt:
|
44
|
-
uri: qemu+ssh://root@libvirt.system.com/system
|
45
|
-
```
|
46
|
-
|
47
|
-
The `uri` parameter is one of the most useful. The user can have its
|
48
|
-
test done on a remote libvirt daemon. The network setup between the
|
49
|
-
VMs and the host running beaker will have to be done manually though.
|
50
|
-
`management_network_name` and `management_network_address` parameters
|
51
|
-
can be useful here.
|
52
|
-
|
53
|
-
Another good cadidate is `volume_cache: unsafe`.
|
54
|
-
|
55
|
-
A complete list of options is available in
|
56
|
-
the
|
57
|
-
[vagrant plugin](https://github.com/vagrant-libvirt/vagrant-libvirt)
|
58
|
-
repository.
|
@@ -1,36 +0,0 @@
|
|
1
|
-
Pre-requisite: Fission gem installed and configured, including a `~/.fissionrc`
|
2
|
-
that points to the `vmrun` executable and where virtual machines can be found.
|
3
|
-
Example `.fissionrc` file (it's YAML):
|
4
|
-
|
5
|
-
vm_dir: "/Directory/containing/my/.vmwarevm/files/"
|
6
|
-
vmrun_bin: "/Applications/VMware Fusion.app/Contents/Library/vmrun"
|
7
|
-
|
8
|
-
You can then use the following arguments in the node configuration:
|
9
|
-
- `hypervisor: fusion` tells us to enable this feature for this host. This is required.
|
10
|
-
- `snapshot: <name>`, where <name> is the snapshot name to revert to. This is required.
|
11
|
-
|
12
|
-
We'll try and match up the hostname with a VM of the same name. Note that the VM is expected to be pre-configured for running acceptance tests; it should have all the right prerequisite libraries, password-less SSH access for root, etc.
|
13
|
-
|
14
|
-
There are a few additional options available in your configuration file. Each host
|
15
|
-
section can now use:
|
16
|
-
|
17
|
-
- `vmname`: This is useful if the hostname of the VM doesn't match the name of
|
18
|
-
the `.vmwarevm` file on disk. The alias should be something fission can load.
|
19
|
-
|
20
|
-
|
21
|
-
### Basic VMWare fusion hosts file ###
|
22
|
-
|
23
|
-
HOSTS:
|
24
|
-
pe-debian6:
|
25
|
-
roles:
|
26
|
-
- master
|
27
|
-
- agent
|
28
|
-
platform: debian-6-i386
|
29
|
-
vmname: super-awesome-vm-name
|
30
|
-
hypervisor: fusion
|
31
|
-
snapshot: acceptance-testing-5
|
32
|
-
|
33
|
-
### Diagnostics ###
|
34
|
-
|
35
|
-
When using `hypervisor fusion`, we'll log all the available VM names and for each
|
36
|
-
host we'll log all the available snapshot names.
|
@@ -1,54 +0,0 @@
|
|
1
|
-
This doc describes beaker's vSphere hypervisor. This is the interaction layer
|
2
|
-
that beaker will use to get Systems Under Test (SUTs) from any vSphere
|
3
|
-
infrastructure that you might have.
|
4
|
-
|
5
|
-
**Note** that if you're a puppet-internal user, or an external user that is
|
6
|
-
using the vmpooler hypervisor, please refer to our [vmpooler doc](https://github.com/puppetlabs/beaker-vmpooler)
|
7
|
-
for info, as it can be different than the information here.
|
8
|
-
|
9
|
-
The harness can use vms and snapshots that live within vSphere as well.
|
10
|
-
To do this create a `~/.fog` file with your vSphere credentials:
|
11
|
-
|
12
|
-
### example .fog file ###
|
13
|
-
|
14
|
-
:default:
|
15
|
-
:vsphere_server: 'vsphere.example.com'
|
16
|
-
:vsphere_username: 'joe'
|
17
|
-
:vsphere_password: 'MyP@$$w0rd'
|
18
|
-
|
19
|
-
These follow the conventions used by Cloud Provisioner and Fog.
|
20
|
-
|
21
|
-
>Note: Your fog credential file location may be specified in the 'CONFIG' section using the 'dot_fog' setting
|
22
|
-
|
23
|
-
There are two possible `hypervisor` hypervisor-types to use for vSphere testing, `vsphere` and `vcloud`.
|
24
|
-
|
25
|
-
### `hypervisor: vsphere`
|
26
|
-
This option locates an existing static VM, optionally reverts it to a pre-existing snapshot, and runs tests on it.
|
27
|
-
|
28
|
-
### `hypervisor: vcloud`
|
29
|
-
This option clones a new VM from a pre-existing template, runs tests on the newly-provisioned clone, then deletes the clone once testing completes.
|
30
|
-
|
31
|
-
The `vcloud` option requires a slightly-modified test configuration file, specifying both the target template as well as three additional parameters in the 'CONFIG' section ('datastore', 'datacenter', and 'folder'). Optionally, a resourcepool may be specified via the 'resourcepool' setting in the 'CONFIG' section. Template can be expressed in the 'HOSTS' section, or you can set the template to be used via the `BEAKER_vcloud_template` environment variable.
|
32
|
-
|
33
|
-
#### example vcloud hosts file ###
|
34
|
-
HOSTS:
|
35
|
-
master-vm:
|
36
|
-
roles:
|
37
|
-
- master
|
38
|
-
- agent
|
39
|
-
- dashboard
|
40
|
-
platform: ubuntu-10.04-amd64
|
41
|
-
template: ubuntu-1004-x86_64
|
42
|
-
hypervisor: vcloud
|
43
|
-
agent-vm:
|
44
|
-
roles:
|
45
|
-
- agent
|
46
|
-
platform: ubuntu-10.04-i386
|
47
|
-
template: ubuntu-1004-i386
|
48
|
-
hypervisor: vcloud
|
49
|
-
CONFIG:
|
50
|
-
consoleport: 443
|
51
|
-
datacenter: testdc
|
52
|
-
datastore: instance0
|
53
|
-
resourcepool: Delivery/Quality Assurance/FOSS/Dynamic
|
54
|
-
folder: delivery/Quality Assurance/FOSS/Dynamic
|