Check all rst files
[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 8
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 8
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
57 Edit *docker-compose.yml* to select previous generated local build, replace::
58
59     image: ${NEXUS_DOCKER_REPO}/onap/externalapi/nbi:latest
60
61 by::
62
63     build: .
64
65 Run::
66
67     docker-compose up -d mongo mariadb
68
69     docker-compose up --build -d nbi
70
71 Logs::
72
73     docker-compose logs -f nbi
74
75
76 Test
77 ----
78
79 **Healthcheck**
80
81 http://localhost:8080/nbi/api/v3/status
82
83 You should get::
84
85     {
86         "name": "nbi",
87         "status": "ok",
88         "version": "v3"
89     }
90
91 **Play with RESTclient**
92
93 You can also test NBI with `VisualStudio RestClient plugin <https://github.com/Huachao/vscode-restclient>`_
94
95 See the *restclient* package at root level to find *.vscode/settings.json*
96 configuration file and */json/* package with samples requests that can be run.
97
98 **Play with Postman**
99
100 A collection is available here *docs/offeredapis/postman*