Seagate / cortx-k8s

CORTX Kubernetes Orchestration Repository
https://github.com/Seagate/cortx
Apache License 2.0
6 stars 47 forks source link

CORTX-29540: Move deploy final message to Chart #328

Closed keithpine closed 2 years ago

keithpine commented 2 years ago

Description

Move the final message from the Bash deployment script into the Helm Chart NOTES.txt template. The notes are printed at the end of the chart installation, and since it's a template it has the ability to embed Release-specific values, like service names and input parameters, which aren't as easily retrieved in the Bash script. Regardless, this removes some dependency on the Bash script.

You can re-read the notes again after the Chart install from the helm CLI command, e.g. helm get notes cortx, so any instructions are not lost upon clearing/closing a terminal session.

Type of change

Applicable issues

How was this tested?

Ran normal deployment. Here's what the new output looks like:

######################################################
# Deploy CORTX
######################################################
NAME: cortx
LAST DEPLOYED: Thu Jul 14 14:21:18 2022
NAMESPACE: cortx
STATUS: deployed
REVISION: 1
NOTES:
CHART NAME: cortx
CHART VERSION: 0.1.0
APP VERSION: 2.0.0-859

Thanks for installing CORTX Community Object Storage!

** Please wait while CORTX Kubernetes resources are being deployed. **

The S3 data service is accessible through the "cortx-server-0" Service.
Execute the following commands to get the S3 admin user IAM credentials:

  echo "Access Key: sgiamadmin"
  echo "Secret Key: $(kubectl -n cortx get secret cortx-secret -o jsonpath="{.data.s3_auth_admin_secret}" | base64 -d)"

The CORTX control API is accessible through the "cortx-control" Service.
Execute the following commands to get the Control admin user credentials:

  echo "Username: cortxadmin"
  echo "Password: $(kubectl -n cortx get secret cortx-secret -o jsonpath="{.data.csm_mgmt_admin_secret}" | base64 -d)"

Now waiting for all CORTX resources to become available, press Ctrl-C to quit...

Waiting for deployment "cortx-ha" rollout to finish: 0 of 1 updated replicas are available...
Waiting for deployment "cortx-control" rollout to finish: 0 of 1 updated replicas are available...
<... snip ...>

$ echo "Access Key: sgiamadmin"
Access Key: sgiamadmin

$ echo "Secret Key: $(kubectl -n cortx get secret cortx-secret -o jsonpath="{.data.s3_auth_admin_secret}" | base64 -d)"
Secret Key: my-secret-key

$ echo "Username: cortxadmin"
Username: cortxadmin

$ echo "Password: $(kubectl -n cortx get secret cortx-secret -o jsonpath="{.data.csm_mgmt_admin_secret}" | base64 -d)"
Password: mypassword

Here's the output from helm install --dry-run.

Server disabled:

$ helm install --dry-run foobar charts/cortx --set existingSecret=abcd,server.enabled=false | tail -n15

NOTES:
CHART NAME: cortx
CHART VERSION: 0.1.0
APP VERSION: 2.0.0-859

Thanks for installing CORTX Community Object Storage!

** Please wait while CORTX Kubernetes resources are being deployed. **

The CORTX control API is accessible through the "foobar-cortx-control" Service.
Execute the following commands to get the Control admin user credentials:

  echo "Username: cortxadmin"
  echo "Password: $(kubectl -n cortx get secret abcd -o jsonpath="{.data.csm_mgmt_admin_secret}" | base64 -d)"

Control disabled:

 $ helm install --namespace=test --dry-run foobar charts/cortx --set existingSecret=abcd,control.enabled=false | tail -n15

NOTES:
CHART NAME: cortx
CHART VERSION: 0.1.0
APP VERSION: 2.0.0-859

Thanks for installing CORTX Community Object Storage!

** Please wait while CORTX Kubernetes resources are being deployed. **

The S3 data service is accessible through the "foobar-cortx-server-0" Service.
Execute the following commands to get the S3 admin user IAM credentials:

  echo "Access Key: cortx-admin"
  echo "Secret Key: $(kubectl -n test get secret abcd -o jsonpath="{.data.s3_auth_admin_secret}" | base64 -d)"

Both Server and Control disabled:

$ helm install --namespace=test --dry-run foobar charts/cortx --set existingSecret=abcd,server.enabled=false,control.enabled=false | tail -n9

NOTES:
CHART NAME: cortx
CHART VERSION: 0.1.0
APP VERSION: 2.0.0-859

Thanks for installing CORTX Community Object Storage!

** Please wait while CORTX Kubernetes resources are being deployed. **

Additional information

I changed the wording of the output a little bit.

Checklist

If this change requires newer CORTX or third party image versions:

If this change addresses a CORTX Jira issue: