Add ruamel.yaml.clib requirement for Python 2.7
[kuberef.git] / functions.sh
index 1a07ec0..c8968a3 100755 (executable)
@@ -179,11 +179,11 @@ provision_hosts() {
 if [ ! -d "${PROJECT_ROOT}/engine" ]; then
     ssh-keygen -t rsa -N "" -f ${PROJECT_ROOT}/.ssh/id_rsa
     git clone https://gerrit.nordix.org/infra/engine.git
-    cp $PROJECT_ROOT/$VENDOR/{pdf.yaml,idf.yaml} \
+    cd ${PROJECT_ROOT}/engine/engine && git checkout ${ENGINE_COMMIT_ID}
+    cp ${PROJECT_ROOT}/${VENDOR}/{pdf.yaml,idf.yaml} \
     ${PROJECT_ROOT}/engine/engine
 fi
-cd ${PROJECT_ROOT}/engine/engine
-./deploy.sh -s ironic -d centos7 \
+${PROJECT_ROOT}/engine/engine/deploy.sh -s ironic -d ${DISTRO} \
 -p file:///${PROJECT_ROOT}/engine/engine/pdf.yaml \
 -i file:///${PROJECT_ROOT}/engine/engine/idf.yaml
 EOF
@@ -228,16 +228,8 @@ fi
 if [ ! -d "${PROJECT_ROOT}/container-experience-kits" ]; then
     git clone --recurse-submodules --depth 1 https://github.com/intel/container-experience-kits.git -b v21.03 ${PROJECT_ROOT}/container-experience-kits/
     cp -r ${PROJECT_ROOT}/container-experience-kits/examples/${BMRA_PROFILE}/group_vars ${PROJECT_ROOT}/container-experience-kits/
-# NOTE The following condition/workaround will be removed once the reported issue https://github.com/intel/container-experience-kits/issues/68
-# is fixed upstream
-    if [[ "$DEPLOYMENT" == "full" ]]; then
-       echo "- name: install Python packages
-  pip:
-    name:
-      - pip==9.0.3" >> ${PROJECT_ROOT}/container-experience-kits/roles/bootstrap/install_packages/tasks/rhel.yml
-    fi
 fi
-cp ${PROJECT_ROOT}/${INSTALLER}/inventory.ini \
+cp ${PROJECT_ROOT}/${INSTALLER}/{inventory.ini,ansible.cfg} \
     ${PROJECT_ROOT}/container-experience-kits/
 cp ${PROJECT_ROOT}/${INSTALLER}/{all.yml,kube-node.yml} \
     ${PROJECT_ROOT}/container-experience-kits/group_vars/
@@ -245,16 +237,16 @@ cp ${PROJECT_ROOT}/${INSTALLER}/patched_cmk_build.yml \
     ${PROJECT_ROOT}/container-experience-kits/roles/cmk_install/tasks/main.yml
 cp ${PROJECT_ROOT}/${INSTALLER}/patched_vfio.yml \
     ${PROJECT_ROOT}/container-experience-kits/roles/sriov_nic_init/tasks/bind_vf_driver.yml
-cp ${PROJECT_ROOT}/${INSTALLER}/ansible.cfg \
-    ${PROJECT_ROOT}/container-experience-kits/ansible.cfg
 cp ${PROJECT_ROOT}/${INSTALLER}/patched_rhel_packages.yml \
     ${PROJECT_ROOT}/container-experience-kits/roles/bootstrap/install_packages/tasks/rhel.yml
+cp ${PROJECT_ROOT}/${INSTALLER}/patched_packages.yml \
+    ${PROJECT_ROOT}/container-experience-kits/roles/bootstrap/install_packages/tasks/main.yml
 
 sudo docker run --rm \
 -e ANSIBLE_CONFIG=/bmra/ansible.cfg \
 -e PROFILE=${BMRA_PROFILE} \
 -v ${PROJECT_ROOT}/container-experience-kits:/bmra \
--v ~/.ssh/:/root/.ssh/ rihabbanday/bmra2.0-install:centos \
+-v ~/.ssh/:/root/.ssh/ rihabbanday/bmra21.03-install:centos \
 ${ansible_cmd}
 EOF
 }