-
Notifications
You must be signed in to change notification settings - Fork 54
[CHEF-29379] Install.sh/ps1 updates for chef-ice #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ashique Saidalavi <Ashique.saidalavi@progress.com>
|
| determine_package_type() { | ||
| case "$platform" in | ||
| "debian"|"ubuntu"|"linuxmint") | ||
| echo "deb" | ||
| ;; | ||
| "centos"|"redhat"|"fedora"|"rocky"|"amazon"|"el") | ||
| echo "rpm" | ||
| ;; | ||
| "sles"|"opensuseleap") | ||
| echo "rpm" | ||
| ;; | ||
| "aix") | ||
| echo "bff" | ||
| ;; | ||
| "solaris2") | ||
| echo "pkg" | ||
| ;; | ||
| "mac_os_x") | ||
| echo "dmg" | ||
| ;; | ||
| *) | ||
| echo "Unknown package type" | ||
| report_bug | ||
| exit 1 | ||
| ;; | ||
| esac | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This limit's what OS's are able to download where in the past due to many debian/ubuntu/rhel variants out there we have supported chef-client being able to be installed on those systems but are not officially supported and are self-supported by the users.
| if test -d "/opt/$project" && test "x$install_strategy" = "xonce"; then | ||
| echo "$project installation detected" | ||
| echo "install_strategy set to 'once'" | ||
| echo "Nothing to install" | ||
| exit | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only checks for the omnibus version of chef-client and doesn't support the new habitat pathing/packaging check. So chef-ice will repeat installing on every test-kitchen subsequent runs.
| # $tmp_dir: | ||
| # | ||
| # $license_id | ||
| # $package_manager: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this new package_manager do and or used for? how does this affect linux clients?



Description
This is a follow-up PR for #408. In this PR, we're primarily focusing on synchronising the install.sh/ps1 templates with the latest versions from the download APIs and adding support for the chef-ice product.
The changes enhance both Bash (install.sh) and PowerShell (install.ps1) script templates to support:
package_manager(pm) parameter instead ofplatform_version(pv)Changes Made
Bash Script Templates (Bourne)
Modified Files:
lib/mixlib/install/generator/base.rb
omnitruck_endpointcalculation logic based on license_idlib/mixlib/install/generator/bourne.rb
base_urlandlicense_idcontext to fetch_package.sh.erblib/mixlib/install/generator/bourne/scripts/platform_detection.sh
determine_package_type()function for detecting .rpm, .deb, .msi, .pkg, .dmg extensionslib/mixlib/install/generator/bourne/scripts/script_cli_parameters.sh.erb
-ifor package_manager parameterlib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
modify_responsefunction for JSON to text format conversionlib/mixlib/install/generator/bourne/scripts/fetch_package.sh → fetch_package.sh.erb
lib/mixlib/install/generator/bourne/scripts/helpers.sh.erb
modify_response()function to convert JSON API responses to text formatPowerShell Script Templates
Modified Files:
New Files:
Get-ProjectFileNamefor fetching actual filenames from /fileName endpointUpdated Files:
lib/mixlib/install/generator/powershell/scripts/get_project_metadata.ps1.erb
package_managerparameter (validateset: msi, pm)lib/mixlib/install/generator/powershell/scripts/install_project.ps1.erb
package_managerparameter with automatic detectionRelated Issue
Types of changes
Checklist:
Gemfile.lockhas changed, I have used--conservativeto do it and included the full output in the Description above.