aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2017-07-26 11:38:15 +0200
committerasteroide <thomas.duval@orange.com>2017-07-26 11:38:15 +0200
commit44b9ac5777971b27b9a516dae5d9e923b2179c3f (patch)
tree2f261adc6043e176e18e567012acffaba38e9010
parent58cf87a489fe6b8f2e65cf6e557c4b7c4048059d (diff)
Update startup script
Change-Id: I76b689f70f6d3cc4986c88e4c330b6501b2004ed
-rwxr-xr-xmoonv4/bin/start.sh22
1 files changed, 13 insertions, 9 deletions
diff --git a/moonv4/bin/start.sh b/moonv4/bin/start.sh
index d72baf61..e95ac393 100755
--- a/moonv4/bin/start.sh
+++ b/moonv4/bin/start.sh
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
+VERSION=4.1
+export DOCKER_HOST=tcp://172.88.88.1:2376
+
echo -e "\033[31mDeleting previous dockers\033[m"
docker rm -f $(docker ps -a | grep moon | cut -d " " -f 1) 2>/dev/null
-docker rm -f messenger db keystone 2>/dev/null
+docker rm -f messenger db keystone consul 2>/dev/null
echo -e "\033[32mStarting Messenger\033[m"
docker run -dti --net=moon --hostname messenger --name messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -e RABBITMQ_HIPE_COMPILE=1 -p 5671:5671 -p 5672:5672 -p 8080:15672 rabbitmq:3-management
@@ -10,6 +13,8 @@ docker run -dti --net=moon --hostname messenger --name messenger -e RABBITMQ_DEF
echo -e "\033[32mStarting DB manager\033[m"
docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
+docker run -d --net=moon --name=consul --hostname=consul -p 8500:8500 consul
+
echo "waiting for Database (it may takes time)..."
echo -e "\033[35m"
sed '/ready for connections/q' <(docker logs db -f)
@@ -22,14 +27,13 @@ echo -e "\033[m"
docker run -dti --net moon --hostname keystone --name keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 keystone:mitaka
-echo -e "\033[32mBuilding packages\033[m"
-bash $MOON_HOME/bin/build_all.sh
+echo -e "\033[32mConfiguring Moon platform\033[m"
+sudo pip install moon_db
+moon_db_manager upgrade
-. $MOON_HOME/moon_orchestrator/tests/venv/bin/activate
+cd ${MOON_HOME}/moon_orchestrator
+python3 populate_consul.py
-pip install $MOON_HOME/moon_orchestrator/dist/moon_db-0.1.0.tar.gz --upgrade
-pip install $MOON_HOME/moon_orchestrator/dist/moon_utilities-0.1.0.tar.gz --upgrade
-moon_db_manager upgrade
+echo -e "\033[32mStarting Moon platform\033[m"
-echo -e "\033[32mStarting Moon Orchestrator\033[m"
-moon_orchestrator
+docker container run -dti --net moon --hostname orchestrator --name orchestrator wukongsun/moon_orchestrator:${VERSION}