summaryrefslogtreecommitdiffstats
path: root/jjb/compass4nfv/compass-deploy-virtual.sh
blob: 4991350a0f90684b4708ba982e7dd14d9d4ca74d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -x

# log info to console
echo "Starting the deployment on virtual environment using $INSTALLER_TYPE. This could take some time..."
echo "--------------------------------------------------------"
echo

export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
export OS_VERSION=${{COMPASS_OS_VERSION}}
export OPENSTACK_VERSION=${{COMPASS_OPENSTACK_VERSION}}
export CONFDIR=$WORKSPACE/deploy/conf/vm_environment
./deploy.sh --dha $CONFDIR/$DEPLOY_SCENARIO.yml --network $CONFDIR/$NODE_NAME/network.yml
if [ $? -ne 0 ]; then
    echo "depolyment failed!"
    deploy_ret=1
fi

echo
echo "--------------------------------------------------------"
echo "Done!"

ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
sshpass -p root scp 2>/dev/null $ssh_options root@${{INSTALLER_IP}}:/var/ansible/run/openstack_${{COMPASS_OPENSTACK_VERSION}}-opnfv2/ansible.log ./  &> /dev/null

exit $deploy_ret