Commit e2da739b authored by Jens-Petter Salvesen's avatar Jens-Petter Salvesen

made a new "fqdns" section in mpssh_hosts

this helps us shut down the existing servers
parent a7266bcb
......@@ -9,6 +9,10 @@ set -e
# create dir for yamls unless it already exists
mkdir -p ./yamls/
# restart the mpssh_hosts file for this run
# adding this enables us to use mpssh for shutting down the VMs
echo '%fqdns' > ./mpssh_hosts
# create yamls
# start by writing this to template.yml.
......@@ -28,9 +32,11 @@ rlnc-init: true" > ./template.yml
# go over the servers in the list and create a yaml for it inside yamls/
for i in ${list[@]}; do
cp ./template.yml ./yamls/ece$i$postfix.api.yaml
sed -i "s/placeholder/$i/g" ./yamls/ece$i$postfix.api.yaml
sed -i "s/puppetenv/$puppetenv/g" ./yamls/ece$i$postfix.api.yaml
cp ./template.yml ./yamls/$hostname.api.yaml
sed -i "s/placeholder/$i/g" ./yamls/$hostname.api.yaml
sed -i "s/puppetenv/$puppetenv/g" ./yamls/$hostname.api.yaml
echo "$" >> ./mpssh_hosts
set +e
......@@ -6,7 +6,7 @@ export list=()
# abort on error
set -e
echo '%migratehosts' > ./mpssh_hosts
echo '%migratehosts' >> ./mpssh_hosts
echo '[migratehosts]' > ./ansible_hosts
for i in ${list[@]}; do
......@@ -15,10 +15,15 @@ To use, be ready with the required information:
**It's your responsibility to be logged into the correct openstack project and entering consistent and correct variables. This script suite has no consistency checks.**
*This script does stop the VMs in spectral cloud and nor manage downtime*
*This script-set does not manage downtime*
## How to use
1. Edit the variables in ** and also the list array in all the .sh files.
2. `source`
3. Execute the rest of the scripts in sequence.
3. Execute `./` to create yaml files for the VMs, and "mpssh_hosts" to communicate with the VMs, labeled as "fqdns"
4. Check connectivity - `mpssh --nokeychk -f mpssh_hosts -l fqdns date`
5. Create volumes - `./`
6. Set downtime for the hosts you are moving
7. Shut down existing hosts - `mpssh --nokeychk -f mpssh_hosts -l fqdns date`
8. Execute the rest of the scripts in sequence.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment