diff options
author | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2019-11-09 09:48:11 +0530 |
---|---|---|
committer | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2019-11-20 22:45:56 +0530 |
commit | f7475f766c4ae9ef5dff365959da3842834c18fb (patch) | |
tree | 0321ac8e6538150f9d15dd8e0a55bd793d2964fd | |
parent | 0bc475ad56588ca34407d495032ae27e4208babe (diff) |
Deploy Script for all Sites.
This patch modified deploy script to be used for all sites.
Expectation: Every site should include <site_name>.env in its home
folder.
Change in Arguments:
With this patch deploy script take site_name as first arugment.
Ex: deploy.sh intel-pod10 deploy_site
Added .env files for all 3 sites.
Pod10 env was already present
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: I917b19c0b656e4495f7643ff2d2b73ad9ae03a11
-rw-r--r-- | site/intel-pod17/intel-pod17.env | 7 | ||||
-rw-r--r-- | site/intel-pod18/intel-pod18.env | 7 | ||||
-rwxr-xr-x | tools/deploy.sh | 26 |
3 files changed, 28 insertions, 12 deletions
diff --git a/site/intel-pod17/intel-pod17.env b/site/intel-pod17/intel-pod17.env new file mode 100644 index 0000000..ba2ee20 --- /dev/null +++ b/site/intel-pod17/intel-pod17.env @@ -0,0 +1,7 @@ +export OS_AUTH_URL=${OS_AUTH_URL:-http://iam-airship.intel-pod17.opnfv.org:80/v3} +export GEN_SSH=${GEN_SSH:-intel-pod17-genesis} +export SITE_NAME=${SITE_NAME:-intel-pod17} +export GEN_IPMI=${GEN_IPMI:-10.10.170.11} +export NODES_IPMI=${NODES_IPMI:-'10.10.170.12 10.10.170.13 10.10.170.14 10.10.170.15'} +export SITE_DEF=${SITE_DEF:-airship/site/intel-pod17/site-definition.yaml} +export OS_AUTH_URL_IDENTITY=${OS_AUTH_URL_IDENTITY:-http://identity-airship.intel-pod17.opnfv.org:80/v3} diff --git a/site/intel-pod18/intel-pod18.env b/site/intel-pod18/intel-pod18.env new file mode 100644 index 0000000..b302521 --- /dev/null +++ b/site/intel-pod18/intel-pod18.env @@ -0,0 +1,7 @@ +export OS_AUTH_URL=${OS_AUTH_URL:-http://iam-airship.intel-pod18.opnfv.org:80/v3} +export GEN_SSH=${GEN_SSH:-intel-pod18-genesis} +export SITE_NAME=${SITE_NAME:-intel-pod18} +export GEN_IPMI=${GEN_IPMI:-10.10.180.11} +export NODES_IPMI=${NODES_IPMI:-'10.10.180.12 10.10.180.13 10.10.180.14 10.10.180.15'} +export SITE_DEF=${SITE_DEF:-airship/site/intel-pod18/site-definition.yaml} +export OS_AUTH_URL_IDENTITY=${OS_AUTH_URL_IDENTITY:-http://identity-airship.intel-pod18.opnfv.org:80/v3} diff --git a/tools/deploy.sh b/tools/deploy.sh index d4d3039..109cc32 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -2,21 +2,13 @@ set -x -export OS_AUTH_URL=${OS_AUTH_URL:-http://iam-airship.intel-pod17.opnfv.org:80/v3} export OS_USERNAME=${OS_USERNAME:-shipyard} export OS_PASSWORD=${OS_PASSWORD:-password123} export IPMI_USER=${IPMI_USER:-root} export IPMI_PASS=${IPMI_PASS:-root} -export GEN_SSH=${GEN_SSH:-intel-pod17-genesis} -export SITE_NAME=${SITE_NAME:-intel-pod17} - -export GEN_IPMI=${GEN_IPMI:-10.10.170.11} -export NODES_IPMI=${NODES_IPMI:-'10.10.170.12 10.10.170.13 10.10.170.14 10.10.170.15'} - export GERRIT_REFSPEC=${GERRIT_REFSPEC:-master} -export SITE_DEF=${SITE_DEF:-airship/site/intel-pod17/site-definition.yaml} export TERM_OPTS=${TERM_OPTS:-" "} @@ -25,6 +17,19 @@ cd $TMP_DIR trap "{ sudo rm -rf $TMP_DIR; }" EXIT +help() { + echo "Usage: deploy.sh <site_name> <deploy_site|update_site>" +} + +## Source Environment Variables. + +if [[ $# -ne 2 ]] + then + help + exit 1 +fi + +source ../site/$1/$1.env ## Deps @@ -35,9 +40,6 @@ pkg_check() { } pkg_check docker.io git ipmitool python3-yaml -help() { - echo "Usage: deploy.sh <deploy_site|update_site>" -} ## Cleanup @@ -143,7 +145,7 @@ site_action() { } create_public_network() { - export OS_AUTH_URL=${OS_AUTH_URL:-http://identity-airship.intel-pod17.opnfv.org:80/v3} + export OS_AUTH_URL=${OS_AUTH_URL_IDENTITY} sudo -E treasuremap/tools/openstack stack create --wait \ -t /target/airship/tools/files/heat-public-net-deployment.yaml \ public-network |