hybrid_platforms_conductor 33.7.0 → 33.7.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 +12 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef.rb +22 -13
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/services_deployment_spec.rb +26 -16
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7fbebabd55f289dc72c1882d4d02b1898035593a78cc1396e63e9f3f97405b4
|
|
4
|
+
data.tar.gz: 1b0394745277f497c7083828be1b813fe6ff60c0c6c14f22a0808e88c6d2911f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae3267357ec72113fc39933fd63572dce1017d27162248e6416d7621f543701e20ddc5d155eb4cb7785f572a975304399a6a512940d8c8017af9389251cbc49b
|
|
7
|
+
data.tar.gz: b8eac4d69391f5ed8a5ce9e7c495549cbfac878a9d8847e568f17989a1ed944da7a16bcc9deeebacbee522dc6cd56b937baa0dc50b2ed1070f5a247a090bee9c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [v33.7.1](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.7.0...v33.7.1) (2021-07-09 17:17:18)
|
|
2
|
+
|
|
3
|
+
## Global changes
|
|
4
|
+
### Patches
|
|
5
|
+
|
|
6
|
+
* [[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)
|
|
7
|
+
|
|
8
|
+
## Changes for platform_handler_serverless_chef
|
|
9
|
+
### Patches
|
|
10
|
+
|
|
11
|
+
* [[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)
|
|
12
|
+
|
|
1
13
|
# [v33.7.0](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.6.0...v33.7.0) (2021-07-09 16:32:25)
|
|
2
14
|
|
|
3
15
|
### Features
|
|
@@ -241,18 +241,24 @@ module HybridPlatformsConductor
|
|
|
241
241
|
'--json-attributes', "nodes/#{node}.json"
|
|
242
242
|
]
|
|
243
243
|
client_options << '--why-run' if use_why_run
|
|
244
|
+
# 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.
|
|
245
|
+
client_env = {
|
|
246
|
+
'SSL_CERT_DIR' => '/etc/ssl/certs',
|
|
247
|
+
'TERM' => 'xterm-256color'
|
|
248
|
+
}
|
|
244
249
|
if @nodes_handler.get_use_local_chef_of(node)
|
|
245
250
|
# Just run the chef-client directly from the packaged repository
|
|
246
|
-
sudo_prefix = @cmd_runner.root? ? '' : 'sudo '
|
|
251
|
+
sudo_prefix = @cmd_runner.root? ? '' : 'sudo -E '
|
|
247
252
|
[
|
|
248
253
|
{
|
|
249
254
|
bash: [
|
|
250
255
|
'set -e',
|
|
251
256
|
"cd #{package_dir}"
|
|
252
257
|
] +
|
|
253
|
-
|
|
258
|
+
client_env.map { |var_name, value| "export #{var_name}=#{value}" } +
|
|
259
|
+
gems_to_install.map { |(gem_name, gem_version)| "#{sudo_prefix}/opt/chef-workstation/bin/chef gem install #{gem_name} --version \"#{gem_version}\"" } +
|
|
254
260
|
[
|
|
255
|
-
"#{sudo_prefix}
|
|
261
|
+
"#{sudo_prefix}/opt/chef-workstation/bin/chef-client #{client_options.join(' ')}"
|
|
256
262
|
]
|
|
257
263
|
}
|
|
258
264
|
]
|
|
@@ -270,7 +276,7 @@ module HybridPlatformsConductor
|
|
|
270
276
|
remote_bash: [
|
|
271
277
|
'set -e',
|
|
272
278
|
'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",
|
|
279
|
+
"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
280
|
'mkdir -p ./hpc_deploy',
|
|
275
281
|
'rm -rf ./hpc_deploy/tmp',
|
|
276
282
|
'mkdir -p ./hpc_deploy/tmp',
|
|
@@ -281,16 +287,19 @@ module HybridPlatformsConductor
|
|
|
281
287
|
},
|
|
282
288
|
{
|
|
283
289
|
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 ..'
|
|
290
|
+
remote_bash: {
|
|
291
|
+
commands: [
|
|
292
|
+
'set -e',
|
|
293
|
+
"cd ./hpc_deploy/#{package_name}"
|
|
292
294
|
] +
|
|
293
|
-
|
|
295
|
+
gems_to_install.map { |(gem_name, gem_version)| "#{sudo}/opt/chef/embedded/bin/gem install #{gem_name} --version \"#{gem_version}\"" } +
|
|
296
|
+
[
|
|
297
|
+
"#{sudo}unbuffer /opt/chef/bin/chef-client #{client_options.join(' ')}",
|
|
298
|
+
'cd ..'
|
|
299
|
+
] +
|
|
300
|
+
(log_debug? ? [] : ["#{sudo}rm -rf ./hpc_deploy/#{package_name}"]),
|
|
301
|
+
env: client_env
|
|
302
|
+
}
|
|
294
303
|
}
|
|
295
304
|
]
|
|
296
305
|
end
|
|
@@ -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
|
]
|