BUILDDIR=${SCRIPTDIR/deploy/build}
mkdir -p ${BUILDDIR}
+function install_deps {
+ apt-get install -y jq
+}
+
function is_emco_ready {
local -r cluster_name=${CLUSTER_NAME:-icn}
local -r cluster_kubeconfig="${BUILDDIR}/${cluster_name}.conf"
}
function test_addons {
+ install_deps
+
# Create a temporary kubeconfig file for the tests
local -r cluster_name=${CLUSTER_NAME:-icn}
local -r cluster_kubeconfig="${BUILDDIR}/${cluster_name}.conf"
clusterctl -n metal3 get kubeconfig ${cluster_name} >${cluster_kubeconfig}
clone_kud_repository
+ # The vFW test in EMCO v21.12 does not use KubeVirt, so patch the
+ # KuD test and continue to use it
+ pushd ${KUDPATH}
+ patch -p1 --forward <${SCRIPTDIR}/plugin_fw_v2.patch || true
+ popd
+
pushd ${KUDPATH}/kud/tests
failed_kud_tests=""
container_runtime=$(KUBECONFIG=${cluster_kubeconfig} kubectl get nodes -o jsonpath='{.items[].status.nodeInfo.containerRuntimeVersion}')
KUD_VERSION="8157bf63753839ce4e9006978816fad3f63ca2de"
#EMCO repository URL
- EMCOREPO="${EMCOREPO:-https://github.com/open-ness/EMCO.git}"
+ EMCOREPO="${EMCOREPO:-https://gitlab.com/project-emco/core/emco-base.git}"
#Path to clone the EMCO repo
- EMCOPATH="/opt/src/github.com/open-ness/EMCO"
+ EMCOPATH="/opt/src/emco-base"
#EMCO version to use
- EMCO_VERSION="openness-21.03.06"
+ EMCO_VERSION="v21.12"
#Discard existing repo directory
FORCE_REPO_UPDATE="${FORCE_REPO_UPDATE:-false}"
clone_repository ${EMCOPATH} ${EMCOREPO} ${EMCO_VERSION}
}
-function install_kustomize {
- curl -sL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" -o kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz
- tar xzf kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz --no-same-owner
- sudo install -o root -g root -m 0755 kustomize /usr/local/bin/kustomize
- rm kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz kustomize
- kustomize version
-}
-
-function install_clusterctl {
- curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/${CAPI_VERSION}/clusterctl-linux-amd64 -o clusterctl
- sudo install -o root -g root -m 0755 clusterctl /usr/local/bin/clusterctl
- rm clusterctl
- clusterctl version
-}
-
-function install_flux_cli {
- export FLUX_VERSION
- curl -s https://fluxcd.io/install.sh | sudo -E bash
- flux --version
-}
-
-function install_emcoctl {
- clone_emco_repository
- make -C ${EMCOPATH}/src/tools/emcoctl
- sudo install -o root -g root -m 0755 ${EMCOPATH}/bin/emcoctl/emcoctl /usr/local/bin/emcoctl
-}
-
-function install_sops {
- curl -L https://github.com/mozilla/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux -o sops
- sudo install -o root -g root -m 0755 sops /usr/local/bin/sops
- rm sops
- sops --version
-}
-
function fetch_image {
if [[ "${BM_IMAGE_URL}" && "${BM_IMAGE}" ]]; then
mkdir -p "${IRONIC_DATA_DIR}/html/images"