From 32644d3e70aed2d1eaadf9548d986bf01cf73748 Mon Sep 17 00:00:00 2001 From: blsaws Date: Thu, 22 Sep 2016 06:19:58 -0700 Subject: Switch to trusty to fix issues with python not being pre-installed. JIRA: MODELS-23 Change-Id: If7bcb140043112ef08a80cb16f9c4fea0c27d695 Signed-off-by: blsaws --- tests/vLamp_Ansible.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'tests/vLamp_Ansible.sh') diff --git a/tests/vLamp_Ansible.sh b/tests/vLamp_Ansible.sh index 38efaa5..c029d1f 100644 --- a/tests/vLamp_Ansible.sh +++ b/tests/vLamp_Ansible.sh @@ -104,6 +104,8 @@ setup () { get_floating_net echo "$0: create lampstack vars file for OPNFV" + # trusty-server is needed since xenial does not come with python pre-installed + # TODO: find some way to get ansible to install dependencies! cat >/tmp/ansible/blueprints/lampstack/vars/opnfv.yml <>/tmp/ansible/blueprints/lampstack/group_vars/all.yml + echo "$0: Disable host key checking (fix for SSH connection issues?)" + echo "host_key_checking = False" >>/tmp/ansible/blueprints/lampstack/ansible.cfg - echo "$0: Setup ubuntu-xenial glance image if needed" - if [[ -z $(openstack image list | awk "/ xenial-server / { print \$2 }") ]]; then glance --os-image-api-version 1 image-create --name xenial-server --disk-format qcow2 --location https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img --container-format bare; fi + echo "$0: Setup trusty-server glance image if needed" + if [[ -z $(openstack image list | awk "/ trusty-server / { print \$2 }") ]]; then glance --os-image-api-version 1 image-create --name trusty-server --disk-format qcow2 --location https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img --container-format bare; fi if [[ -z $(neutron net-list | awk "/ internal / { print \$2 }") ]]; then echo "$0: Create internal network" @@ -158,9 +160,9 @@ EOF start() { echo "$0: Add ssh key" - chown root /tmp/ansible/ansible.pem + chown root /tmp/ansible/ansible eval $(ssh-agent -s) - ssh-add /tmp/ansible/ansible.pem + ssh-add /tmp/ansible/ansible echo "$0: setup OpenStack environment" source /tmp/ansible/admin-openrc.sh @@ -170,7 +172,7 @@ start() { echo "$0: invoke blueprint install via Ansible" cd /tmp/ansible/blueprints/lampstack - ansible-playbook -vvv -e "action=apply env=opnfv password=$OS_PASSWORD" -u ubuntu site.yml + ansible-playbook -vvv -e "action=apply env=opnfv password=$OS_PASSWORD" site.yml pass } @@ -178,14 +180,14 @@ start() { stop() { echo "$0: Add ssh key" eval $(ssh-agent -s) - ssh-add /tmp/ansible/ansible.pem + ssh-add /tmp/ansible/ansible echo "$0: setup OpenStack environment" source /tmp/ansible/admin-openrc.sh echo "$0: invoke blueprint destroy via Ansible" cd /tmp/ansible/blueprints/lampstack - ansible-playbook -vvv -e "action=destroy env=opnfv password=$OS_PASSWORD" -u ubuntu site.yml + ansible-playbook -vvv -e "action=destroy env=opnfv password=$OS_PASSWORD" site.yml pass } -- cgit 1.2.3-korg