updated templates and scripts for Airship 1.3
[yaml_builds.git] / tools / 2genesis.sh
index 0b70cd4..0da6f92 100755 (executable)
 # limitations under the License.                                             #
 ##############################################################################
 
-set -x
-TIMESTAMP=$(date +"%Y%m%d%H%M")
-echo "Logging to /var/log/yaml_builds/2genesis_$TIMESTAMP.log"
-exec > /var/log/yaml_builds/2genesis_$TIMESTAMP.log
+set -xe
+LOGDIR="/var/log/akraino"
+mkdir -p $LOGDIR
+LOGFILE="$LOGDIR/${1}_$(date +"%Y%m%d%H%M%z")_$(basename $0|cut -d. -f1)"
+echo "logging to $LOGFILE"
+exec 1> >(tee -a $LOGFILE)
 exec 2>&1
 
 source $(dirname $0)/setenv.sh
@@ -44,7 +46,7 @@ source $(dirname $0)/env_$SITE.sh
 cd $YAML_BUILDS
 # 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/tools/install_server_os.sh --rc /opt/akraino/yaml_builds/tools/"$GENESIS_NAME"rc --skip-confirm
+/opt/akraino/redfish/install_server_os.sh --rc /opt/akraino/yaml_builds/tools/"$GENESIS_NAME"rc --skip-confirm
 
 scp $YAML_BUILDS/tars/promenade-bundle-$SITE.tar $GENESIS_HOST:/tmp/
 ssh $GENESIS_HOST << EOF
@@ -56,4 +58,9 @@ ssh $GENESIS_HOST << EOF
   tar -xmf promenade-bundle-$SITE.tar
 EOF
 # Update BIOS Setting
-python $YAML_BUILDS/scripts/update_bios_settings.py $SITE.yaml
+#python $YAML_BUILDS/scripts/update_bios_settings.py $SITE.yaml
+
+exec 2>&-
+exec 1>&-
+exit 0
+