
We will make use of common functions across the deploy_site, update_site and redeploy_server script. This will help to reduce common and repetitive codes across the scripts. Note that the Shipyard CLI needs to be installed before we can use these scripts. Change-Id: I31e5c8723346666a592951f59856008ccb64128b
33 lines
1.4 KiB
Bash
Executable File
33 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# Define Variable
|
|
# Note that 'query_time' has a default value of 90 seconds
|
|
# Note that 'max_count' has a default value of 60 loops (based on
|
|
# 90 seconds back off per cycle, i.e. 60 * 90 = 5400 seconds = 1.5 hr)
|
|
# Note that user can use a different value for each of the variables by
|
|
# exporting the required environment variable prior to running the script
|
|
max_count=${max_count:-60}
|
|
namespace="${namespace:-ucp}"
|
|
query_time=${query_time:-90}
|
|
|
|
# Export Environment Variables
|
|
export OS_AUTH_URL="${OS_AUTH_URL:-http://keystone.${namespace}:80/v3}"
|
|
export OS_PASSWORD="${OS_PASSWORD:-password}"
|
|
export OS_PROJECT_DOMAIN_NAME="${OS_PROJECT_DOMAIN_NAME:-default}"
|
|
export OS_PROJECT_NAME="${OS_PROJECT_NAME:-service}"
|
|
export OS_USERNAME="${OS_USERNAME:-shipyard}"
|
|
export OS_USER_DOMAIN_NAME="${OS_USER_DOMAIN_NAME:-default}"
|