Skip to content

Instantly share code, notes, and snippets.

@brusMX
Last active July 27, 2018 21:28
Show Gist options
  • Save brusMX/b8ba89a4ce7063363315e6ce69b4a1d3 to your computer and use it in GitHub Desktop.
Save brusMX/b8ba89a4ce7063363315e6ce69b4a1d3 to your computer and use it in GitHub Desktop.
test export vars
#!/bin/bash
# Check if all the variables are there to execute:
# https://raw.githubusercontent.com/Microsoft/openshift-container-platform/master/scripts/deployOpenShift.sh
export SUDOUSER=$1
export PASSWORD="$2"
export MASTER=$3
export MASTERPUBLICIPHOSTNAME=$4
export MASTERPUBLICIPADDRESS=$5
export INFRA=$6
export NODE=$7
export NODECOUNT=$8
export INFRACOUNT=$9
export MASTERCOUNT=${10}
export ROUTING=${11}
export REGISTRYSA=${12}
export ACCOUNTKEY="${13}"
export METRICS=${14}
export LOGGING=${15}
export TENANTID=${16}
export SUBSCRIPTIONID=${17}
export AADCLIENTID=${18}
export AADCLIENTSECRET="${19}"
export RESOURCEGROUP=${20}
export LOCATION=${21}
export AZURE=${22}
export STORAGEKIND=${23}
export ENABLECNS=${24}
export CNS=${25}
export CNSCOUNT=${26}
export VNETNAME=${27}
export NODENSG=${28}
export NODEAVAILIBILITYSET=${29}
function write_status(){
cat <<EOT > vars.config
export SUDOUSER="`echo $SUDOUSER`"
export PASSWORD="`echo $PASSWORD`"
export MASTER="`echo $MASTER`"
export MASTERPUBLICIPHOSTNAME="`echo $MASTERPUBLICIPHOSTNAME`"
export MASTERPUBLICIPADDRESS="`echo $MASTERPUBLICIPADDRESS`"
export INFRA="`echo $INFRA`"
export NODE="`echo $NODE`"
export NODECOUNT="`echo $NODECOUNT`"
export INFRACOUNT="`echo $INFRACOUNT`"
export MASTERCOUNT="`echo $MASTERCOUNT`"
export ROUTING="`echo $ROUTING`"
export REGISTRYSA="`echo $REGISTRYSA`"
export ACCOUNTKEY="`echo $ACCOUNTKEY`"
export METRICS="`echo $METRICS`"
export LOGGING="`echo $LOGGING`"
export TENANTID="`echo $TENANTID`"
export SUBSCRIPTIONID="`echo $SUBSCRIPTIONID`"
export AADCLIENTID="`echo $AADCLIENTID`"
export AADCLIENTSECRET="`echo $AADCLIENTSECRET`"
export RESOURCEGROUP="`echo $RESOURCEGROUP`"
export LOCATION="`echo $LOCATION`"
export AZURE="`echo $AZURE`"
export STORAGEKIND="`echo $STORAGEKIND`"
export ENABLECNS="`echo $ENABLECNS`"
export CNS="`echo $CNS`"
export CNSCOUNT="`echo $CNSCOUNT`"
export VNETNAME="`echo $VNETNAME`"
export NODENSG="`echo $NODENSG`"
export NODEAVAILIBILITYSET="`echo $NODEAVAILIBILITYSET`"
EOT
}
write_status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment