diff options
-rwxr-xr-x | ci/deploy/deploy.sh | 41 | ||||
-rwxr-xr-x | code/makefile_patch.sh | 2 | ||||
-rw-r--r-- | deploy/config/vm_environment/zte-virtual1/deploy.yml | 6 |
3 files changed, 37 insertions, 12 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index 91d97784..79ec2439 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -13,6 +13,7 @@ # exit 0 ##########TODO after test########## +WORKDIR=/tmp/workdir DHA=$WORKSPACE/$1 NETWORK=$WORKSPACE/$2 deploy_path=$WORKSPACE/deploy @@ -33,16 +34,22 @@ daisy_gateway=`echo $parameter_from_deploy | cut -d " " -f 6` function execute_on_jumpserver { - ssh $1 -o UserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no $2 + local jumpserver_ip=$1 + local cmd=$2 + ssh $jumpserver_ip -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $cmd } function create_node { - virsh net-define $1 - virsh net-autostart $2 - virsh net-start $2 - virsh define $3 - virsh start $4 + local net_template=$1 + local net_name=$2 + local vms_template=$3 + local vms_name=$4 + virsh net-define $net_template + virsh net-autostart $net_name + virsh net-start $net_name + virsh define $vms_template + virsh start $vms_name } #update key = value config option in an conf or ini file @@ -79,9 +86,25 @@ function update_config fi } +function clean_up +{ + local vm_name=$1 + local network_name=$2 + virsh destroy $vm_name + virsh undefine $vm_name + virsh net-destroy $network_name + virsh net-undefine $network_name +} + +echo "=====clean up all node and network======" +clean_up all_in_one daisy2 +clean_up daisy daisy1 +if [ -f $WORKDIR/daisy ]; then + rm -rf $WORKDIR +fi + echo "=======create daisy node================" $create_qcow2_path/daisy-img-modify.sh -c $create_qcow2_path/centos-img-modify.sh -a $daisy_ip -g $daisy_gateway -s $daisyserver_size -#qemu-img resize centos7.qcow2 100G create_node $net_daisy1 daisy1 $pod_daisy daisy sleep 20 @@ -103,7 +126,7 @@ fi echo "====== add relate config of kolla===========" execute_on_jumpserver $daisy_ip "mkdir -p /etc/kolla/config/nova" -execute_on_jumpserver $daisy_ip "echo -e "[libvirt]\nvirt_type=qemu" > /etc/kolla/config/nova/nova-compute.conf" +execute_on_jumpserver $daisy_ip "echo -e '[libvirt]\nvirt_type=qemu' > /etc/kolla/config/nova/nova-compute.conf" echo "===prepare cluster and pxe===" execute_on_jumpserver $daisy_ip "python $WORKSPACE/deploy/tempest.py --dha $DHA --network $NETWORK --cluster "yes"" @@ -121,6 +144,8 @@ virsh destroy all_in_one virsh start all_in_one echo "===========check install progress===========" +execute_on_jumpserver $daisy_ip "systemctl restart daisy-api" +execute_on_jumpserver $daisy_ip "systemctl restart daisy-registry" execute_on_jumpserver $daisy_ip "$WORKSPACE/deploy/check_os_progress.sh" virsh reboot all_in_one execute_on_jumpserver $daisy_ip "$WORKSPACE/deploy/check_openstack_progress.sh" diff --git a/code/makefile_patch.sh b/code/makefile_patch.sh index b2cfaf8d..eeacb169 100755 --- a/code/makefile_patch.sh +++ b/code/makefile_patch.sh @@ -14,7 +14,7 @@ imagebranch="newton" imageversion="latest" imageserver="http://120.24.17.215" imagename="kolla-image-$imagebranch-$imageversion.tgz" -isoname="CentOS-7-x86_64-Minimal-1511.iso" +isoname="CentOS-7-x86_64-Minimal-1611.iso" isourl="http://buildlogs.centos.org/rolling/7/isos/x86_64/${isoname}" if [ ! -d $CACHE_PATH ]; then mkdir -p $CACHE_PATH ; fi if [ ! -f $CACHE_PATH/${isoname} ]; then diff --git a/deploy/config/vm_environment/zte-virtual1/deploy.yml b/deploy/config/vm_environment/zte-virtual1/deploy.yml index 78c32014..b0949476 100644 --- a/deploy/config/vm_environment/zte-virtual1/deploy.yml +++ b/deploy/config/vm_environment/zte-virtual1/deploy.yml @@ -4,9 +4,9 @@ hosts: - 'CONTROLLER_LB' - 'COMPUTER' disks: - daisy: 100G - controller: 100G - compute: 100G + daisy: 50 + controller: 50 + compute: 50 daisy_passwd: 'r00tme' daisy_ip: '10.20.11.2' daisy_gateway: '10.20.11.1' |