hybrid_platforms_conductor 33.9.4 → 34.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/CHANGELOG.md +16 -0
- data/README.md +3 -1
- data/bin/free_veids +1 -1
- data/bin/last_deploys +1 -1
- data/bin/nodes_to_deploy +3 -3
- data/docs/gen/mermaid/README.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/check-node.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/deploy.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/free_ips.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/free_veids.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/get_impacted_nodes.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/last_deploys.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/nodes_to_deploy.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/report.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/run.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/setup.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/ssh_config.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/test.md-0.png +0 -0
- data/lib/hybrid_platforms_conductor/core_extensions/bundler/without_bundled_env.rb +1 -1
- data/lib/hybrid_platforms_conductor/core_extensions/cleanroom/fix_kwargs.rb +1 -0
- data/lib/hybrid_platforms_conductor/credentials.rb +1 -1
- data/lib/hybrid_platforms_conductor/current_dir_monitor.rb +3 -3
- data/lib/hybrid_platforms_conductor/deployer.rb +1 -1
- data/lib/hybrid_platforms_conductor/executable.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/host_ip.rb +2 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/cmdb/host_keys.rb +2 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/connector/ssh.rb +9 -7
- data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/serverless_chef/recipes_tree_builder.rb +2 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/yaml_inventory.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox/proxmox_waiter.rb +1 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox/reserve_proxmox_container +2 -2
- data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox.rb +1 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/report/confluence.rb +1 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/secrets_reader/keepass.rb +3 -2
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/executables.rb +5 -5
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/linear_strategy.rb +5 -5
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/veids.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/confluence.rb +1 -0
- data/lib/hybrid_platforms_conductor/json_dumper.rb +1 -1
- data/lib/hybrid_platforms_conductor/logger_helpers.rb +6 -6
- data/lib/hybrid_platforms_conductor/nodes_handler.rb +4 -6
- data/lib/hybrid_platforms_conductor/parallel_threads.rb +1 -1
- data/lib/hybrid_platforms_conductor/platform_handler.rb +1 -1
- data/lib/hybrid_platforms_conductor/platforms_handler.rb +1 -1
- data/lib/hybrid_platforms_conductor/services_handler.rb +6 -6
- data/lib/hybrid_platforms_conductor/test_report.rb +4 -4
- data/lib/hybrid_platforms_conductor/tests_runner.rb +3 -0
- data/lib/hybrid_platforms_conductor/thycotic.rb +2 -2
- data/lib/hybrid_platforms_conductor/topographer.rb +2 -2
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/connections_spec.rb +3 -10
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/global_helpers_spec.rb +1 -6
- data/spec/hybrid_platforms_conductor_test/api/credentials_spec.rb +13 -13
- data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/docker/Dockerfile +1 -1
- data/spec/hybrid_platforms_conductor_test/api/deployer/provisioners/docker_spec.rb +3 -3
- data/spec/hybrid_platforms_conductor_test/api/deployer/secrets_reader_plugins/keepass_spec.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs/config_spec.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/nodes_handler/cmdbs_plugins_api_spec.rb +3 -3
- data/spec/hybrid_platforms_conductor_test/api/nodes_handler/config_dsl_spec.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/nodes_handler/git_diff_impacts_spec.rb +2 -2
- data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/packaging_spec.rb +2 -2
- data/spec/hybrid_platforms_conductor_test/api/platforms_handler_spec.rb +3 -3
- data/spec/hybrid_platforms_conductor_test/api/plugins_spec.rb +1 -3
- data/spec/hybrid_platforms_conductor_test/api/services_handler/deploy_allowed_spec.rb +9 -9
- data/spec/hybrid_platforms_conductor_test/api/tests_runner/common_spec.rb +5 -5
- data/spec/hybrid_platforms_conductor_test/api/tests_runner/node_check_spec.rb +2 -2
- data/spec/hybrid_platforms_conductor_test/api/tests_runner/reports_spec.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/tests_runner/test_plugins/linear_strategy_spec.rb +69 -0
- data/spec/hybrid_platforms_conductor_test/executables/options/common_spec.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/helpers/connector_ssh_helpers.rb +4 -6
- data/spec/hybrid_platforms_conductor_test/helpers/deployer_helpers.rb +3 -3
- data/spec/hybrid_platforms_conductor_test/helpers/executables_helpers.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/helpers/provisioner_proxmox_helpers.rb +4 -4
- data/spec/hybrid_platforms_conductor_test/serverless_chef_repositories/recipes/cookbooks/test_cookbook_3/recipes/35_unparsable_include.rb +2 -2
- data/spec/hybrid_platforms_conductor_test/test_log_no_read_plugin.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/test_log_plugin.rb +1 -1
- data/spec/hybrid_platforms_conductor_test.rb +3 -2
- metadata +171 -244
@@ -43,12 +43,10 @@ module HybridPlatformsConductorTest
|
|
43
43
|
ssh_commands_per_connection = []
|
44
44
|
if with_strict_host_key_checking
|
45
45
|
ip = node_connection_info[:ip] || node_connection_info[:connection]
|
46
|
-
ssh_commands_once.
|
46
|
+
ssh_commands_once.push(
|
47
47
|
[
|
48
|
-
[
|
49
|
-
|
50
|
-
proc { [0, "#{ip} ssh-rsa fake_host_key_for_#{ip}", ''] }
|
51
|
-
]
|
48
|
+
"ssh-keyscan -p #{node_connection_info[:port]} #{ip}",
|
49
|
+
proc { [0, "#{ip} ssh-rsa fake_host_key_for_#{ip}", ''] }
|
52
50
|
]
|
53
51
|
)
|
54
52
|
end
|
@@ -144,7 +142,7 @@ module HybridPlatformsConductorTest
|
|
144
142
|
with_cmd_runner_mocked(
|
145
143
|
[
|
146
144
|
['which env', proc { [0, "/usr/bin/env\n", ''] }],
|
147
|
-
['ssh -V 2>&1', proc { [0, "
|
145
|
+
['ssh -V 2>&1', proc { [0, "OpenSSH_9.8p1 Debian-10+deb9u7, OpenSSL 1.0.2u 20 Dec 2019\n", ''] }]
|
148
146
|
] +
|
149
147
|
(password ? [['sshpass -V', proc { [0, "sshpass 1.06\n", ''] }]] : []) +
|
150
148
|
ssh_expected_commands_for(
|
@@ -97,7 +97,7 @@ module HybridPlatformsConductorTest
|
|
97
97
|
# Parameters::
|
98
98
|
# * *services* (Hash<String, Array<String> >): List of services to be expected, per node name
|
99
99
|
def expect_services_handler_to_deploy(services)
|
100
|
-
expect(test_services_handler).to receive(:
|
100
|
+
expect(test_services_handler).to receive(:barrier_to_deploy).with(
|
101
101
|
services: services,
|
102
102
|
local_environment: false
|
103
103
|
).and_return(nil)
|
@@ -187,7 +187,7 @@ module HybridPlatformsConductorTest
|
|
187
187
|
# Parameters::
|
188
188
|
# * *nodes_info* (Hash): Node info to give the platform [default: 1 node having 1 service]
|
189
189
|
# * *expect_services_to_deploy* (Hash<String,Array<String>>): Expected services to be deployed [default: all services from nodes_info]
|
190
|
-
# * *expect_deploy_allowed* (Boolean): Should we expect the call to
|
190
|
+
# * *expect_deploy_allowed* (Boolean): Should we expect the call to barrier_to_deploy [default: true]
|
191
191
|
# * *expect_package* (Boolean): Should we expect packaging? [default: true]
|
192
192
|
# * *expect_prepare_for_deploy* (Boolean): Should we expect calls to prepare for deploy? [default: true]
|
193
193
|
# * *expect_connections_to_nodes* (Boolean): Should we expect connections to nodes? [default: true]
|
@@ -223,7 +223,7 @@ module HybridPlatformsConductorTest
|
|
223
223
|
with_test_platform(nodes_info, as_git: !check_mode, additional_config: "#{additional_config}\nsend_logs_to :test_log") do |repository|
|
224
224
|
# Mock the ServicesHandler accesses
|
225
225
|
if !check_mode && expect_deploy_allowed
|
226
|
-
expect(test_services_handler).to receive(:
|
226
|
+
expect(test_services_handler).to receive(:barrier_to_deploy).with(
|
227
227
|
services: expect_services_to_deploy,
|
228
228
|
local_environment: expect_local_environment
|
229
229
|
).and_return(nil)
|
@@ -62,7 +62,7 @@ module HybridPlatformsConductorTest
|
|
62
62
|
allow(component_class).to(receive(:new).once { component })
|
63
63
|
end
|
64
64
|
# Run the executable
|
65
|
-
args.
|
65
|
+
args.push('--debug') if ENV['TEST_DEBUG'] == '1'
|
66
66
|
ARGV.replace(args)
|
67
67
|
old_program_name = $PROGRAM_NAME
|
68
68
|
$0 = executable
|
@@ -359,7 +359,7 @@ module HybridPlatformsConductorTest
|
|
359
359
|
end
|
360
360
|
]
|
361
361
|
if destroy_vm
|
362
|
-
runs.
|
362
|
+
runs.push(
|
363
363
|
proc do |actions|
|
364
364
|
expect(actions.keys).to eq ['node']
|
365
365
|
expect(actions['node'].size).to eq 4
|
@@ -409,7 +409,7 @@ module HybridPlatformsConductorTest
|
|
409
409
|
#{JSON.pretty_generate(result)}
|
410
410
|
EO_STDOUT
|
411
411
|
end
|
412
|
-
|
412
|
+
)
|
413
413
|
end
|
414
414
|
expect_actions_executor_runs runs
|
415
415
|
end
|
@@ -722,12 +722,12 @@ module HybridPlatformsConductorTest
|
|
722
722
|
unless create.nil?
|
723
723
|
create_file = "#{@repository}/proxmox/create_vm.json"
|
724
724
|
File.write(create_file, create.to_json)
|
725
|
-
script_args.
|
725
|
+
script_args.push('--create', create_file)
|
726
726
|
end
|
727
727
|
unless destroy.nil?
|
728
728
|
destroy_file = "#{@repository}/proxmox/destroy_vm.json"
|
729
729
|
File.write(destroy_file, destroy.to_json)
|
730
|
-
script_args.
|
730
|
+
script_args.push('--destroy', destroy_file)
|
731
731
|
end
|
732
732
|
# Call the script by loading the Ruby file mocking the ARGV and ENV variables
|
733
733
|
old_argv = ARGV.dup
|
@@ -1,5 +1,5 @@
|
|
1
|
-
cookbook_name = ENV
|
2
|
-
recipe_name = ENV
|
1
|
+
cookbook_name = ENV.fetch('cookbook_name', nil)
|
2
|
+
recipe_name = ENV.fetch('recipe_name', nil)
|
3
3
|
# rubocop:disable Style/StringConcatenation
|
4
4
|
include_recipe(
|
5
5
|
cookbook_name + '::' + recipe_name
|
@@ -31,7 +31,7 @@ module HybridPlatformsConductorTest
|
|
31
31
|
node: node,
|
32
32
|
services: services,
|
33
33
|
# Don't store the date
|
34
|
-
deployment_info: deployment_info.
|
34
|
+
deployment_info: deployment_info.except(:date),
|
35
35
|
exit_status: exit_status,
|
36
36
|
stdout: stdout,
|
37
37
|
stderr: stderr
|
@@ -31,7 +31,7 @@ module HybridPlatformsConductorTest
|
|
31
31
|
node: node,
|
32
32
|
services: services,
|
33
33
|
# Don't store the date
|
34
|
-
deployment_info: deployment_info.
|
34
|
+
deployment_info: deployment_info.except(:date),
|
35
35
|
exit_status: exit_status,
|
36
36
|
stdout: stdout,
|
37
37
|
stderr: stderr
|
@@ -154,6 +154,7 @@ module HybridPlatformsConductorTest
|
|
154
154
|
FileUtils.rm_rf './run_logs'
|
155
155
|
FileUtils.rm_rf './testadmin.key.pub'
|
156
156
|
FileUtils.rm_rf '/tmp/hpc_ssh'
|
157
|
+
FileUtils.rm_rf './test_stdout'
|
157
158
|
register_plugins(
|
158
159
|
:log,
|
159
160
|
{
|
@@ -204,8 +205,8 @@ module HybridPlatformsConductorTest
|
|
204
205
|
logger.level = Logger::DEBUG
|
205
206
|
logger
|
206
207
|
else
|
207
|
-
# Still put the level, as when testing executables we
|
208
|
-
Logger.new('
|
208
|
+
# Still put the level, as when testing executables we use a file to test logs
|
209
|
+
Logger.new('./test_stdout', level: :info)
|
209
210
|
end
|
210
211
|
end
|
211
212
|
|