hybrid_platforms_conductor 33.6.0 → 33.7.3
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 +36 -0
- data/lib/hybrid_platforms_conductor/config.rb +2 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef.rb +23 -13
- data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/docker.rb +1 -1
- data/lib/hybrid_platforms_conductor/provisioner.rb +1 -1
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/config_spec.rb +11 -0
- data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/services_deployment_spec.rb +26 -16
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6eb048c4791dd3f4bb8263991c55a075de8d3c1b4458fb0b45469f3cefbb7eb
|
|
4
|
+
data.tar.gz: 9d22df654d620efaead05daebdb41bc00d67614d6e62771dc7fd92989731fd87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b1724ac79d6bacf3215e30872571f2f3ea8a35b980a20dd3b3da3ecd602c0147319801308855e0b054ef921c8b54c17a3d246b84a1cdb16298985c0cd082fae
|
|
7
|
+
data.tar.gz: 72e45917b5992a610cdd6d2e95d2c4690c06b94640edf0e742ae12e8fd68ece86d9cbbb16866faa6baf40ebece26a1a8fde6a44cfc3615a71db133a74154b6b3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
# [v33.7.3](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.7.2...v33.7.3) (2021-07-16 12:05:04)
|
|
2
|
+
|
|
3
|
+
### Patches
|
|
4
|
+
|
|
5
|
+
* [[Hotfix] Increase port timeout](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/a450e6ee74bcd14a0f4f7bfcdad826928ad7918c)
|
|
6
|
+
|
|
7
|
+
# [v33.7.2](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.7.1...v33.7.2) (2021-07-15 14:37:59)
|
|
8
|
+
|
|
9
|
+
## Global changes
|
|
10
|
+
### Patches
|
|
11
|
+
|
|
12
|
+
* [[Hotfix(provisioner_docker)] Increase Futex timeout to cope with image building time](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/52a03adbfc176f49800793acb3ab28026eb56289)
|
|
13
|
+
|
|
14
|
+
## Changes for provisioner_docker
|
|
15
|
+
### Patches
|
|
16
|
+
|
|
17
|
+
* [[Hotfix(provisioner_docker)] Increase Futex timeout to cope with image building time](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/52a03adbfc176f49800793acb3ab28026eb56289)
|
|
18
|
+
|
|
19
|
+
# [v33.7.1](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.7.0...v33.7.1) (2021-07-09 17:17:18)
|
|
20
|
+
|
|
21
|
+
## Global changes
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
* [[Bugfix(platform_handler_serverless_chef)] [#93] Make sure chef runs use colors in their output](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/14352425115cf46b92e4c747b2e34e3734314288)
|
|
25
|
+
|
|
26
|
+
## Changes for platform_handler_serverless_chef
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
* [[Bugfix(platform_handler_serverless_chef)] [#93] Make sure chef runs use colors in their output](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/14352425115cf46b92e4c747b2e34e3734314288)
|
|
30
|
+
|
|
31
|
+
# [v33.7.0](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.6.0...v33.7.0) (2021-07-09 16:32:25)
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* [[Feature] [#91] Expose log_debug? method to the config DSL to adapt configuration in case we are in debug mode](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/87f6f51df2d20c7861f9ddd59a8d7f68c27cdd74)
|
|
36
|
+
|
|
1
37
|
# [v33.6.0](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.5.1...v33.6.0) (2021-07-07 15:45:12)
|
|
2
38
|
|
|
3
39
|
## Global changes
|
|
@@ -241,18 +241,25 @@ module HybridPlatformsConductor
|
|
|
241
241
|
'--json-attributes', "nodes/#{node}.json"
|
|
242
242
|
]
|
|
243
243
|
client_options << '--why-run' if use_why_run
|
|
244
|
+
# client_options.concat ['--log_level', 'debug'] if log_debug?
|
|
245
|
+
# Force setting of TERM variable and usage of unbuffer to get colored output from chef-client even if executed through a non-interactive SSH session.
|
|
246
|
+
client_env = {
|
|
247
|
+
'SSL_CERT_DIR' => '/etc/ssl/certs',
|
|
248
|
+
'TERM' => 'xterm-256color'
|
|
249
|
+
}
|
|
244
250
|
if @nodes_handler.get_use_local_chef_of(node)
|
|
245
251
|
# Just run the chef-client directly from the packaged repository
|
|
246
|
-
sudo_prefix = @cmd_runner.root? ? '' : 'sudo '
|
|
252
|
+
sudo_prefix = @cmd_runner.root? ? '' : 'sudo -E '
|
|
247
253
|
[
|
|
248
254
|
{
|
|
249
255
|
bash: [
|
|
250
256
|
'set -e',
|
|
251
257
|
"cd #{package_dir}"
|
|
252
258
|
] +
|
|
253
|
-
|
|
259
|
+
client_env.map { |var_name, value| "export #{var_name}=#{value}" } +
|
|
260
|
+
gems_to_install.map { |(gem_name, gem_version)| "#{sudo_prefix}/opt/chef-workstation/bin/chef gem install #{gem_name} --version \"#{gem_version}\"" } +
|
|
254
261
|
[
|
|
255
|
-
"#{sudo_prefix}
|
|
262
|
+
"#{sudo_prefix}/opt/chef-workstation/bin/chef-client #{client_options.join(' ')}"
|
|
256
263
|
]
|
|
257
264
|
}
|
|
258
265
|
]
|
|
@@ -270,7 +277,7 @@ module HybridPlatformsConductor
|
|
|
270
277
|
remote_bash: [
|
|
271
278
|
'set -e',
|
|
272
279
|
'set -o pipefail',
|
|
273
|
-
"if [ -n \"$(command -v apt)\" ]; then #{sudo}apt update && #{sudo}apt install -y curl build-essential ; else #{sudo}yum groupinstall 'Development Tools' && #{sudo}yum install -y curl ; fi",
|
|
280
|
+
"if [ -n \"$(command -v apt)\" ]; then #{sudo}apt update && #{sudo}apt install -y curl build-essential expect ; else #{sudo}yum groupinstall 'Development Tools' && #{sudo}yum install -y curl expect ; fi",
|
|
274
281
|
'mkdir -p ./hpc_deploy',
|
|
275
282
|
'rm -rf ./hpc_deploy/tmp',
|
|
276
283
|
'mkdir -p ./hpc_deploy/tmp',
|
|
@@ -281,16 +288,19 @@ module HybridPlatformsConductor
|
|
|
281
288
|
},
|
|
282
289
|
{
|
|
283
290
|
scp: { package_dir => './hpc_deploy' },
|
|
284
|
-
remote_bash:
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
gems_to_install.map { |(gem_name, gem_version)| "#{sudo}SSL_CERT_DIR=/etc/ssl/certs /opt/chef/embedded/bin/gem install #{gem_name} --version \"#{gem_version}\"" } +
|
|
289
|
-
[
|
|
290
|
-
"#{sudo}SSL_CERT_DIR=/etc/ssl/certs /opt/chef/bin/chef-client #{client_options.join(' ')}",
|
|
291
|
-
'cd ..'
|
|
291
|
+
remote_bash: {
|
|
292
|
+
commands: [
|
|
293
|
+
'set -e',
|
|
294
|
+
"cd ./hpc_deploy/#{package_name}"
|
|
292
295
|
] +
|
|
293
|
-
|
|
296
|
+
gems_to_install.map { |(gem_name, gem_version)| "#{sudo}/opt/chef/embedded/bin/gem install #{gem_name} --version \"#{gem_version}\"" } +
|
|
297
|
+
[
|
|
298
|
+
"#{sudo}unbuffer /opt/chef/bin/chef-client #{client_options.join(' ')}",
|
|
299
|
+
'cd ..'
|
|
300
|
+
] +
|
|
301
|
+
(log_debug? ? [] : ["#{sudo}rm -rf ./hpc_deploy/#{package_name}"]),
|
|
302
|
+
env: client_env
|
|
303
|
+
}
|
|
294
304
|
}
|
|
295
305
|
]
|
|
296
306
|
end
|
|
@@ -40,7 +40,7 @@ module HybridPlatformsConductor
|
|
|
40
40
|
docker_image = nil
|
|
41
41
|
image_futex_file = "#{Dir.tmpdir}/hpc_docker_image_futexes/#{image_tag}"
|
|
42
42
|
FileUtils.mkdir_p File.dirname(image_futex_file)
|
|
43
|
-
Futex.new(image_futex_file).open do
|
|
43
|
+
Futex.new(image_futex_file, timeout: 600).open do
|
|
44
44
|
docker_image = ::Docker::Image.all.find { |search_image| !search_image.info['RepoTags'].nil? && search_image.info['RepoTags'].include?("#{image_tag}:latest") }
|
|
45
45
|
unless docker_image
|
|
46
46
|
log_debug "[ #{@node}/#{@environment} ] - Creating Docker image #{image_tag}..."
|
|
@@ -29,6 +29,17 @@ describe HybridPlatformsConductor::Config do
|
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
it 'can check if we are in debug mode' do
|
|
33
|
+
with_platforms(
|
|
34
|
+
<<~EO_CONFIG
|
|
35
|
+
os_image :image_1, '/path/to/image_1' if log_debug?
|
|
36
|
+
os_image :image_2, '/path/to/image_2'
|
|
37
|
+
EO_CONFIG
|
|
38
|
+
) do
|
|
39
|
+
expect(test_config.known_os_images.sort).to eq %i[image_2].sort
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
32
43
|
it 'returns the tests provisioner correctly' do
|
|
33
44
|
with_platforms 'tests_provisioner :test_provisioner' do
|
|
34
45
|
expect(test_config.tests_provisioner_id).to eq :test_provisioner
|
|
@@ -46,7 +46,7 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
|
|
|
46
46
|
remote_bash: [
|
|
47
47
|
'set -e',
|
|
48
48
|
'set -o pipefail',
|
|
49
|
-
"if [ -n \"$(command -v apt)\" ]; then #{sudo}apt update && #{sudo}apt install -y curl build-essential ; else #{sudo}yum groupinstall 'Development Tools' && #{sudo}yum install -y curl ; fi",
|
|
49
|
+
"if [ -n \"$(command -v apt)\" ]; then #{sudo}apt update && #{sudo}apt install -y curl build-essential expect ; else #{sudo}yum groupinstall 'Development Tools' && #{sudo}yum install -y curl expect ; fi",
|
|
50
50
|
'mkdir -p ./hpc_deploy',
|
|
51
51
|
'rm -rf ./hpc_deploy/tmp',
|
|
52
52
|
'mkdir -p ./hpc_deploy/tmp',
|
|
@@ -57,16 +57,22 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
|
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
scp: { "#{repository}/dist/#{env}/#{policy}" => './hpc_deploy' },
|
|
60
|
-
remote_bash:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
remote_bash: {
|
|
61
|
+
commands: [
|
|
62
|
+
'set -e',
|
|
63
|
+
"cd ./hpc_deploy/#{policy}"
|
|
64
|
+
] +
|
|
65
|
+
gems_install_cmds.map { |gem_install_cmd| "#{sudo}/opt/chef/embedded/bin/#{gem_install_cmd}" } +
|
|
66
|
+
[
|
|
67
|
+
"#{sudo}unbuffer /opt/chef/bin/chef-client --local-mode --chef-license accept --json-attributes nodes/#{node}.json#{check_mode ? ' --why-run' : ''}",
|
|
68
|
+
'cd ..',
|
|
69
|
+
"#{sudo}rm -rf ./hpc_deploy/#{policy}"
|
|
70
|
+
],
|
|
71
|
+
env: {
|
|
72
|
+
'SSL_CERT_DIR' => '/etc/ssl/certs',
|
|
73
|
+
'TERM' => 'xterm-256color'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
70
76
|
}
|
|
71
77
|
]
|
|
72
78
|
end
|
|
@@ -323,7 +329,9 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
|
|
|
323
329
|
bash: [
|
|
324
330
|
'set -e',
|
|
325
331
|
"cd #{repository}/dist/prod/test_policy_1",
|
|
326
|
-
'
|
|
332
|
+
'export SSL_CERT_DIR=/etc/ssl/certs',
|
|
333
|
+
'export TERM=xterm-256color',
|
|
334
|
+
'sudo -E /opt/chef-workstation/bin/chef-client --local-mode --chef-license accept --json-attributes nodes/local.json'
|
|
327
335
|
]
|
|
328
336
|
}
|
|
329
337
|
]
|
|
@@ -352,10 +360,12 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
|
|
|
352
360
|
bash: [
|
|
353
361
|
'set -e',
|
|
354
362
|
"cd #{repository}/dist/prod/test_policy_1",
|
|
355
|
-
'
|
|
356
|
-
'
|
|
357
|
-
'sudo
|
|
358
|
-
'sudo
|
|
363
|
+
'export SSL_CERT_DIR=/etc/ssl/certs',
|
|
364
|
+
'export TERM=xterm-256color',
|
|
365
|
+
'sudo -E /opt/chef-workstation/bin/chef gem install my_gem_1 --version "0.0.1"',
|
|
366
|
+
'sudo -E /opt/chef-workstation/bin/chef gem install my_gem_2 --version "0.0.2"',
|
|
367
|
+
'sudo -E /opt/chef-workstation/bin/chef gem install my_gem_3 --version "~> 1.3"',
|
|
368
|
+
'sudo -E /opt/chef-workstation/bin/chef-client --local-mode --chef-license accept --json-attributes nodes/local.json'
|
|
359
369
|
]
|
|
360
370
|
}
|
|
361
371
|
]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hybrid_platforms_conductor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 33.
|
|
4
|
+
version: 33.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Muriel Salvan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-07-
|
|
11
|
+
date: 2021-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: range_operators
|