X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=tools%2F2genesis.sh;h=e41eb40c090a8c64b2a2f3ca116671492a3f88de;hb=87dd646ac7e0fc62ffb339ec501d4432d2deb581;hp=2d63bf40003150c6c5ec2c2a26f886fbc7ba25b2;hpb=c0546d721c338cca646dbad6c6013f75ba7c868b;p=yaml_builds.git diff --git a/tools/2genesis.sh b/tools/2genesis.sh index 2d63bf4..e41eb40 100755 --- a/tools/2genesis.sh +++ b/tools/2genesis.sh @@ -44,13 +44,24 @@ fi source $(dirname $0)/env_$SITE.sh cd $YAML_BUILDS -# Install OS on Genesis + +echo "# Setup redfish tools to avoid race condition" +/opt/akraino/redfish/setup_tools.sh + +FILENAME=$(mktemp) +echo "# Updating BIOS settings on master and worker nodes in background [$FILENAME]" +python $YAML_BUILDS/scripts/update_bios_settings.py $SITE.yaml >$FILENAME & + +echo "# Install OS on Genesis" python $YAML_BUILDS/scripts/jcopy.py $SITE.yaml $YAML_BUILDS/tools/j2/serverrc.j2 $YAML_BUILDS/tools/"$GENESIS_NAME"rc /opt/akraino/redfish/install_server_os.sh --rc /opt/akraino/yaml_builds/tools/"$GENESIS_NAME"rc --skip-confirm -# Stage Airship files on Genesis +echo "# Stage Airship files on Genesis" scp $YAML_BUILDS/tars/promenade-bundle-$SITE.tar $GENESIS_HOST:/tmp/ ssh $GENESIS_HOST << EOF + echo "#########################################" + echo "# Setup deployment files on genesis host" + echo "#########################################" # TODO avoid following hard coding$ route add -net 192.168.41.0/24 gw 192.168.2.1 bond0.41 mkdir -p /root/akraino @@ -58,12 +69,20 @@ ssh $GENESIS_HOST << EOF cp /tmp/promenade-bundle-$SITE.tar . tar -xmf promenade-bundle-$SITE.tar mv configs/promenade-bundle/deploy_site.sh . + mv configs/promenade-bundle/update_software.sh . + mv configs/promenade-bundle/openrc . + cp configs/promenade-bundle/run_openstack_cli.sh /usr/local/bin/openstack + find . -type f -not -path "./tools/*" -not -path "./global/*" EOF -# Update BIOS settings on master and worker nodes -#python $YAML_BUILDS/scripts/update_bios_settings.py $SITE.yaml +echo "# Waiting for BIOS updates to finish on master and worker nodes" +wait +# Show output from BIOS updates on master and worker nodes +cat $FILENAME +rm $FILENAME echo "#######################################" echo "# $0 finished" echo "#######################################" #pkill -9 $$ && exit 0 +