VM creation steps
This change introduces two (older) settings needed for
CentOS 7 which were removed by recent patches that were
tested only on Ubuntu 16.04. These settings have been
already tested on Ubtunu 16.04.
Change-Id: I3039d650b59869d45e11afdda8827c850f686195
Signed-off-by: Rihab Banday <rihab.banday@ericsson.com>
Co-Authored-By: Victor Morales <v.morales@samsung.com>
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71233
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Georg Kunz <georg.kunz@ericsson.com>
# ---------------------------------------------------------------------
# bootstrap install prerequisites
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------
# bootstrap install prerequisites
# ---------------------------------------------------------------------
-ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \
- "$CURRENTPATH"/playbooks/bootstrap.yaml
# ---------------------------------------------------------------------
# Create jump VM from which the installation is performed
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------
# Create jump VM from which the installation is performed
# ---------------------------------------------------------------------
-ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \
- "$CURRENTPATH"/playbooks/jump-vm.yaml
# ---------------------------------------------------------------------
# Create BMRA config based on IDF and PDF
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------
# Create BMRA config based on IDF and PDF
# ---------------------------------------------------------------------
-ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \
- "$CURRENTPATH"/playbooks/bmra-config.yaml
+run_playbook bmra-config
# ---------------------------------------------------------------------
# Copy files needed by Infra engine & BMRA in the jumphost VM
# ---------------------------------------------------------------------
# Copy files needed by Infra engine & BMRA in the jumphost VM
ansible-playbook -i /bmra/inventory.ini /bmra/playbooks/cluster.yml
EOF
}
ansible-playbook -i /bmra/inventory.ini /bmra/playbooks/cluster.yml
EOF
}
+
+# Executes a specific Ansible playbook
+run_playbook() {
+ ansible_cmd="$(command -v ansible-playbook)"
+ ansible_cmd+=" -i $CURRENTPATH/inventory/localhost.ini"
+ ansible_cmd+=" -e ansible_python_interpreter=$(command -v python)"
+ if [ "${DEBUG:-false}" == "true" ]; then
+ ansible_cmd+=" -vvv"
+ fi
+ eval "$ansible_cmd $CURRENTPATH/playbooks/${1}.yaml"
+}
--disk path={{ workspace }}/kuberef-jump.qcow2,format=qcow2 \
--disk {{ workspace }}/kuberef-jump-cidata.iso,device=cdrom \
--network network=default,model=virtio,mac='{{ jumphost.interfaces[engine.net_config[engine.public_network].interface].mac_address }}' \
--disk path={{ workspace }}/kuberef-jump.qcow2,format=qcow2 \
--disk {{ workspace }}/kuberef-jump-cidata.iso,device=cdrom \
--network network=default,model=virtio,mac='{{ jumphost.interfaces[engine.net_config[engine.public_network].interface].mac_address }}' \
- --network bridge=pxebr,model=virtio,mac='{{ jumphost.interfaces[engine.net_config[engine.pxe_network].interface].mac_address }}' \
+ --network bridge=pxebr,model=rtl8139,mac='{{ jumphost.interfaces[engine.net_config[engine.pxe_network].interface].mac_address }}' \
--import --noautoconsole"
- name: start jump VM
--import --noautoconsole"
- name: start jump VM