X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=env%2Flib%2Fcommon.sh;h=7a91208d06cdf94e86f88fad747f663ab432cd28;hb=818ebd97b869309fefa0cc102ab0a9f067f9a51d;hp=56d19ba72cfe632099c30bf9a18ad5aba43c822b;hpb=308b436e60c4f9477641a196fe5a53996fd9bc92;p=icn.git diff --git a/env/lib/common.sh b/env/lib/common.sh index 56d19ba..7a91208 100755 --- a/env/lib/common.sh +++ b/env/lib/common.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash set -eu -o pipefail -DOWNLOAD_PATH=${DOWNLOAD_PATH:-/opt/icn} - IRONIC_DATA_DIR=${IRONIC_DATA_DIR:-"/opt/ironic"} +NODES_FILE=${NODES_FILE:-"${IRONIC_DATA_DIR}/nodes.json"} #IRONIC_PROVISIONING_INTERFACE is required to be provisioning, don't change it IRONIC_INTERFACE=${IRONIC_INTERFACE:-} IRONIC_PROVISIONING_INTERFACE=${IRONIC_PROVISIONING_INTERFACE:-"provisioning"} @@ -18,7 +17,22 @@ BMOREPO="${BMOREPO:-https://github.com/metal3-io/baremetal-operator.git}" BMOPATH="/opt/src/github.com/metal3-io/baremetal-operator" #Bare Metal Operator version to use BMO_VERSION="capm3-v0.5.1" -#Discard existing baremetal operator repo directory + +#KuD repository URL +KUDREPO="${KUDREPO:-https://github.com/onap/multicloud-k8s.git}" +#Path to clone the KuD repo +KUDPATH="/opt/src/github.com/onap/multicloud-k8s" +#KuD version to use +KUD_VERSION="ed96bca7fe415f1636d82c26af15d7474bdfe876" + +#EMCO repository URL +EMCOREPO="${EMCOREPO:-https://github.com/open-ness/EMCO.git}" +#Path to clone the EMCO repo +EMCOPATH="/opt/src/github.com/open-ness/EMCO" +#EMCO version to use +EMCO_VERSION="openness-21.03.06" + +#Discard existing repo directory FORCE_REPO_UPDATE="${FORCE_REPO_UPDATE:-true}" # The kustomize version to use @@ -27,9 +41,15 @@ KUSTOMIZE_VERSION="v4.3.0" #Cluster API version to use CAPI_VERSION="v0.4.3" +#Cluster API version to use +CAPM3_VERSION="v0.5.1" + #The flux version to use FLUX_VERSION="0.20.0" +#The sops version to use +SOPS_VERSION="v3.7.1" + #refered from onap function call_api { #Runs curl with passed flags and provides @@ -62,8 +82,6 @@ function call_api { } function list_nodes { - NODES_FILE="${IRONIC_DATA_DIR}/nodes.json" - if [ ! -f "$NODES_FILE" ]; then exit 1 fi @@ -104,12 +122,47 @@ function list_nodes { fi } +function node_userdata { + name="$1" + username="$2" + password="$3" + COMPUTE_NODE_FQDN="$name.akraino.icn.org" + + # validate that the user isn't expecting the deprecated + # COMPUTE_NODE_PASSWORD to be used + if [ "$password" != "${COMPUTE_NODE_PASSWORD:-$password}" ]; then + cat <