UNCLASSIFIED - NO CUI

Skip to content

#2291 : Remove cmdarg dependency

Andrew Kesterson requested to merge 2291_quickstart_no_cmdarg into 2291_quickstart

General MR

Summary

Since there has been some controversy over how to manage a bash script with a dependency, this removes the dependency. The cmdarg library dependency has been removed and all argument parsing is now done with only shell builtins.

The code is significantly more verbose, but accomplishes the same goals.

Relevant logs/screenshots

$ bash ./docs/assets/scripts/quickstart.sh -h                                                                                                          
quickstart.sh (C) 2025 : PlatformOne Big Bang team                                                                                                     
                                                                                                                                                       
PlatformOne Big Bang quickstart : Quickly deploy a development bigbang cluster on a VM                                                                 
                                                                                                                                                       
Optional Arguments:                                                                                                                                    
    -H,--host v : String. IP or Hostname of the VM to operate on                                                                                       
    -P,--privateip v : String. If your VM has a separate private IP in addition to the public host, provide it here                                    
    -U,--username v : String. Username to use when SSHing into the target VM                                                                           
    -K,--keyfile v : String. SSH Key file to use when SSHing into the target VM                                                                        
    -V,--version v : String. Big Bang version to deploy (Default "latest")                                                                             
    -v,--pipeline-templates-version v : String. Version of the bigbang pipeline-templates to use (Default "master")                                    
    -R,--repolocation v : String. Location on your host filesystem where bigbang should be checked out (Default "/Users/andrewkesterson/tmp/repo1.dso.m
il")                                                                                                                                                   
    -u,--registry1-username v : String. Username for your account on registry1.dso.mil (Default "AndrewKesterson")                                     
    -t,--registry1-token v : String. Access token for your account on registry1.dso.mil (Default "LLz4FHQAL8jFLAR5e5rCSa26UOgujnvE")                   
    -c,--cloud-provider v : String. If using cloud provisioning, which cloud provider should be used (Default "aws")                                   
    -m,--metallb : Boolean. Deploy a MetalLB on k3d                                                                                                    
    -p,--provision : Boolean. Provision the k3d cluster (implied)                                                                                      
    -d,--deploy : Boolean. Deploy bigbang (implied)                                                                                                    
    -w,--wait : Boolean. Wait for bigbang (implied by --deploy)                                                                                        
    -D,--destroy : Boolean. Destroy any previously created quickstart instance(s) created by this tool. (Disables -p, -d, -w)

Script performance appears to be unchanged. I've only lightly tested this. But the logic is unchanged, only the variables used to store command flags. I'm able to quickstart an AWS instance, haven't checked self-hosted yet, but should be same.

==================================================================================
                          INSTALLATION   COMPLETE

To access your kubernetes cluster via kubectl, export this variable in your shell:

    export KUBECONFIG=/Users/andrewkesterson/.kube/Andrew.Kesterson-dev-quickstart-config

To access your kubernetes cluster in your browser, add this line to your hosts file:

    15.205.136.164        kiali.dev.bigbang.mil grafana.dev.bigbang.mil alertmanager.dev.bigbang.mil    prometheus.dev.bigbang.mil      neuvector.dev.bigbang.mil      tracing.dev.bigbang.mil

To SSH to the instance running your cluster, use this command:

    ssh -i ~/.ssh/Andrew.Kesterson-dev-quickstart.pem -o StrictHostKeyChecking=no -o IdentitiesOnly=yes ubuntu@15.205.136.164
==================================================================================

Linked Issue

#2291

Upgrade Notices

N/A

Edited by Andrew Kesterson

Merge request reports

Loading