kbrew icon indicating copy to clipboard operation
kbrew copied to clipboard

Added dry run flag support for install

Open deepankur797 opened this issue 3 years ago • 1 comments

Used the skip approach , if dry run flag is set.

Example Usage

kbrew install longhorn --dry-run

deepankur797 avatar Nov 30 '21 07:11 deepankur797

hey @deepankur797 , I tried this and could see output as below:

🚀 Installing longhorn app...
Version: 
Pre-install dependencies: 
Post-install dependencies: 
 - ingress-nginx
---
Application to install longhorn 

Application Type helm 
Application URL https://charts.longhorn.io 

Pre Install Dependencies

Manifest 
openssl version 

Manifest 
: "${USERNAME:?Variable USERNAME not set or empty}" : "${PASSWORD:?Variable PASSWORD not set or empty}" 

Manifest 
curl -s https://raw.githubusercontent.com/longhorn/longhorn/v1.1.1/scripts/environment_check.sh | bash 

Manifest 
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn-manager/master/deploy/prerequisite/longhorn-iscsi-installation.yaml 

Post Install Dependencies

Application ingress-nginx

Manifest 
kubectl -n longhorn-system create secret generic basic-auth --from-literal=auth=$(echo ${USERNAME}:$(echo ${PASSWORD} | openssl passwd -stdin -apr1))

Few things:

  • The dry-run option should print everything which will be installed, even the arguments. It should also evaluate the Go templates which show the actual values that will be used.
  • I am wondering if it should also detail the helm apps.

About the visuals

  • The first 5 lines of the above output seem repetitive
  • Some separator would be good to have, like `Application Type : helm
  • All steps are labelled as manifests, which should not be the case
  • Some separation between, pre/post installs would be good to have

sahil-lakhwani avatar Jan 26 '22 15:01 sahil-lakhwani