-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add one click init MC Env script (#940)
* Add oneclick initMC Env script * Change default ns name * Add script to load common resource
- Loading branch information
Showing
7 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$CBTUMBLEBUG_ROOT" ]; then | ||
SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}` | ||
export CBTUMBLEBUG_ROOT=`cd $SCRIPT_DIR && cd .. && pwd` | ||
fi | ||
|
||
$CBTUMBLEBUG_ROOT/src/testclient/scripts/1.configureSpider/register-cloud-interactive.sh -n tb | ||
|
||
echo -e "${BOLD}" | ||
while true; do | ||
read -p 'Load common Specs and Images. Do you want to proceed ? (y/n) : ' CHECKPROCEED | ||
echo -e "${NC}" | ||
case $CHECKPROCEED in | ||
[Yy]*) | ||
break | ||
;; | ||
[Nn]*) | ||
echo | ||
echo "Cancel [$0 $@]" | ||
echo "See you soon. :)" | ||
echo | ||
exit 1 | ||
;; | ||
*) | ||
echo "Please answer yes or no." | ||
;; | ||
esac | ||
done | ||
|
||
$CBTUMBLEBUG_ROOT/src/testclient/scripts/2.configureTumblebug/load-common-resource.sh -n tb | ||
|
||
echo -e "${BOLD}" | ||
while true; do | ||
read -p 'Create default namespace (ns01). Do you want to proceed ? (y/n) : ' CHECKPROCEED | ||
echo -e "${NC}" | ||
case $CHECKPROCEED in | ||
[Yy]*) | ||
break | ||
;; | ||
[Nn]*) | ||
echo | ||
echo "Cancel [$0 $@]" | ||
echo "See you soon. :)" | ||
echo | ||
exit 1 | ||
;; | ||
*) | ||
echo "Please answer yes or no." | ||
;; | ||
esac | ||
done | ||
|
||
$CBTUMBLEBUG_ROOT/src/testclient/scripts/2.configureTumblebug/create-ns.sh -n tb |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/testclient/scripts/2.configureTumblebug/load-common-resource.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
echo "####################################################################" | ||
echo "## Load common Image and Spec from asset files" | ||
echo "## (assets/cloudspec.csv, assets/cloudimage.csv)" | ||
echo "####################################################################" | ||
|
||
SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}` | ||
cd $SCRIPT_DIR | ||
|
||
source ../init.sh | ||
|
||
curl -H "${AUTH}" -sX GET http://$TumblebugServer/tumblebug/loadCommonResource | jq '' | ||
echo "" |