beaker-openstack 2.1.0 → 3.0.0
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/.github/workflows/release.yml +5 -5
- data/CHANGELOG.md +13 -1
- data/Gemfile +1 -1
- data/README.md +202 -45
- data/beaker-openstack.gemspec +23 -19
- data/lib/beaker/hypervisor/openstack.rb +363 -369
- data/lib/beaker-openstack/version.rb +1 -1
- data/openstack.md +98 -68
- data/spec/beaker/hypervisor/openstack_spec.rb +246 -177
- metadata +54 -77
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 463f56401c60a764c430d4060402b55246487e6c54e9e02b64accb6f29f45f2d
|
|
4
|
+
data.tar.gz: 98dcaa06a97b49f62ddca1ccfd8fbb394ac186292bb1cdac5818a0f6112f8b2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 587b4cfda5e1725de8d70958efa9e24b1f61a63b3f28d04f1dd826f00b27ac3a5a930318967ecc205d0ed629351a2e3bafc3c563149d2a9e519a02ff7a3a98ac
|
|
7
|
+
data.tar.gz: 46c9e5b7acf1c06b17a61e293b454bdca1daa61d668e251f666c486474969b6e064b5981ba9633e77fb734ded8ff3a8190cd5d36f7e9acd10f5e9d9a8ed28c92
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
shell: bash
|
|
25
25
|
run: gem build --verbose *.gemspec
|
|
26
26
|
- name: Upload gem to GitHub cache
|
|
27
|
-
uses: actions/upload-artifact@
|
|
27
|
+
uses: actions/upload-artifact@v7
|
|
28
28
|
with:
|
|
29
29
|
name: gem-artifact
|
|
30
30
|
path: '*.gem'
|
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
contents: write # clone repo and create release
|
|
40
40
|
steps:
|
|
41
41
|
- name: Download gem from GitHub cache
|
|
42
|
-
uses: actions/download-artifact@
|
|
42
|
+
uses: actions/download-artifact@v8
|
|
43
43
|
with:
|
|
44
44
|
name: gem-artifact
|
|
45
45
|
- name: Create Release
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
packages: write # publish to rubygems.pkg.github.com
|
|
57
57
|
steps:
|
|
58
58
|
- name: Download gem from GitHub cache
|
|
59
|
-
uses: actions/download-artifact@
|
|
59
|
+
uses: actions/download-artifact@v8
|
|
60
60
|
with:
|
|
61
61
|
name: gem-artifact
|
|
62
62
|
- name: Publish gem to GitHub packages
|
|
@@ -73,7 +73,7 @@ jobs:
|
|
|
73
73
|
id-token: write # rubygems.org authentication
|
|
74
74
|
steps:
|
|
75
75
|
- name: Download gem from GitHub cache
|
|
76
|
-
uses: actions/download-artifact@
|
|
76
|
+
uses: actions/download-artifact@v8
|
|
77
77
|
with:
|
|
78
78
|
name: gem-artifact
|
|
79
79
|
- uses: rubygems/configure-rubygems-credentials@v1.0.0
|
|
@@ -92,7 +92,7 @@ jobs:
|
|
|
92
92
|
- release-to-rubygems
|
|
93
93
|
steps:
|
|
94
94
|
- name: Download gem from GitHub cache
|
|
95
|
-
uses: actions/download-artifact@
|
|
95
|
+
uses: actions/download-artifact@v8
|
|
96
96
|
with:
|
|
97
97
|
name: gem-artifact
|
|
98
98
|
- name: Install Ruby
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [3.0.0](https://github.com/voxpupuli/beaker-openstack/tree/3.0.0) (2026-04-02)
|
|
6
|
+
|
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-openstack/compare/2.1.0...3.0.0)
|
|
8
|
+
|
|
9
|
+
**Breaking changes:**
|
|
10
|
+
|
|
11
|
+
- Major rewrite fixing root and additional volume creation, floating IP and keypair management, logging and cleanup. Keystone v2 support removed \(v3 required\) [\#38](https://github.com/voxpupuli/beaker-openstack/pull/38) ([canihavethisone](https://github.com/canihavethisone))
|
|
12
|
+
|
|
13
|
+
**Merged pull requests:**
|
|
14
|
+
|
|
15
|
+
- Updated gemspec to modern syntax [\#37](https://github.com/voxpupuli/beaker-openstack/pull/37) ([canihavethisone](https://github.com/canihavethisone))
|
|
16
|
+
|
|
17
|
+
## [2.1.0](https://github.com/voxpupuli/beaker-openstack/tree/2.1.0) (2026-01-01)
|
|
6
18
|
|
|
7
19
|
[Full Changelog](https://github.com/voxpupuli/beaker-openstack/compare/2.0.0...2.1.0)
|
|
8
20
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -7,50 +7,117 @@
|
|
|
7
7
|
[](https://rubygems.org/gems/beaker-openstack)
|
|
8
8
|
[](#transfer-notice)
|
|
9
9
|
|
|
10
|
-
Beaker
|
|
10
|
+
Beaker hypervisor support for provisioning hosts on OpenStack clouds.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
This version of beaker-openstack has been fully modernized and now supports:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- Keystone v3 authentication (v2 removed)
|
|
15
|
+
- Neutron networking only (Nova-network removed)
|
|
16
|
+
- Deterministic floating IP allocation
|
|
17
|
+
- Boot-from-volume provisioning
|
|
18
|
+
- Optional additional Cinder volumes
|
|
19
|
+
- Updated keypair lifecycle management
|
|
20
|
+
- Stronger credential validation and error reporting
|
|
21
|
+
- Predictable provisioning and teardown behavior
|
|
22
|
+
- Updated RSpec suite and acceptance test flow
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
---------------------------------------------------------------------
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
# Overview
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
beaker-openstack provides an OpenStack hypervisor implementation for Beaker.
|
|
29
|
+
It provisions OpenStack instances, assigns floating IPs, manages keypairs, and optionally provisions volumes.
|
|
21
30
|
|
|
22
|
-
|
|
31
|
+
Beaker automatically loads hypervisors based on the `hypervisor:` field in your nodeset.
|
|
32
|
+
No explicit require is needed.
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
---------------------------------------------------------------------
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
# Gemfile
|
|
28
|
-
gem 'beaker', '~>4.0'
|
|
29
|
-
gem 'beaker-aws'
|
|
30
|
-
# project.gemspec
|
|
31
|
-
s.add_runtime_dependency 'beaker', '~>4.0'
|
|
32
|
-
s.add_runtime_dependency 'beaker-aws'
|
|
33
|
-
~~~
|
|
36
|
+
# Compatibility
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
## Beaker 3.x
|
|
39
|
+
Beaker 3.x included hypervisors directly.
|
|
40
|
+
This gem remains compatible, but Beaker 3 is no longer maintained.
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
## Beaker 4.x and later
|
|
43
|
+
Beaker 4.x removed all bundled hypervisors.
|
|
44
|
+
You must include this gem explicitly:
|
|
45
|
+
|
|
46
|
+
Gemfile:
|
|
47
|
+
```
|
|
48
|
+
gem 'beaker', '~> 4.0'
|
|
49
|
+
gem 'beaker-openstack', '~> 3.0'
|
|
40
50
|
```
|
|
51
|
+
---------------------------------------------------------------------
|
|
41
52
|
|
|
42
|
-
#
|
|
53
|
+
# Installation
|
|
43
54
|
|
|
44
|
-
|
|
55
|
+
Add to your Gemfile or gemspec: `gem 'beaker-openstack'`
|
|
45
56
|
|
|
46
|
-
|
|
57
|
+
Then install: `bundle install`
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
---------------------------------------------------------------------
|
|
49
60
|
|
|
50
|
-
|
|
61
|
+
# Configuration
|
|
62
|
+
|
|
63
|
+
All OpenStack configuration is provided under the `CONFIG:` section of your nodeset.
|
|
64
|
+
|
|
65
|
+
Required parameters:
|
|
66
|
+
```
|
|
67
|
+
- openstack_auth_url
|
|
68
|
+
- openstack_username
|
|
69
|
+
- openstack_api_key
|
|
70
|
+
- openstack_project_name
|
|
71
|
+
- openstack_network
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Optional parameters:
|
|
75
|
+
```
|
|
76
|
+
- openstack_keyname
|
|
77
|
+
- security_group
|
|
78
|
+
- openstack_floating_ip
|
|
79
|
+
- floating_ip_pool
|
|
80
|
+
- openstack_volume_support
|
|
81
|
+
- openstack_region
|
|
82
|
+
- openstack_project_id
|
|
83
|
+
- openstack_user_domain
|
|
84
|
+
- openstack_user_domain_id
|
|
85
|
+
- openstack_project_domain
|
|
86
|
+
- openstack_project_domain_id
|
|
87
|
+
- preserve_hosts
|
|
88
|
+
- create_in_parallel
|
|
89
|
+
- run_in_parallel
|
|
90
|
+
- timeout
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Notes:
|
|
94
|
+
|
|
95
|
+
- When using `_id` parameters, ensure all three IDs match the parameter type:
|
|
96
|
+
```
|
|
97
|
+
openstack_project_id
|
|
98
|
+
openstack_user_domain_id
|
|
99
|
+
openstack_project_domain_id
|
|
100
|
+
```
|
|
51
101
|
|
|
52
|
-
|
|
102
|
+
- Static master nodes can be defined with:
|
|
103
|
+
```
|
|
104
|
+
hypervisor: none
|
|
105
|
+
hostname: <master_hostname>
|
|
106
|
+
vmhostname: <master_hostname>
|
|
107
|
+
ip: <master_ip>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- Additionally, you can set instance creation to occur in parallel instead of sequentially via this CONFIG entry:
|
|
111
|
+
`create_in_parallel: true`
|
|
112
|
+
|
|
113
|
+
- For parameter precedence, see: [Beaker argument processing](https://github.com/voxpupuli/beaker/blob/master/docs/concepts/argument_processing_and_precedence.md)
|
|
53
114
|
|
|
115
|
+
---------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
# Nodeset Examples
|
|
118
|
+
|
|
119
|
+
You will need at least two hosts defined in a nodeset file. An example comprehensive nodeset is below (note that not all parameters are required):
|
|
120
|
+
```
|
|
54
121
|
HOSTS:
|
|
55
122
|
master:
|
|
56
123
|
roles:
|
|
@@ -59,7 +126,7 @@ HOSTS:
|
|
|
59
126
|
- dashboard
|
|
60
127
|
- database
|
|
61
128
|
hypervisor: openstack
|
|
62
|
-
platform: <my_platform>
|
|
129
|
+
platform: <my_platform>
|
|
63
130
|
user: <host_username>
|
|
64
131
|
image: <host_image>
|
|
65
132
|
flavor: <host_flavor>
|
|
@@ -134,6 +201,7 @@ CONFIG:
|
|
|
134
201
|
openstack_network: <insert_network>
|
|
135
202
|
openstack_keyname: <insert_key>
|
|
136
203
|
openstack_floating_ip: <true/false>
|
|
204
|
+
floating_ip_pool: <insert_network or uuid>
|
|
137
205
|
openstack_volume_support: <true/false>
|
|
138
206
|
security_group: ['default']
|
|
139
207
|
preserve_hosts: <always/onfail/onpass/never>
|
|
@@ -142,31 +210,120 @@ CONFIG:
|
|
|
142
210
|
type: <foss/git/pe>
|
|
143
211
|
```
|
|
144
212
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
213
|
+
Boot-from-volume example:
|
|
214
|
+
```
|
|
215
|
+
HOSTS:
|
|
216
|
+
agent_1:
|
|
217
|
+
roles:
|
|
218
|
+
- agent
|
|
219
|
+
hypervisor: openstack
|
|
220
|
+
image: <host_image>
|
|
221
|
+
flavor: <host_flavor>
|
|
222
|
+
root_volume:
|
|
223
|
+
size: <size in Gb>
|
|
224
|
+
delete_on_termination: <true/false>
|
|
156
225
|
```
|
|
157
226
|
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
|
|
227
|
+
Additional volumes example:
|
|
228
|
+
```
|
|
229
|
+
HOSTS:
|
|
230
|
+
agent_2:
|
|
231
|
+
roles:
|
|
232
|
+
- agent
|
|
233
|
+
hypervisor: openstack
|
|
234
|
+
image: <host_image>
|
|
235
|
+
flavor: <host_flavor>
|
|
236
|
+
root_volume:
|
|
237
|
+
size: <size in Gb>
|
|
238
|
+
delete_on_termination: <true/false>
|
|
239
|
+
volumes:
|
|
240
|
+
data1:
|
|
241
|
+
size: <size in Gb>
|
|
242
|
+
description: second-volume
|
|
161
243
|
```
|
|
162
244
|
|
|
163
|
-
|
|
245
|
+
Notes:
|
|
246
|
+
- `root_volume` replaces ephemeral disk.
|
|
247
|
+
- `volumes` are attached after instance is ACTIVE.
|
|
248
|
+
- `volume_size` defaults to image minimum unless overridden.
|
|
249
|
+
- `Floating IPs` are allocated deterministically if enabled.
|
|
250
|
+
|
|
251
|
+
---------------------------------------------------------------------
|
|
252
|
+
|
|
253
|
+
# Volume Provisioning
|
|
254
|
+
- Instance boots from Cinder volume instead of ephemeral disk if root_volume is set.
|
|
255
|
+
- Volume size can be overridden via volume_size.
|
|
256
|
+
- The volume size defaults to the image minimum size unless overridden by volume_size (in Gb).
|
|
257
|
+
- Additional volumes are created after the instance becomes ACTIVE.
|
|
258
|
+
---------------------------------------------------------------------
|
|
259
|
+
|
|
260
|
+
# Floating IP Allocation
|
|
261
|
+
- Managed via Neutron.
|
|
262
|
+
- If `openstack_floating_ip: true`, a floating IP is created.
|
|
263
|
+
- IP is attached to instance's primary port.
|
|
264
|
+
- Allocation is deterministic and logged clearly
|
|
265
|
+
|
|
266
|
+
---------------------------------------------------------------------
|
|
267
|
+
|
|
268
|
+
# Spec Tests
|
|
164
269
|
|
|
165
|
-
|
|
166
|
-
|
|
270
|
+
RSpec tests live under spec/.
|
|
271
|
+
Run them with:
|
|
272
|
+
`bundle exec rake test:spec`
|
|
273
|
+
|
|
274
|
+
The spec suite includes:
|
|
275
|
+
- Credential validation
|
|
276
|
+
- Keypair lifecycle
|
|
277
|
+
- Volume provisioning logic
|
|
278
|
+
- Floating IP allocation
|
|
279
|
+
- Error handling and retries
|
|
280
|
+
|
|
281
|
+
---------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
# Acceptance Tests
|
|
284
|
+
|
|
285
|
+
Acceptance tests require:
|
|
286
|
+
- `OPENSTACK_HOSTS` - path to a nodeset using the OpenStack hypervisor
|
|
287
|
+
- `OPENSTACK_KEY` - path to the private SSH key used for the instances
|
|
288
|
+
|
|
289
|
+
Run acceptance tests:
|
|
290
|
+
```
|
|
167
291
|
bundle exec rake test:acceptance
|
|
168
292
|
```
|
|
169
293
|
|
|
294
|
+
At least one host must use the OpenStack hypervisor.
|
|
295
|
+
|
|
296
|
+
---------------------------------------------------------------------
|
|
297
|
+
|
|
298
|
+
# Troubleshooting
|
|
299
|
+
|
|
300
|
+
## Authentication failures:
|
|
301
|
+
Ensure all three Keystone v3 IDs are correct:
|
|
302
|
+
- `openstack_project_id`
|
|
303
|
+
- `openstack_user_domain_id`
|
|
304
|
+
- `openstack_project_domain_id`
|
|
305
|
+
|
|
306
|
+
## Floating IP not assigned:
|
|
307
|
+
Check:
|
|
308
|
+
- Neutron external network exists
|
|
309
|
+
- Security groups allow SSH ingress
|
|
310
|
+
|
|
311
|
+
## Volume creation errors:
|
|
312
|
+
Verify:
|
|
313
|
+
- Cinder backend is available
|
|
314
|
+
- Volume type exists (if specified)
|
|
315
|
+
|
|
316
|
+
SSH timeouts:
|
|
317
|
+
Use:
|
|
318
|
+
```
|
|
319
|
+
ssh:
|
|
320
|
+
keepalive: true
|
|
321
|
+
keepalive_interval: 5
|
|
322
|
+
```
|
|
323
|
+
---------------------------------------------------------------------
|
|
324
|
+
|
|
170
325
|
# Contributing
|
|
171
326
|
|
|
172
|
-
|
|
327
|
+
Contributions are welcome.
|
|
328
|
+
Please follow the Beaker project?s contribution guidelines:
|
|
329
|
+
https://github.com/voxpupuli/.github/blob/master/CONTRIBUTING.md
|
data/beaker-openstack.gemspec
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Use require_relative for the version file and avoid unshifting to $LOAD_PATH manually
|
|
4
|
+
require_relative 'lib/beaker-openstack/version'
|
|
4
5
|
|
|
5
6
|
Gem::Specification.new do |s|
|
|
6
7
|
s.name = "beaker-openstack"
|
|
7
8
|
s.version = BeakerOpenstack::VERSION
|
|
8
|
-
s.authors = 'Vox Pupuli'
|
|
9
|
-
s.email = 'voxpupuli@groups.io'
|
|
9
|
+
s.authors = ['Vox Pupuli']
|
|
10
|
+
s.email = ['voxpupuli@groups.io']
|
|
10
11
|
s.homepage = 'https://github.com/voxpupuli/beaker-openstack'
|
|
11
|
-
s.summary =
|
|
12
|
-
s.description =
|
|
12
|
+
s.summary = 'Beaker hypervisor support for OpenStack'
|
|
13
|
+
s.description = 'Provides OpenStack hypervisor implementation for the Beaker acceptance testing tool.'
|
|
13
14
|
s.license = 'Apache-2.0'
|
|
14
15
|
|
|
15
16
|
s.files = `git ls-files`.split("\n")
|
|
16
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
17
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
18
|
-
s.require_paths = [
|
|
19
|
+
s.require_paths = ['lib']
|
|
20
|
+
|
|
21
|
+
s.metadata = {
|
|
22
|
+
'source_code_uri' => 'https://github.com/voxpupuli/beaker-openstack',
|
|
23
|
+
'changelog_uri' => 'https://github.com/voxpupuli/beaker-openstack/blob/main/CHANGELOG.md',
|
|
24
|
+
'bug_tracker_uri' => 'https://github.com/voxpupuli/beaker-openstack/issues'
|
|
25
|
+
}
|
|
19
26
|
|
|
20
|
-
# Ruby compatibility
|
|
27
|
+
# Ruby compatibility: Dropped EoL 2.4/2.5/2.6 support in version 2.0.0
|
|
21
28
|
s.required_ruby_version = '>= 2.7', '< 5'
|
|
22
29
|
|
|
23
|
-
#
|
|
30
|
+
# Runtime dependencies
|
|
31
|
+
s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
|
|
32
|
+
s.add_runtime_dependency 'fog-openstack', '~> 1.0'
|
|
33
|
+
# Updated for modern Beaker compatibility (Beaker 6.x and 7.x)
|
|
34
|
+
s.add_runtime_dependency 'beaker', '>= 5.6', '< 8'
|
|
35
|
+
|
|
36
|
+
# Testing & Development dependencies
|
|
24
37
|
s.add_development_dependency 'rspec', '~> 3.0'
|
|
25
38
|
s.add_development_dependency 'rspec-its'
|
|
26
39
|
s.add_development_dependency 'fakefs', '>= 2.4', '< 4'
|
|
27
40
|
s.add_development_dependency 'rake', '>= 12.3.3'
|
|
28
41
|
s.add_development_dependency 'simplecov'
|
|
29
42
|
s.add_development_dependency 'pry', '~> 0.10'
|
|
30
|
-
|
|
31
|
-
# Documentation dependencies
|
|
32
43
|
s.add_development_dependency 'yard'
|
|
33
|
-
s.add_development_dependency 'markdown'
|
|
34
|
-
s.add_development_dependency 'thin'
|
|
35
|
-
|
|
36
|
-
# Runtime dependencies
|
|
37
|
-
s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
|
|
38
|
-
s.add_runtime_dependency 'fog-openstack', '~> 1.0'
|
|
39
|
-
s.add_runtime_dependency 'beaker', '>= 5.6', '< 8'
|
|
40
44
|
end
|