update MAAS url in deploy_site output
[yaml_builds.git] / tools / deploy_site.sh
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
6 # not use this file except in compliance with the License.                   #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
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 ##############################################################################
17
18
19 set -x
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)
24 exec 2>&1
25
26 # Site specific variables
27 export OS_AUTH_URL=
28 export OS_USERNAME=shipyard
29 export OS_PASSWORD=
30 REGION_NAME=
31 MAAS_URL=
32 AIRFLOW_URL=
33
34 sleep 900
35
36 tools/airship shipyard create configdocs ${REGION_NAME} --directory=/target/configs/promenade
37
38 tools/airship shipyard commit configdocs
39
40 tools/airship shipyard create action deploy_site
41
42 tools/airship shipyard get actions
43
44 SHIPYARD_ACTION=$(tools/airship shipyard get actions | awk '/deploy_site/ {print $2};')
45
46 tools/airship shipyard describe $SHIPYARD_ACTION
47
48 echo "## Airship deployment has been started..."
49 echo "##"
50 echo "## To monitor progress check:"
51 echo "## MaaS GUI    -> $MAAS_URL"
52 echo "## Airflow GUI -> $AIRFLOW_URL"
53
54 exec 2>&-
55 exec 1>&-
56 exit 0