From e493f6692072574d339972f0db3adb8270bdeccd Mon Sep 17 00:00:00 2001 From: Sofia Wallin Date: Wed, 18 Oct 2017 12:43:47 +0200 Subject: Various corrections Adjusted structure and enabled referencing. Change-Id: I23a8afd08ebb013d772314b450497c17bfdfc4fc Signed-off-by: Sofia Wallin --- docs/release/userguide/index.rst | 2 + docs/release/userguide/userguide.md | 114 -------------------------------- docs/release/userguide/userguide.rst | 124 +++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 114 deletions(-) delete mode 100644 docs/release/userguide/userguide.md create mode 100644 docs/release/userguide/userguide.rst (limited to 'docs/release/userguide') diff --git a/docs/release/userguide/index.rst b/docs/release/userguide/index.rst index 501a5ef5..aa568017 100644 --- a/docs/release/userguide/index.rst +++ b/docs/release/userguide/index.rst @@ -1,3 +1,5 @@ +.. _moon-userguide: + .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 .. (c) ruan.he@orange.com & thomas.duval@orange.com diff --git a/docs/release/userguide/userguide.md b/docs/release/userguide/userguide.md deleted file mode 100644 index 6c65320c..00000000 --- a/docs/release/userguide/userguide.md +++ /dev/null @@ -1,114 +0,0 @@ -# Moon Version 4 - -This directory contains all the modules for MoonV4 - - -## Installation -### Prerequisite -```bash -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 interface manager | sudo tee -a /etc/hosts -``` - - -### Docker Engine Configuration -```bash -cat </dev/null -docker container rm -f messenger db keystone consul 2>/dev/null -``` - - -### Internal Network Creation -Create an internal Docker network called `moon` -```bash -docker network create -d bridge --subnet=172.88.88.0/16 --gateway=172.88.88.1 moon -``` - -### Install Moon_DB -Install the moon_db library -```bash -sudo pip3 install moon_db -``` - -## Starting containers manually - -### MySql -Run the standard `MySql` container in the `moon` network and configure it -```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 -moon_db_manager upgrade -``` - -### moon_keystone -Run the `keystone` container (created by the `Moon` project) in the `moon` network -```bash -docker container run -dti --net moon --hostname keystone --name keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 wukongsun/moon_keystone:ocata -``` - -### Consul -Run the standard `Consul` container in the `moon` network -```bash -docker run -d --net=moon --name=consul --hostname=consul -p 8500:8500 consul -``` - -### Moon platform - -```bash -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 - -To start the `Moon` framework, you only have to run the `bootstrap` script -```bash -python3 bin/bootstrap.py -``` -The script will ask you to start one or more Moon containers - -### Tests -```bash -sudo pip3 install pytest -cd tests -pytest -``` - -### Run scenario -```bash -sudo pip3 install requests -cd tests -python3 populate_default_values.py -v scenario/rbac.py -python3 send_authz.py -v scenario/rbac.py -``` - - - -## Log -### Get some logs -```bash -docker container ps -docker logs db -docker logs messenger -docker logs keystone -docker logs router -docker logs manager -docker logs interface -``` diff --git a/docs/release/userguide/userguide.rst b/docs/release/userguide/userguide.rst new file mode 100644 index 00000000..dee626c8 --- /dev/null +++ b/docs/release/userguide/userguide.rst @@ -0,0 +1,124 @@ +Moon Version 4 +============== + +This directory contains all the modules for MoonV4 + +Installation +------------ + +Prerequisite +~~~~~~~~~~~~ + + 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 interface manager | sudo tee -a /etc/hosts + +Docker Engine Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + cat </dev/null + docker container rm -f messenger db keystone consul 2>/dev/null + + +Internal Network Creation +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Create an internal Docker network called `moon` + + docker network create -d bridge --subnet=172.88.88.0/16 --gateway=172.88.88.1 moon + +Install Moon_DB +--------------- + +Install the moon_db library + + sudo pip3 install moon_db + +Starting containers manually +---------------------------- + +MySql +~~~~~ + +Run the standard `MySql` container in the `moon` network and configure it + + 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 + + docker container run -dti --net moon --hostname keystone --name keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 wukongsun/moon_keystone:ocata + +Consul +~~~~~~ + +Run the standard `Consul` container in the `moon` network + + docker run -d --net=moon --name=consul --hostname=consul -p 8500:8500 consul + +Moon platform +~~~~~~~~~~~~~ + + 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 +--------------------------------- + +To start the `Moon` framework, you only have to run the `bootstrap` script + + python3 bin/bootstrap.py + +The script will ask you to start one or more Moon containers + +Tests +~~~~~ + + sudo pip3 install pytest + cd tests + pytest + +Run scenario +~~~~~~~~~~~~ + + sudo pip3 install requests + cd tests + python3 populate_default_values.py -v scenario/rbac.py + python3 send_authz.py -v scenario/rbac.py + +Log +--- + +Get some logs +~~~~~~~~~~~~~ + + docker container ps + docker logs db + docker logs messenger + docker logs keystone + docker logs router + docker logs manager + docker logs interface -- cgit 1.2.3-korg