...
 
Commits (3)
......@@ -11,4 +11,3 @@ export os_network="api.test-network-osl2"
export os_disk_size=35 # set to 0 for no external storage (for the g2* flavors)
export os_key_name="jeppe"
export os_flavor="gp.large"
export os_security_groups=("escenic-test.pfw" "sg.pfw")
#!/usr/bin/env bash
# set this to something like export list=("083" "093")
export list=()
export list=
# abort on error
set -e
......@@ -16,14 +16,13 @@ echo '%fqdns' > ./mpssh_hosts
# create yamls
# start by writing this to template.yml.
echo "
# cloud-config
echo "#cloud-config
hostname: eceplaceholder$postfix
fqdn: eceplaceholder$postfix.api.c.bitbit.net
puppet_server: puppet.api.c.bitbit.net
puppet_environment: puppetenv
bootcmd:
- printf "SELINUX=permissive\nSELINUXTYPE=targeted\n" > /etc/selinux/config
- printf \"SELINUX=permissive\\nSELINUXTYPE=targeted\\n\" > /etc/selinux/config
- ifconfig eth0 mtu 1450
packages:
- vim
......
......@@ -2,6 +2,7 @@
# set this to something like export list=("083" "093")
export list=()
export os_security_groups=("escenic-test.pfw" "sg.pfw")
# abort on error
set -e
......
......@@ -10,7 +10,7 @@ echo '%migratehosts' >> ./mpssh_hosts
echo '[migratehosts]' > ./ansible_hosts
for i in ${list[@]}; do
hostname= "ece$i$postfix.api"
hostname="ece$i$postfix.api"
IPV4=`openstack server list|grep $hostname |awk '{print $9}'`
IPV6=`openstack server show $hostname |grep addresses|awk '{print $4}'|awk -F"=" '{print $2}'|cut -d ',' -f1`
echo $hostname
......@@ -28,8 +28,8 @@ for i in ${list[@]}; do
send
answer
"
# | tee -a dnsupdates | nsupdate -v -k ~v/.cert/Kapi.c.bitbit.net.+157+49975.key;
| tee -a dnsupdates | nsupdate -v -k ~/.certs/Kapi.c.bitbit.net.+157+49975.key;
done
echo run 'mpssh -sf mpssh_hosts "sudo ps -ef|grep puppet"'
echo run 'mpssh -sf mpssh_hosts -l migratehosts "sudo ps -ef|grep puppet"'
set +e
......@@ -19,7 +19,7 @@ To use, be ready with the required information:
## How to use
1. Edit the variables in *1_set_env_variables.sh* and also the list array in all the .sh files.
1. Edit the variables in *1_set_env_variables.sh*, os_security_groups in *4_create_vms.sh* and also the list array in all the .sh files.
2. `source 1_set_env_variables.sh`
3. Execute `./2_create_yamls.sh` 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`
......