diff options
author | Rihab Banday <rihab.banday@ericsson.com> | 2020-12-03 20:53:32 +0100 |
---|---|---|
committer | Rihab Banday <rihab.banday@ericsson.com> | 2020-12-15 15:23:42 +0000 |
commit | 54e8ddaa91995cda63523abf70245ab60ffbc023 (patch) | |
tree | 0f7dc2e63817a1b7199474daf0fe5a8f10e89088 | |
parent | 7155286ed00a8bce09a948fb54fb4eeb85027e49 (diff) |
Replace older BMRA docker image with new one & add
changes for running it in CentOS 7
This change updates the Docker file of the BMRA
container & replaces the old image by the new one.
Additionally, it introduces changes needed to deploy
BMRA on CentOS 7.
Change-Id: I3f951bd147b457606719243d95fe48df14ecd449
Signed-off-by: Rihab Banday <rihab.banday@ericsson.com>
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71613
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Michael Pedersen <michaelx.pedersen@intel.com>
-rwxr-xr-x | functions.sh | 15 | ||||
-rw-r--r-- | playbooks/roles/bmra-config/templates/inventory.j2 | 2 | ||||
-rw-r--r-- | sw_config/bmra/Dockerfile | 1 |
3 files changed, 12 insertions, 6 deletions
diff --git a/functions.sh b/functions.sh index 88d6c09..62c9199 100755 --- a/functions.sh +++ b/functions.sh @@ -194,9 +194,9 @@ provision_k8s() { ansible_cmd="/bin/bash -c '" if [[ "$DEPLOYMENT" == "k8s" ]]; then ansible-playbook -i "$CURRENTPATH"/sw_config/bmra/inventory.ini "$CURRENTPATH"/playbooks/pre-install.yaml - ansible_cmd+="pip install --upgrade pip==9.0.3; pip install ansible==2.9.6;" + ansible_cmd+="pip install --upgrade pip==9.0.3; pip install ansible==2.9.6; ansible-playbook -i /bmra/inventory.ini /bmra/playbooks/k8s/patch_kubespray.yml;" fi - ansible_cmd+="ansible-playbook -i /bmra/inventory.ini /bmra/playbooks/k8s/patch_kubespray.yml; ansible-playbook -i /bmra/inventory.ini /bmra/playbooks/${BMRA_PROFILE}.yml'" + ansible_cmd+="ansible-playbook -i /bmra/inventory.ini /bmra/playbooks/${BMRA_PROFILE}.yml'" # shellcheck disable=SC2087 ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF @@ -212,10 +212,13 @@ fi if [ ! -d "${PROJECT_ROOT}/container-experience-kits" ]; then git clone --recurse-submodules --depth 1 https://github.com/intel/container-experience-kits.git -b v2.0.0 ${PROJECT_ROOT}/container-experience-kits/ cp -r ${PROJECT_ROOT}/container-experience-kits/examples/${BMRA_PROFILE}/group_vars ${PROJECT_ROOT}/container-experience-kits/ -#TODO Remove this once the reported issue is fixed in the next BMRA Release +# 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 - sed -i '/\openshift/a \ extra_args: --ignore-installed PyYAML' \ - ${PROJECT_ROOT}/container-experience-kits/roles/net-attach-defs-create/tasks/main.yml + 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 \ @@ -226,7 +229,7 @@ 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/bmra-install:centos \ +-v ~/.ssh/:/root/.ssh/ rihabbanday/bmra2.0-install:centos \ ${ansible_cmd} EOF } diff --git a/playbooks/roles/bmra-config/templates/inventory.j2 b/playbooks/roles/bmra-config/templates/inventory.j2 index 48e953c..28581e0 100644 --- a/playbooks/roles/bmra-config/templates/inventory.j2 +++ b/playbooks/roles/bmra-config/templates/inventory.j2 @@ -19,5 +19,7 @@ kube-node [calico-rr] +{% if deployment_type == 'k8s' %} [all:vars] ansible_python_interpreter=/usr/bin/python3 +{% endif %} diff --git a/sw_config/bmra/Dockerfile b/sw_config/bmra/Dockerfile index 2402764..7b30ba5 100644 --- a/sw_config/bmra/Dockerfile +++ b/sw_config/bmra/Dockerfile @@ -5,6 +5,7 @@ MAINTAINER "Rihab Banday <rihab.banday@ericsson.com>" RUN yum -y update && \ yum -y install git epel-release python36 python-netaddr && \ yum -y install python-pip && \ + pip install pip==9.0.3 && \ pip install ansible==2.9.6 jmespath && \ pip install jinja2 --upgrade |