2 ##############################################################################
3 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may #
6 # not use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ##############################################################################
20 TIMESTAMP=$(date +"%Y%m%d%H%M")
21 LOGFILE=/var/log/deploy_site_$TIMESTAMP.log
22 echo "logging to $LOGFILE"
23 exec 1> >(tee -a $LOGFILE)
26 # Site specific variables
28 export OS_USERNAME=shipyard
36 tools/airship shipyard create configdocs ${REGION_NAME} --directory=/target/configs/promenade
38 tools/airship shipyard commit configdocs
40 tools/airship shipyard create action deploy_site
42 tools/airship shipyard get actions
44 SHIPYARD_ACTION=$(tools/airship shipyard get actions | awk '/deploy_site/ {print $2};')
45 SHIPYARD_CLI="tools/airship shipyard describe $SHIPYARD_ACTION"
47 echo "## Airship deployment has been started..."
49 echo "## To monitor progress check:"
50 echo "## MaaS GUI -> $MAAS_URL"
51 echo "## Shipyard cli-> $SHIPYARD_CLI"
52 #echo "## Airflow GUI -> $AIRFLOW_URL"
54 while ( ! $SHIPYARD_CLI | grep -qe '^Lifecycle.*Complete' && ! $SHIPYARD_CLI | grep -qe '^step.*failed'); do
56 echo "## Sleeping for 10 mins"
63 $SHIPYARD_CLI | grep -qe '^step.*failed'