diff options
author | asteroide <thomas.duval@orange.com> | 2017-09-21 17:14:52 +0200 |
---|---|---|
committer | asteroide <thomas.duval@orange.com> | 2017-09-21 17:14:52 +0200 |
commit | 4a6b8fe04942606d75d85dd01957d63cc12c816e (patch) | |
tree | ef8ed893b465f7f552108ff0d8a4272f17c104f7 /moonv4 | |
parent | f76342852658d387c9d231ca451822333cc52b1c (diff) |
Update README
Change-Id: I8ad66b97ed9019bbe3b7cd74dbe111145781cb0b
Diffstat (limited to 'moonv4')
-rw-r--r-- | moonv4/README.md | 62 |
1 files changed, 27 insertions, 35 deletions
diff --git a/moonv4/README.md b/moonv4/README.md index 95499589..6c65320c 100644 --- a/moonv4/README.md +++ b/moonv4/README.md @@ -9,7 +9,7 @@ This directory contains all the modules for MoonV4 sudo apt install python3-dev python3-pip sudo pip3 install pip --upgrade sudo apt -y install docker-engine # ([Get Docker](https://docs.docker.com/engine/installation/)) -echo 127.0.0.1 messenger db keystone | sudo tee -a /etc/hosts +echo 127.0.0.1 messenger db keystone interface manager | sudo tee -a /etc/hosts ``` @@ -27,7 +27,7 @@ sudo service docker restart sudo ufw allow in from 172.88.88.0/16 ``` -## Run Standard Containers +## Before running containers ### Cleanup Remove already running containers ```bash @@ -42,20 +42,21 @@ Create an internal Docker network called `moon` docker network create -d bridge --subnet=172.88.88.0/16 --gateway=172.88.88.1 moon ``` - -### MySql -Run the standard `MySql` container in the `moon` network +### Install Moon_DB +Install the moon_db library ```bash -docker container 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 +sudo pip3 install moon_db ``` -### Rabbitmq -Run the standard `Rabbitmq` container in the `moon` network +## Starting containers manually + +### MySql +Run the standard `MySql` container in the `moon` network and configure it ```bash -docker container 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 +docker container 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 +moon_db_manager upgrade ``` - ### moon_keystone Run the `keystone` container (created by the `Moon` project) in the `moon` network ```bash @@ -68,46 +69,37 @@ Run the standard `Consul` container in the `moon` network docker run -d --net=moon --name=consul --hostname=consul -p 8500:8500 consul ``` +### Moon platform -## Run Moon's Containers -### Automatic Launch -To start the `Moon` framework, you only have to run the `moon_orchestrator` container ```bash -docker container run -dti --net moon --hostname orchestrator --name orchestrator wukongsun/moon_orchestrator:v4.1 +docker container run -dti --net moon --hostname manager --name manager wukongsun/moon_manager:v4.1 +docker container run -dti --net moon --hostname interface --name interface wukongsun/moon_interface:v4.1 ``` +## Starting containers automatically -### Manuel Launch -We can also manually start the `Moon` framework - -#### moon_router +To start the `Moon` framework, you only have to run the `bootstrap` script ```bash -docker container run -dti --net moon --hostname router --name router wukongsun/moon_router:v4.1 +python3 bin/bootstrap.py ``` +The script will ask you to start one or more Moon containers -#### moon_manager -```bash -docker container run -dti --net moon --hostname manager --name manager wukongsun/moon_manager:v4.1 -``` - -#### moon_interface +### Tests ```bash -docker container run -dti --net moon --hostname interface --name interface wukongsun/moon_interface:v4.1 +sudo pip3 install pytest +cd tests +pytest ``` -#### moon_orchestrator +### Run scenario ```bash -docker container run -dti --net moon --hostname orchestrator --name orchestrator wukongsun/moon_orchestrator:v4.1 +sudo pip3 install requests +cd tests +python3 populate_default_values.py -v scenario/rbac.py +python3 send_authz.py -v scenario/rbac.py ``` -### Tests -```bash -docker exec -ti interface /bin/bash -pip3 install pytest -cd /usr/local/lib/python3.5/dist-packages/moon_interface/tests/apitests -pytest -``` ## Log ### Get some logs |