X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=env%2Flib%2Fcommon.sh;h=7a91208d06cdf94e86f88fad747f663ab432cd28;hb=818ebd97b869309fefa0cc102ab0a9f067f9a51d;hp=052c3ea69f20a54b75c63e95a809415943f6b0f8;hpb=d79fe7fb70706331c8dd3eeeadf3d01caf3949e2;p=icn.git diff --git a/env/lib/common.sh b/env/lib/common.sh index 052c3ea..7a91208 100755 --- a/env/lib/common.sh +++ b/env/lib/common.sh @@ -2,13 +2,14 @@ set -eu -o pipefail 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"} IRONIC_IPMI_INTERFACE=${IRONIC_IPMI_INTERFACE:-} IRONIC_PROVISIONING_INTERFACE_IP=${IRONIC_PROVISIONING_INTERFACE_IP:-"172.22.0.1"} -BM_IMAGE_URL=${BM_IMAGE_URL:-"https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img"} -BM_IMAGE=${BM_IMAGE:-"bionic-server-cloudimg-amd64.img"} +BM_IMAGE_URL=${BM_IMAGE_URL:-"https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"} +BM_IMAGE=${BM_IMAGE:-"focal-server-cloudimg-amd64.img"} #Baremetal operator repository URL BMOREPO="${BMOREPO:-https://github.com/metal3-io/baremetal-operator.git}" @@ -40,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 @@ -75,8 +82,6 @@ function call_api { } function list_nodes { - NODES_FILE="${IRONIC_DATA_DIR}/nodes.json" - if [ ! -f "$NODES_FILE" ]; then exit 1 fi @@ -117,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 <