X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=compass%2Fdeploy%2Fsetup-env.sh;fp=compass%2Fdeploy%2Fsetup-env.sh;h=0000000000000000000000000000000000000000;hb=de3139313cb7e3087e3328d1b37cdc88510ca5db;hp=ffa9aa55a644d41f139fe514f8461c75ca10fbea;hpb=e94d5484ecdf8021245d961479dae07ea2f8321f;p=genesis.git diff --git a/compass/deploy/setup-env.sh b/compass/deploy/setup-env.sh deleted file mode 100644 index ffa9aa5..0000000 --- a/compass/deploy/setup-env.sh +++ /dev/null @@ -1,61 +0,0 @@ -rm -rf compass-install -git clone http://git.openstack.org/stackforge/compass-install -cd compass-install - -function join { local IFS="$1"; shift; echo "$*"; } -source ${SCRIPT_DIR}/../deploy/conf/${CONF_NAME}.conf -source ${SCRIPT_DIR}/../deploy/func.sh -if [[ ! -z $VIRT_NUMBER ]]; then - mac_array=$(${SCRIPT_DIR}/../deploy/mac_generator.sh $VIRT_NUMBER) - mac_list=$(join , $mac_array) - echo "pxe_boot_macs: [${mac_list}]" >> install/group_vars/all - echo "test: true" >> install/group_vars/all -fi -virsh list |grep compass -if [[ $? == 0 ]]; then - compass_old=`virsh list |grep compass|awk '{print$2}'` - virsh destroy ${compass_old} - virsh undefine ${compass_old} -fi -sudo vagrant up compass_nodocker -if [[ $? != 0 ]]; then - echo "installation of compass failed" - sudo vagrant destroy compass_nodocker - exit 1 -fi -echo "compass is up" - -tear_down_machines -if [[ -n $mac_array ]]; then - echo "bringing up pxe boot vms" - i=0 - for mac in $mac_array; do - echo "creating vm disk for instance pxe${i}" - sudo qemu-img create -f raw /home/pxe${i}.raw ${VIRT_DISK} - sudo virt-install --accelerate --hvm --connect qemu:///system \ - --name pxe$i --ram=$VIRT_MEM --pxe --disk /home/pxe$i.raw,format=raw \ - --vcpus=$VIRT_CPUS --graphics vnc,listen=0.0.0.0 \ - --network=bridge:virbr2,mac=$mac \ - --network=bridge:virbr2 \ - --network=bridge:virbr2 \ - --network=bridge:virbr2 \ - --noautoconsole --autostart --os-type=linux --os-variant=rhel6 - if [[ $? != 0 ]]; then - echo "launching pxe${i} failed" - exit 1 - fi - echo "checking pxe${i} state" - state=$(virsh domstate pxe${i}) - if [[ "$state" == "running" ]]; then - echo "pxe${i} is running" - sudo virsh destroy pxe${i} - fi - echo "add network boot option and make pxe${i} reboot if failing" - sudo sed -i "// a\ " /etc/libvirt/qemu/pxe${i}.xml - sudo sed -i "// a\ " /etc/libvirt/qemu/pxe${i}.xml - sudo virsh define /etc/libvirt/qemu/pxe${i}.xml - sudo virsh start pxe${i} - let i=i+1 - done -fi -machines=${mac_list}