aboutsummaryrefslogtreecommitdiffstats
path: root/docs/installation.rst
blob: 60063534625b15c1ee0e06ee3029026cec3e3069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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