Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # This script is for development use. It copies all of the |
| 4 | # required files and directories to the installer VM to |
| 5 | # allow changes to be made without having to rebuild the |
| 6 | # VM and it's registry which is time consuming. |
| 7 | |
| 8 | # usage devCopyTiInstaller.sh <ip-address> |
| 9 | |
Sergio Slobodrian | 7c48362 | 2017-06-13 15:51:34 -0400 | [diff] [blame] | 10 | uId=`id -u` |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 11 | |
Sergio Slobodrian | c547771 | 2017-06-07 11:56:56 -0400 | [diff] [blame] | 12 | sed -i -e '/^#/!d' install.cfg |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 13 | rm -fr .test |
| 14 | mkdir .test |
| 15 | hosts="" |
Sergio Slobodrian | 7c48362 | 2017-06-13 15:51:34 -0400 | [diff] [blame] | 16 | for i in `virsh list | awk '{print $2}' | grep ha-serv${uId}-` |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 17 | do |
| 18 | ipAddr=`virsh domifaddr $i | tail -n +3 | head -n 1 | awk '{print $4}' | sed -e 's~/.*~~'` |
| 19 | hosts="$hosts $ipAddr" |
| 20 | hName=`echo $i | sed -e 's/install_//'` |
| 21 | cat .vagrant/machines/$hName/libvirt/private_key > .test/$ipAddr |
| 22 | done |
| 23 | echo "hosts=\"$hosts\"" >> install.cfg |
Sergio Slobodrian | c547771 | 2017-06-07 11:56:56 -0400 | [diff] [blame] | 24 | echo 'iUser="vagrant"' >> install.cfg |