Skip to content
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

script CLI helm installation for OCP #39

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Fortune-Ndlovu
Copy link

Issue: RHIDP-2706 - script CLI helm installation for OCP

FYI this script has gone through iterative improvements and has been approved #27 - more feedback is welcome on this PR.

Continued from RHIDP-2614 re: redhat-developer/red-hat-developers-documentation-rhdh#287

Instead of giving people 20 steps to iterate though, AND having the same steps captured by QE when doing install validation tests, we should instead:

  • create a script that can handle both install paths
  • link to that from the docs
  • reuse it in testing

The script does the following:

  • detect if oc is installed; fail if not found and report error to the user with a call to action re: installing it
  • detect if the user is logged into a cluster and fail if not with a call to action (oc command to log in)
  • if cluster router base can be detected, use that value to update the helm chart installation; if not, fail and request user pass in command line flag as cluster router base could not be detected (can test this failure case with dev sandbox; can test passing case with clusterbot)

The script should be stored in https://github.com/redhat-developer/rhdh-chart/ using a similar documentation/script approach to

Checklist

  • Chart version bumped in Chart.yaml according to semver.
  • Variables are documented in the values.yaml and added to the README.md. The pre-commit utility can be used to generate the necessary content. Use pre-commit run -a to apply changes.
  • JSON Schema template updated and re-generated the raw schema via pre-commit hook.
  • List tests pass for Chart using the Chart Testing tool and the ct lint command.

Copy link

sonarcloud bot commented Aug 4, 2024


usage() {
echo "
This script simplifies and automates the installation process of Helm charts on the OpenShift Container Platform (OCP) clusters.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This script simplifies and automates the installation process of Helm charts on the OpenShift Container Platform (OCP) clusters.
This script automates the installation of Helm charts on OpenShift Container Platform (OCP).

usage() {
echo "
This script simplifies and automates the installation process of Helm charts on the OpenShift Container Platform (OCP) clusters.
It ensures that the user is logged into a cluster and attempts to detect the cluster router base, updating the Helm chart configuration accordingly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It ensures that the user is logged into a cluster and attempts to detect the cluster router base, updating the Helm chart configuration accordingly.
It ensures that the user is logged in, and detects the cluster router base to configure the Helm chart.


Examples:
$0 # Auto-detects router base and installs the Helm chart
$0 --router-base example.com # Manually specifies the router base and installs the Helm chart
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$0 --router-base example.com # Manually specifies the router base and installs the Helm chart
$0 --router-base apps.example.com # Manually specifies the router base and installs the Helm chart

fi

# Check if required files and directories exist
HELM_CHART_DIR="$(dirname "$0")/../charts/backstage"
Copy link
Member

@nickboldt nickboldt Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using a local path reference to the charts folder will requires that this repo be cloned to be useable.

Is there a way to achieve the same thing from a single command, like https://github.com/rhdh-bot/openshift-helm-charts/blob/rhdh-1-rhel-9/installation/install.sh ? that would mitigate some of the docs team's concerns about usability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants