kitchen-oci 1.11.0 → 1.12.1
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/CHANGELOG.md +19 -0
- data/README.md +34 -0
- data/kitchen-oci.gemspec +1 -1
- data/lib/kitchen/driver/oci.rb +24 -5
- data/lib/kitchen/driver/oci_version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0eb69dede4d52baea704de587e6482148229f09a26137993a7a3fc2cf05051
|
4
|
+
data.tar.gz: 7555a7a550d8db12668014d1bb9a587b707144e688fe3de3be74e796247d417a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2e53b809addf74284e222b0c402a177ce4a777dd6df1ba7c1e621c5fc9b3cd18c56d2833ef159615aa715a1dd14347fe31a62c2426c477b0e820c21ae1c5a91
|
7
|
+
data.tar.gz: b6c543c4342706e53a0d86de012ed61a8e55f4c063bf9c039cd4585e7ad87e71f0d75d2cee8b3bdfb0b59210a75fc93de011e5680a6b24c25872a13a4663c04f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
|
2
|
+
## 1.12.1
|
3
|
+
- Refactor `oci_config` method to account for `warning: Using the last argument as keyword parameters is deprecated` deprecation warning
|
4
|
+
- Set dependency on oci gem to 2.15.0
|
5
|
+
|
6
|
+
## 1.12.0
|
7
|
+
- Added support for Flex and Preemptible instances
|
8
|
+
- Set dependency on oci gem to 2.14.0
|
9
|
+
- Further reduction of characters known to cause winrm password issues
|
10
|
+
|
11
|
+
## 1.11.2
|
12
|
+
- Set dependency on oci gem to 2.10.0
|
13
|
+
|
14
|
+
## 1.11.1
|
15
|
+
- Removed characters from password string known to break winrm
|
16
|
+
|
17
|
+
## 1.11.0
|
18
|
+
- Added support for user_data raw string
|
19
|
+
|
1
20
|
## 1.10.1 Issue 22
|
2
21
|
- Added safeguard for cluster_name length restriction in DBaaS.
|
3
22
|
|
data/README.md
CHANGED
@@ -84,6 +84,11 @@ These settings are optional:
|
|
84
84
|
- `hostname_prefix`, Prefix for the generated hostnames (note that OCI doesn't like underscores)
|
85
85
|
- `freeform_tags`, Hash containing tag name(s) and values(s)
|
86
86
|
- `use_instance_principals`, Boolean flag indicated whether Instance Principals should be used as credentials (see below)
|
87
|
+
- `preemptible_instance`, Boolean flag to indicate if the compute instance should be preemptible, default is `false`.
|
88
|
+
- `shape_config`, Hash of shape config parameters required when using Flex shapes.
|
89
|
+
- `ocpus`, number of CPUs requested
|
90
|
+
- `memory_in_gbs`, the amount of memory requested
|
91
|
+
- `baseline_ocpu_utilization`, the minimum CPU utilization, default `BASELINE_1_1`
|
87
92
|
|
88
93
|
Optional settings for WinRM support in Windows:
|
89
94
|
|
@@ -226,6 +231,35 @@ transport:
|
|
226
231
|
|
227
232
|
See also the section above on Instance Principals if you plan to use a proxy in conjunction with a proxy. The proxy needs to be avoided when accessing the metadata address.
|
228
233
|
|
234
|
+
## Preemptible Instances
|
235
|
+
|
236
|
+
This will allow you to create a [preemptible instance](https://docs.oracle.com/en-us/iaas/Content/Compute/Concepts/preemptible.htm). Preemptible instances behave the same as regular compute instances, but the capacity is reclaimed when it's needed elsewhere, and the instances are terminated. If your workloads are fault-tolerant and can withstand interruptions, then preemptible instances can reduce your costs.
|
237
|
+
|
238
|
+
```yml
|
239
|
+
---
|
240
|
+
driver:
|
241
|
+
name: oci
|
242
|
+
...
|
243
|
+
preemptible_instance: true
|
244
|
+
...
|
245
|
+
```
|
246
|
+
|
247
|
+
## Flex Shape Instances
|
248
|
+
|
249
|
+
This will allow you to launch a flexible shape instance. A flexible shape lets you customize the number of CPUs and memory available when launching or resizing the VM. Note that there are smaller number of shapes available and the image ocid must also be compatible. Please consult [OCI documentation](https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#flexible) to ensure the proper combination of shape and image ocid.
|
250
|
+
|
251
|
+
```yml
|
252
|
+
---
|
253
|
+
driver:
|
254
|
+
name: oci
|
255
|
+
...
|
256
|
+
shape_config:
|
257
|
+
ocpus: 2
|
258
|
+
memory_in_gbs: 8
|
259
|
+
baseline_ocpu_utilization: BASELINE_1_1
|
260
|
+
...
|
261
|
+
```
|
262
|
+
|
229
263
|
## Windows Support
|
230
264
|
|
231
265
|
When launching Oracle provided Windows images, it may be helpful to allow kitchen-oci to inject powershell to configure WinRM and to set a randomized password that does not need to be changed on first login. If the `setup_winrm` parameter is set to true then the following steps will happen:
|
data/kitchen-oci.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
36
36
|
spec.require_paths = ['lib']
|
37
37
|
|
38
|
-
spec.add_dependency 'oci', '~> 2.
|
38
|
+
spec.add_dependency 'oci', '~> 2.15.0'
|
39
39
|
spec.add_dependency 'test-kitchen'
|
40
40
|
|
41
41
|
spec.add_development_dependency 'bundler'
|
data/lib/kitchen/driver/oci.rb
CHANGED
@@ -59,6 +59,8 @@ module Kitchen
|
|
59
59
|
default_config :winrm_user, 'opc'
|
60
60
|
default_config :winrm_password, nil
|
61
61
|
default_config :use_instance_principals, false
|
62
|
+
default_config :preemptible_instance, false
|
63
|
+
default_config :shape_config, {}
|
62
64
|
|
63
65
|
# dbaas config items
|
64
66
|
default_config :dbaas, {}
|
@@ -129,12 +131,10 @@ module Kitchen
|
|
129
131
|
# OCI config setup #
|
130
132
|
####################
|
131
133
|
def oci_config
|
132
|
-
params = [:load_config]
|
133
134
|
opts = {}
|
134
135
|
opts[:config_file_location] = config[:oci_config_file] if config[:oci_config_file]
|
135
136
|
opts[:profile_name] = config[:oci_profile_name] if config[:oci_profile_name]
|
136
|
-
|
137
|
-
OCI::ConfigFileLoader.send(*params)
|
137
|
+
OCI::ConfigFileLoader.load_config(**opts)
|
138
138
|
end
|
139
139
|
|
140
140
|
def proxy_config
|
@@ -237,7 +237,7 @@ module Kitchen
|
|
237
237
|
|
238
238
|
def random_password
|
239
239
|
if instance_type == 'compute'
|
240
|
-
special_chars = %w[
|
240
|
+
special_chars = %w[@ - ( ) .]
|
241
241
|
elsif instance_type == 'dbaas'
|
242
242
|
special_chars = %w[# _ -]
|
243
243
|
end
|
@@ -284,7 +284,7 @@ module Kitchen
|
|
284
284
|
request
|
285
285
|
end
|
286
286
|
|
287
|
-
def compute_launch_details
|
287
|
+
def compute_launch_details # rubocop:disable Metrics/MethodLength
|
288
288
|
OCI::Core::Models::LaunchInstanceDetails.new.tap do |l|
|
289
289
|
hostname = generate_hostname
|
290
290
|
l.availability_domain = config[:availability_domain]
|
@@ -294,6 +294,8 @@ module Kitchen
|
|
294
294
|
l.shape = config[:shape]
|
295
295
|
l.create_vnic_details = create_vnic_details(hostname)
|
296
296
|
l.freeform_tags = process_freeform_tags(config[:freeform_tags])
|
297
|
+
l.preemptible_instance_config = preemptible_instance_config if config[:preemptible_instance]
|
298
|
+
l.shape_config = shape_config unless config[:shape_config].empty?
|
297
299
|
end
|
298
300
|
end
|
299
301
|
|
@@ -304,6 +306,23 @@ module Kitchen
|
|
304
306
|
)
|
305
307
|
end
|
306
308
|
|
309
|
+
def preemptible_instance_config
|
310
|
+
OCI::Core::Models::PreemptibleInstanceConfigDetails.new(
|
311
|
+
preemption_action:
|
312
|
+
OCI::Core::Models::TerminatePreemptionAction.new(
|
313
|
+
type: 'TERMINATE', preserve_boot_volume: true
|
314
|
+
)
|
315
|
+
)
|
316
|
+
end
|
317
|
+
|
318
|
+
def shape_config
|
319
|
+
OCI::Core::Models::LaunchInstanceShapeConfigDetails.new(
|
320
|
+
ocpus: config[:shape_config][:ocpus],
|
321
|
+
memory_in_gbs: config[:shape_config][:memory_in_gbs],
|
322
|
+
baseline_ocpu_utilization: config[:shape_config][:baseline_ocpu_utilization] || 'BASELINE_1_1'
|
323
|
+
)
|
324
|
+
end
|
325
|
+
|
307
326
|
def create_vnic_details(name)
|
308
327
|
OCI::Core::Models::CreateVnicDetails.new(
|
309
328
|
assign_public_ip: public_ip_allowed?,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-oci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Pearson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oci
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.15.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.15.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: test-kitchen
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,7 +133,7 @@ homepage: ''
|
|
133
133
|
licenses:
|
134
134
|
- Apache-2.0
|
135
135
|
metadata: {}
|
136
|
-
post_install_message:
|
136
|
+
post_install_message:
|
137
137
|
rdoc_options: []
|
138
138
|
require_paths:
|
139
139
|
- lib
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubygems_version: 3.0.3
|
152
|
-
signing_key:
|
152
|
+
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: A Test Kitchen Driver for Oracle OCI
|
155
155
|
test_files: []
|