hybrid_platforms_conductor 32.16.1 → 32.16.2
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 +3 -3
- data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/podman.rb +1 -1
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/packaging_spec.rb +1 -0
- 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: f78c78a80235a940f793af89344e6a972609f92d79ddce8acc6735b0e6b54ceb
|
|
4
|
+
data.tar.gz: 9c0bfef24e47646c61dd79899af40f33f063f90e73a626ed9c2617c7f7933593
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60a24969416d8d674cad078642e575c1b22e3b4457dcabb5a436bf62a597d13388bf042851008d5a3b01a7de82ee6003c6856b90821adddc1436bf2a0ecbfdd1
|
|
7
|
+
data.tar.gz: 83cdf6e30fefad4d1d97cb1e1af84278e71aff6eadac4fe5d27232f70d6537a35a48d0e30494213a616796177fd1e6aa36f26bc6ac86d313b651ca2023ade1a0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [v32.16.2](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.16.1...v32.16.2) (2021-06-01 09:52:22)
|
|
2
|
+
|
|
3
|
+
## Global changes
|
|
4
|
+
### Patches
|
|
5
|
+
|
|
6
|
+
* [[Hotfix(platform_handler_serverless_chef)] Fix Chef Workstation bash steps when run by root](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/1d99d1faa9cf66cd607eacc00205e312fd589715)
|
|
7
|
+
|
|
8
|
+
## Changes for platform_handler_serverless_chef
|
|
9
|
+
### Patches
|
|
10
|
+
|
|
11
|
+
* [[Hotfix(platform_handler_serverless_chef)] Fix Chef Workstation bash steps when run by root](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/1d99d1faa9cf66cd607eacc00205e312fd589715)
|
|
12
|
+
|
|
1
13
|
# [v32.16.1](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v32.16.0...v32.16.1) (2021-06-01 09:21:47)
|
|
2
14
|
|
|
3
15
|
## Global changes
|
|
@@ -84,7 +84,7 @@ module HybridPlatformsConductor
|
|
|
84
84
|
expected_match.nil? ? 'unreadable' : expected_match[1]
|
|
85
85
|
end
|
|
86
86
|
log_debug "Current Chef version: #{existing_version}. Required version: #{required_version}"
|
|
87
|
-
@cmd_runner.run_cmd "curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef-workstation -v #{required_version}" unless existing_version == required_version
|
|
87
|
+
@cmd_runner.run_cmd "curl -L https://omnitruck.chef.io/install.sh | #{@cmd_runner.root? ? '' : 'sudo '}bash -s -- -P chef-workstation -v #{required_version}" unless existing_version == required_version
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
|
|
@@ -178,7 +178,7 @@ module HybridPlatformsConductor
|
|
|
178
178
|
@cmd_runner.run_cmd "cd #{@repository_path} && /opt/chef-workstation/bin/chef install #{policy_file}" unless File.exist?("#{@repository_path}/#{lock_file}")
|
|
179
179
|
extra_cp_data_bags = File.exist?("#{@repository_path}/data_bags") ? " && cp -ar data_bags/ #{package_dir}/" : ''
|
|
180
180
|
@cmd_runner.run_cmd "cd #{@repository_path} && \
|
|
181
|
-
sudo rm -rf #{package_dir} && \
|
|
181
|
+
#{@cmd_runner.root? ? '' : 'sudo '}rm -rf #{package_dir} && \
|
|
182
182
|
/opt/chef-workstation/bin/chef export #{policy_file} #{package_dir}#{extra_cp_data_bags}"
|
|
183
183
|
end
|
|
184
184
|
unless @cmd_runner.dry_run
|
|
@@ -236,7 +236,7 @@ module HybridPlatformsConductor
|
|
|
236
236
|
client_options << '--why-run' if use_why_run
|
|
237
237
|
if @nodes_handler.get_use_local_chef_of(node)
|
|
238
238
|
# Just run the chef-client directly from the packaged repository
|
|
239
|
-
[{ bash: "cd #{package_dir} && sudo SSL_CERT_DIR=/etc/ssl/certs /opt/chef-workstation/bin/chef-client #{client_options.join(' ')}" }]
|
|
239
|
+
[{ bash: "cd #{package_dir} && #{@cmd_runner.root? ? '' : 'sudo '}SSL_CERT_DIR=/etc/ssl/certs /opt/chef-workstation/bin/chef-client #{client_options.join(' ')}" }]
|
|
240
240
|
else
|
|
241
241
|
# Upload the package and run it from the node
|
|
242
242
|
package_name = File.basename(package_dir)
|
|
@@ -112,7 +112,7 @@ module HybridPlatformsConductor
|
|
|
112
112
|
# Result::
|
|
113
113
|
# * String: The Podman command
|
|
114
114
|
def podman_cmd
|
|
115
|
-
@podman_cmd = @cmd_runner.root? ? '
|
|
115
|
+
@podman_cmd = "#{@cmd_runner.root? ? '' : 'sudo '}podman" unless defined?(@podman_cmd)
|
|
116
116
|
@podman_cmd
|
|
117
117
|
end
|
|
118
118
|
|
data/spec/hybrid_platforms_conductor_test/api/platform_handlers/serverless_chef/packaging_spec.rb
CHANGED
|
@@ -44,6 +44,7 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
|
|
|
44
44
|
end +
|
|
45
45
|
if export
|
|
46
46
|
[
|
|
47
|
+
['whoami', proc { [0, 'test_user', ''] }, { optional: true }],
|
|
47
48
|
[
|
|
48
49
|
/^cd #{Regexp.escape(repository)} &&\s+sudo rm -rf dist\/#{Regexp.escape(env)}\/#{Regexp.escape(policy)} &&\s+\/opt\/chef-workstation\/bin\/chef export #{Regexp.escape(policy_file)} dist\/#{Regexp.escape(env)}\/#{Regexp.escape(policy)}#{data_bags ? " && cp -ar data_bags/ dist/#{Regexp.escape(env)}/#{Regexp.escape(policy)}/" : ''}$/,
|
|
49
50
|
proc do
|