diff options
author | 2020-01-20 15:08:39 +0800 | |
---|---|---|
committer | 2020-01-20 15:11:41 +0800 | |
commit | 7cec085b66fe866444c9d043cbaf958bc5029602 (patch) | |
tree | 7e6447498c7ccfb9f8dc34c44a72f9ce5a953496 /docs/installation.rst | |
parent | 2479a0739895b15a13a07aa8260598483249c621 (diff) |
update document
Issue-ID: MODELING-292
Change-Id: I3a6568d84fb6c04dd9bf0ee6bfe26f722ea463ed
Signed-off-by: dyh <dengyuanhong@chinamobile.com>
Diffstat (limited to 'docs/installation.rst')
-rw-r--r-- | docs/installation.rst | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..6006353 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,69 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Installation +============ + +This document describes local build and installation for development purpose. + +Pre-requisites +-------------- + +* Python3 & pip +* MariaDB + +Build & Run +----------- + +**Clone repository**: +:: + + $ git clone https://gerrit.onap.org/r/modeling/etsicatalog + $ cd etsicatalog + +**Create database**:: + + $ cd /resources/dbscripts/mysql + +Run modeling-etsicatalog-createdb.sql to create database. + +Run commands followed to init database:: + + $ python manage.py makemigrations + $ python manage.py makemigrations database + $ python manage.py migrate + $ python manage.py migrate database + +Review and edit \catalog\pub\config\config.py + +MySQL default configuration is as follows:: + + DB_IP = "127.0.0.1" + DB_PORT = 3306 + DB_NAME = "etsicatalog" + DB_USER = "etsicatalog" + DB_PASSWD = "etsicatalog" + +**Start server**:: + + $ python manage.py runserver 8806 + + + +Test +---- + +**Run Healthcheck**:: + + GET /api/catalog/v1/health_check + +You should get:: + + { + "status": "active" + } + +**View API document**: + +http://127.0.0.1:8806/api/catalog/v1/swagger + |