beaker-openstack 2.0.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/release.yml +41 -0
- data/.github/workflows/release.yml +95 -20
- data/.github/workflows/test.yml +33 -6
- data/CHANGELOG.md +24 -0
- data/Gemfile +1 -1
- data/README.md +202 -45
- data/beaker-openstack.gemspec +25 -20
- 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 +63 -76
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
|
data/.github/release.yml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
|
|
3
|
+
|
|
4
|
+
changelog:
|
|
5
|
+
exclude:
|
|
6
|
+
labels:
|
|
7
|
+
- duplicate
|
|
8
|
+
- invalid
|
|
9
|
+
- modulesync
|
|
10
|
+
- question
|
|
11
|
+
- skip-changelog
|
|
12
|
+
- wont-fix
|
|
13
|
+
- wontfix
|
|
14
|
+
- github_actions
|
|
15
|
+
|
|
16
|
+
categories:
|
|
17
|
+
- title: Breaking Changes 🛠
|
|
18
|
+
labels:
|
|
19
|
+
- backwards-incompatible
|
|
20
|
+
|
|
21
|
+
- title: New Features 🎉
|
|
22
|
+
labels:
|
|
23
|
+
- enhancement
|
|
24
|
+
|
|
25
|
+
- title: Bug Fixes 🐛
|
|
26
|
+
labels:
|
|
27
|
+
- bug
|
|
28
|
+
- bugfix
|
|
29
|
+
|
|
30
|
+
- title: Documentation Updates 📚
|
|
31
|
+
labels:
|
|
32
|
+
- documentation
|
|
33
|
+
- docs
|
|
34
|
+
|
|
35
|
+
- title: Dependency Updates ⬆️
|
|
36
|
+
labels:
|
|
37
|
+
- dependencies
|
|
38
|
+
|
|
39
|
+
- title: Other Changes
|
|
40
|
+
labels:
|
|
41
|
+
- "*"
|
|
@@ -1,31 +1,106 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: Gem Release
|
|
2
3
|
|
|
3
4
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- '*'
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
6
10
|
|
|
7
11
|
jobs:
|
|
8
|
-
release:
|
|
9
|
-
|
|
10
|
-
if: github.
|
|
12
|
+
build-release:
|
|
13
|
+
# Prevent releases from forked repositories
|
|
14
|
+
if: github.repository_owner == 'voxpupuli'
|
|
15
|
+
name: Build the gem
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
11
17
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
13
|
-
- name: Install Ruby
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- name: Install Ruby
|
|
14
20
|
uses: ruby/setup-ruby@v1
|
|
15
21
|
with:
|
|
16
|
-
ruby-version: '
|
|
17
|
-
env:
|
|
18
|
-
BUNDLE_WITHOUT: release
|
|
22
|
+
ruby-version: 'ruby'
|
|
19
23
|
- name: Build gem
|
|
20
|
-
|
|
24
|
+
shell: bash
|
|
25
|
+
run: gem build --verbose *.gemspec
|
|
26
|
+
- name: Upload gem to GitHub cache
|
|
27
|
+
uses: actions/upload-artifact@v7
|
|
28
|
+
with:
|
|
29
|
+
name: gem-artifact
|
|
30
|
+
path: '*.gem'
|
|
31
|
+
retention-days: 1
|
|
32
|
+
compression-level: 0
|
|
33
|
+
|
|
34
|
+
create-github-release:
|
|
35
|
+
needs: build-release
|
|
36
|
+
name: Create GitHub release
|
|
37
|
+
runs-on: ubuntu-24.04
|
|
38
|
+
permissions:
|
|
39
|
+
contents: write # clone repo and create release
|
|
40
|
+
steps:
|
|
41
|
+
- name: Download gem from GitHub cache
|
|
42
|
+
uses: actions/download-artifact@v8
|
|
43
|
+
with:
|
|
44
|
+
name: gem-artifact
|
|
45
|
+
- name: Create Release
|
|
46
|
+
shell: bash
|
|
47
|
+
env:
|
|
48
|
+
GH_TOKEN: ${{ github.token }}
|
|
49
|
+
run: gh release create --repo ${{ github.repository }} ${{ github.ref_name }} --generate-notes *.gem
|
|
50
|
+
|
|
51
|
+
release-to-github:
|
|
52
|
+
needs: build-release
|
|
53
|
+
name: Release to GitHub
|
|
54
|
+
runs-on: ubuntu-24.04
|
|
55
|
+
permissions:
|
|
56
|
+
packages: write # publish to rubygems.pkg.github.com
|
|
57
|
+
steps:
|
|
58
|
+
- name: Download gem from GitHub cache
|
|
59
|
+
uses: actions/download-artifact@v8
|
|
60
|
+
with:
|
|
61
|
+
name: gem-artifact
|
|
62
|
+
- name: Publish gem to GitHub packages
|
|
63
|
+
run: gem push --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
|
|
64
|
+
env:
|
|
65
|
+
GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }}
|
|
66
|
+
|
|
67
|
+
release-to-rubygems:
|
|
68
|
+
needs: build-release
|
|
69
|
+
name: Release gem to rubygems.org
|
|
70
|
+
runs-on: ubuntu-24.04
|
|
71
|
+
environment: release # recommended by rubygems.org
|
|
72
|
+
permissions:
|
|
73
|
+
id-token: write # rubygems.org authentication
|
|
74
|
+
steps:
|
|
75
|
+
- name: Download gem from GitHub cache
|
|
76
|
+
uses: actions/download-artifact@v8
|
|
77
|
+
with:
|
|
78
|
+
name: gem-artifact
|
|
79
|
+
- uses: rubygems/configure-rubygems-credentials@v1.0.0
|
|
21
80
|
- name: Publish gem to rubygems.org
|
|
81
|
+
shell: bash
|
|
22
82
|
run: gem push *.gem
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
83
|
+
|
|
84
|
+
release-verification:
|
|
85
|
+
name: Check that all releases are done
|
|
86
|
+
runs-on: ubuntu-24.04
|
|
87
|
+
permissions:
|
|
88
|
+
contents: read # minimal permissions that we have to grant
|
|
89
|
+
needs:
|
|
90
|
+
- create-github-release
|
|
91
|
+
- release-to-github
|
|
92
|
+
- release-to-rubygems
|
|
93
|
+
steps:
|
|
94
|
+
- name: Download gem from GitHub cache
|
|
95
|
+
uses: actions/download-artifact@v8
|
|
96
|
+
with:
|
|
97
|
+
name: gem-artifact
|
|
98
|
+
- name: Install Ruby
|
|
99
|
+
uses: ruby/setup-ruby@v1
|
|
100
|
+
with:
|
|
101
|
+
ruby-version: 'ruby'
|
|
102
|
+
- name: Wait for release to propagate
|
|
103
|
+
shell: bash
|
|
26
104
|
run: |
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
chmod 0600 ~/.gem/credentials
|
|
30
|
-
- name: Publish gem to GitHub packages
|
|
31
|
-
run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
|
|
105
|
+
gem install rubygems-await
|
|
106
|
+
gem await *.gem
|
data/.github/workflows/test.yml
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
name: Test
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
pull_request: {}
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
6
11
|
|
|
7
12
|
jobs:
|
|
13
|
+
matrix:
|
|
14
|
+
runs-on: ubuntu-24.04
|
|
15
|
+
outputs:
|
|
16
|
+
ruby: ${{ steps.ruby.outputs.versions }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- name: Install Ruby ${{ matrix.ruby }}
|
|
20
|
+
uses: ruby/setup-ruby@v1
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: '3.4'
|
|
23
|
+
bundler-cache: true
|
|
24
|
+
- id: ruby
|
|
25
|
+
uses: voxpupuli/ruby-version@v2
|
|
8
26
|
test:
|
|
9
27
|
runs-on: ubuntu-latest
|
|
28
|
+
needs: matrix
|
|
10
29
|
strategy:
|
|
11
30
|
fail-fast: false
|
|
12
31
|
matrix:
|
|
13
|
-
ruby:
|
|
14
|
-
|
|
15
|
-
- "3.0"
|
|
32
|
+
ruby: ${{ fromJSON(needs.matrix.outputs.ruby) }}
|
|
33
|
+
|
|
16
34
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
35
|
+
- uses: actions/checkout@v6
|
|
18
36
|
- name: Install Ruby ${{ matrix.ruby }}
|
|
19
37
|
uses: ruby/setup-ruby@v1
|
|
20
38
|
with:
|
|
@@ -22,3 +40,12 @@ jobs:
|
|
|
22
40
|
bundler-cache: true
|
|
23
41
|
- name: Run tests
|
|
24
42
|
run: bundle exec rake spec
|
|
43
|
+
|
|
44
|
+
tests:
|
|
45
|
+
needs:
|
|
46
|
+
- matrix
|
|
47
|
+
- test
|
|
48
|
+
runs-on: ubuntu-24.04
|
|
49
|
+
name: Test suite
|
|
50
|
+
steps:
|
|
51
|
+
- run: echo Test suite completed
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
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)
|
|
18
|
+
|
|
19
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-openstack/compare/2.0.0...2.1.0)
|
|
20
|
+
|
|
21
|
+
**Implemented enhancements:**
|
|
22
|
+
|
|
23
|
+
- Allow beaker-openstack to run with Beaker 6.x and 7.x [\#31](https://github.com/voxpupuli/beaker-openstack/pull/31) ([canihavethisone](https://github.com/canihavethisone))
|
|
24
|
+
|
|
25
|
+
**Merged pull requests:**
|
|
26
|
+
|
|
27
|
+
- CI: Generate ruby matrix dynamically & Add Ruby 4 support [\#32](https://github.com/voxpupuli/beaker-openstack/pull/32) ([bastelfreak](https://github.com/bastelfreak))
|
|
28
|
+
|
|
5
29
|
## [2.0.0](https://github.com/voxpupuli/beaker-openstack/tree/2.0.0) (2024-02-03)
|
|
6
30
|
|
|
7
31
|
[Full Changelog](https://github.com/voxpupuli/beaker-openstack/compare/1.0.0...2.0.0)
|
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,39 +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
|
-
|
|
27
|
+
# Ruby compatibility: Dropped EoL 2.4/2.5/2.6 support in version 2.0.0
|
|
28
|
+
s.required_ruby_version = '>= 2.7', '< 5'
|
|
29
|
+
|
|
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'
|
|
21
35
|
|
|
22
|
-
# Testing dependencies
|
|
36
|
+
# Testing & Development dependencies
|
|
23
37
|
s.add_development_dependency 'rspec', '~> 3.0'
|
|
24
38
|
s.add_development_dependency 'rspec-its'
|
|
25
|
-
s.add_development_dependency 'fakefs', '
|
|
39
|
+
s.add_development_dependency 'fakefs', '>= 2.4', '< 4'
|
|
26
40
|
s.add_development_dependency 'rake', '>= 12.3.3'
|
|
27
41
|
s.add_development_dependency 'simplecov'
|
|
28
42
|
s.add_development_dependency 'pry', '~> 0.10'
|
|
29
|
-
|
|
30
|
-
# Documentation dependencies
|
|
31
43
|
s.add_development_dependency 'yard'
|
|
32
|
-
s.add_development_dependency 'markdown'
|
|
33
|
-
s.add_development_dependency 'thin'
|
|
34
|
-
|
|
35
|
-
# Run time dependencies
|
|
36
|
-
s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
|
|
37
|
-
s.add_runtime_dependency 'fog-openstack', '~> 1.0.0'
|
|
38
|
-
s.add_runtime_dependency 'beaker', '~> 5.6'
|
|
39
44
|
end
|