Merge "release 6.0.3 jar for free_radius gating test"
[externalapi/nbi.git] / docs / installation / installation.rst
1 .. SPDX-License-Identifier: CC-BY-4.0
2 .. Copyright 2018 ORANGE
3
4
5 Installation
6 ============
7
8 This document describes local build and installation for development purpose
9
10 Build
11 -----
12
13 Requirements
14
15 * Java 11
16 * Maven
17 * port 8080 should be free, used by tests
18
19 Build
20 ::
21
22     mvn clean package
23
24 Run
25 ---
26
27 **Maven**
28
29 Requirements
30
31 * Java 11
32 * Maven
33 * MongoDB
34 * MariaDB
35
36 Review and edit *src/main/resources/application.properties*
37
38 Defaults
39
40     Mongo, host=localhost, port=27017, database=ServiceOrderDB
41
42     Mariadb, url=jdbc:mariadb://localhost:3306/nbi, username=root,
43     password=secret
44
45 Run
46 ::
47
48     mvn spring-boot:run
49
50 **Docker**
51
52 Requirements
53
54 * Docker
55 * Docker-compose
56 * Free ports 8080 and 8443
57
58 Edit *docker-compose.yml* to select previous generated local build, replace::
59
60     image: ${NEXUS_DOCKER_REPO}/onap/externalapi/nbi:latest
61
62 by::
63
64     build: .
65
66 Run::
67
68     docker-compose up -d mongo mariadb
69
70     docker-compose up --build -d nbi
71
72 Logs::
73
74     docker-compose logs -f nbi
75
76
77 Test
78 ----
79
80 **Healthcheck**
81
82 http://localhost:8080/nbi/api/v4/status
83
84 and
85
86 https://localhost:8443/nbi/api/v4/status
87
88 You should get::
89
90     {
91         "name": "nbi",
92         "status": "ok",
93         "version": "v4"
94     }
95
96 **Play with RESTclient**
97
98 You can also test NBI with `VisualStudio RestClient plugin <https://github.com/Huachao/vscode-restclient>`_
99
100 See the *restclient* package at root level to find *.vscode/settings.json*
101 configuration file and */json/* package with samples requests that can be run.
102
103 **Play with Postman**
104
105 A collection is available here *docs/offeredapis/postman*