1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
7 Etsicatalog is a web application based on python3 and Django framework.
15 Etsicatalog can run standalone. However, if you want to try the whole functionality, you should have other components like SDC, DMaap(Non-mandatory), MSB(Non-mandatory) running.
17 You should set the component information in the environment variables as followed:
20 SDC_ADDR=https://{SDC_IP}:30204
22 MSB_ADDR=https://{MSB_IP}:30283
24 DMAAP_ADDR=https://{DMAAP_IP}:30226
28 * The default value of MSB_ENABLED is **false**. Since Guilin Release, MSB is a **Non-mandatory** component. If you have no MSB installed or intention to use it, you can just omit MSB_ADDR and MSB_ENABLED.
29 * The default value of DMAAP_ENABLED is **false**. If you want to use SDC subscription and notification function, you should set it true and set DMAAP_ADDR properly.
37 $ git clone https://gerrit.onap.org/r/modeling/etsicatalog
42 $ cd /resources/dbscripts/mysql
44 Run modeling-etsicatalog-createdb.sql to create database.
46 Run commands followed to init database::
48 $ python manage.py makemigrations
49 $ python manage.py makemigrations database
50 $ python manage.py migrate
51 $ python manage.py migrate database
53 Review and edit \catalog\pub\config\config.py
55 MySQL default configuration is as follows::
59 DB_NAME = "etsicatalog"
60 DB_USER = "etsicatalog"
61 DB_PASSWD = "etsicatalog"
65 $ python manage.py runserver 8806
74 GET /api/catalog/v1/health_check
82 **View API document**:
84 http://127.0.0.1:8806/api/catalog/v1/swagger
88 ----------------------
90 You can run Modeling/etsicatalog directly from the docker image by following commands:
93 $ docker run -d -p 3306:3306 --name etsicatalog-db -v /var/lib/mysql -e MYSQL_USER="etsicatalog" -e MYSQL_PASSWORD="etsicatalog" -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE="etsicatalog" nexus3.onap.org:10001/library/mariadb
95 $ docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' etsicatalog-db
96 Get the IP of etsicatalog-db
98 $ docker run -d --name modeling-etsicatalog -v /var/lib/mysql -e DB_IP=<ip address> -e SDC_ADDR=<ip address> nexus3.onap.org:10001/onap/modeling/etsicatalog
102 You can also build the docker image instead of using the existed image from nexus3.onap.org:10001.
106 $ docker build -t ${IMAGE_NAME} .