summaryrefslogtreecommitdiff
path: root/leap-platform-test
diff options
context:
space:
mode:
authorLeap Admins <sysdev@leap.se>2013-05-05 09:36:37 +0000
committerLeap Admins <sysdev@leap.se>2013-05-05 09:36:37 +0000
commit4e0b13304b3a1f2bbf122e595add0ade098a3a04 (patch)
tree73e429aee08f178ad7c237b74e9f42c503ff7eec /leap-platform-test
parentab5c8d626774eefba6a8ea969e8db7e1ec025315 (diff)
integrated leap-bootstrap-provider.sh into leap-platform-test
Diffstat (limited to 'leap-platform-test')
-rwxr-xr-xleap-platform-test48
1 files changed, 35 insertions, 13 deletions
diff --git a/leap-platform-test b/leap-platform-test
index cbae303..961b458 100755
--- a/leap-platform-test
+++ b/leap-platform-test
@@ -10,18 +10,19 @@ This script runs the leap platform deploy tests
OPTIONS
- -c|--config file specify config file
- -a|--all run command on all nodes
- -h|--help show help
+ -c|--config file specify config file
+ -a|--all run command on all nodes
+ -h|--help show help
COMMANDS
- bootstrap <node(s)> bootstrap node(s):
- - leap local start
- - leap node int
- - sets up hostname and runs apt-get dist-upgrade
- - leap local save
- deploy <node(s)> deploy node(s)
- reset_deploy <node(s)> reset and deploy node(s)
+ bootstrap <node(s)> bootstrap node(s):
+ - leap local start
+ - leap node int
+ - sets up hostname and runs apt-get dist-upgrade
+ - leap local save
+ create_provider creates a provider instance
+ deploy <node(s)> deploy node(s)
+ reset_deploy <node(s)> reset and deploy node(s)
EOF
}
@@ -60,6 +61,26 @@ compile () {
leap $OPTS compile
}
+create_provider() {
+ if [ -e $ROOTDIR/$PROVIDER ]
+ then
+ echo $ROOTDIR/$PROVIDER exists - exiting
+ exit 1
+ fi
+
+ mkdir $ROOTDIR/$PROVIDER
+ cd $ROOTDIR/$PROVIDER
+ leap new .
+ cd $ROOTDIR/leap_platform
+ git checkout develop
+ git submodule update --init
+ cd $ROOTDIR/$PROVIDER
+
+ # for now, we use the vagrant pubkey until https://leap.se/code/issues/2039 is solved
+ leap add-user --self --ssh-pub-key=/usr/lib/ruby/gems/1.9.1/gems/leap_cli-0.2.1/vendor/vagrant_ssh_keys/vagrant.pub
+ leap cert ca && leap cert csr
+ leap cert dh
+}
deploy() {
LOG="$LOGDIR/deploy-$vm.log"
@@ -175,9 +196,10 @@ echo
echo "Starting $0 on `date`"
case $cmd in
- bootstrap) bootstrap_nodes "$nodes";;
- deploy) deploy "$nodes";;
- reset_deploy) reset_deploy "$nodes";;
+ bootstrap) bootstrap_nodes "$nodes";;
+ create_provider) create_provider;;
+ deploy) deploy "$nodes";;
+ reset_deploy) reset_deploy "$nodes";;
esac