summaryrefslogtreecommitdiffstats
path: root/tools/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/deploy.sh')
-rwxr-xr-xtools/deploy.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/tools/deploy.sh b/tools/deploy.sh
index b27607e..b5b97a2 100755
--- a/tools/deploy.sh
+++ b/tools/deploy.sh
@@ -76,8 +76,8 @@ read_yaml() {
}
git_checkout() {
- git clone $1
- cd ${1##*/}
+ git clone $1 $3
+ cd $3
# check refs for patchsets
if [[ $2 == *"refs"* ]]; then
@@ -96,18 +96,23 @@ clone_repos() {
echo "Found existing airship folder. Skip repo clone."
else
# clone/checkout site manifests
- git_checkout 'https://gerrit.opnfv.org/gerrit/airship' $GERRIT_REFSPEC
+ git_checkout 'https://gerrit.opnfv.org/gerrit/airship' $GERRIT_REFSPEC airship
fi
if [ -d "treasuremap" ]; then
echo "Found existing treasuremap folder in the working directory. Skip repo clone."
else
- # clone treasuremap (only required for tools/airship)
+ # clone treasuremap
# match treasuremap to global from site-definition
- SITE_DEF_KEY="['data']['repositories']['global']['revision']"
- TREASUREMAP_REF=$(read_yaml $SITE_DEF "$SITE_DEF_KEY")
+ GLOBAL_URL_KEY="['data']['repositories']['global']['url']"
+ TREASUREMAP_URL=$(read_yaml $SITE_DEF "$GLOBAL_URL_KEY")
+ echo "TREASUREMAP_URL $TREASUREMAP_URL"
+
+ GLOBAL_REF_KEY="['data']['repositories']['global']['revision']"
+ TREASUREMAP_REF=$(read_yaml $SITE_DEF "$GLOBAL_REF_KEY")
echo "TREASUREMAP_REF $TREASUREMAP_REF"
- git_checkout 'https://review.opendev.org/airship/treasuremap' $TREASUREMAP_REF
+
+ git_checkout $TREASUREMAP_URL $TREASUREMAP_REF treasuremap
fi
}
@@ -255,7 +260,9 @@ case "$2" in
pre_genesis
genesis_deploy
site_action $2
-# create_public_network
+ create_cirros_image
+ create_dpdk_flavor
+ create_public_network
;;
'update_site')
clone_repos
@@ -268,10 +275,6 @@ case "$2" in
site_action $2
;;
'init_cloud')
-# wget http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
-# openstack image create --disk-format qcow2 --container-format bare --public --file /target/cirros-0.5.1-x86_64-disk.img cirros
-# rm -rf cirros-0.5.1-x86_64-disk.img cirros
-# openstack flavor create --ram 1024 --disk 1 --vcpus 1 --public --hw:mem_page_size=large dpdk.tiny
create_cirros_image
create_dpdk_flavor
create_public_network