#!/bin/bash
##############################################################################
-# Copyright © 2018 AT&T Intellectual Property. All rights reserved. #
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. #
# limitations under the License. #
##############################################################################
+set -x
if [ -z "$1" ]
then
- echo "Plese pass site name as command line argument"
+ echo "Please pass site name as command line argument"
exit -2
else
export SITE=${SITE:-$1}
echo "TIMESTAMP=$TIMESTAMP"
echo "Validating the setup and generating the tar file"
-bash $YAML_BUILDS/tools/1prom-gen.sh $SITE > /var/log/yaml_builds/1prom-gen-$TIMESTAMP.log 2>&1
+mkdir -p /var/log/akraino
+bash $YAML_BUILDS/tools/1prom-gen.sh $SITE
if [ $? -ne 0 ]
then
echo "Error:Could not generate tar file. So stopping here"
fi
echo "Bringing up the genesis node"
-bash $YAML_BUILDS/tools/2genesis.sh $SITE > /var/log/yaml_builds/2genesis-$TIMESTAMP.log 2>&1
+bash $YAML_BUILDS/tools/2genesis.sh $SITE
if [ $? -ne 0 ]
then
echo "Error:Could not bringup the genesis nodes. So stopping here"
fi
echo "Deploying the site"
-bash $YAML_BUILDS/tools/3deploy_site.sh $SITE > /var/log/yaml_builds/3deploy-$TIMESTAMP.log 2>&1
+bash $YAML_BUILDS/tools/3deploy_site.sh $SITE
if [ $? -ne 0 ]
then
echo "Error:Could not deploy the site."