Correct bad spelling words
[externalapi/nbi.git] / docs / installation / installation.rst
1 .. This work is licensed under
2 .. a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. Copyright 2018 ORANGE
5
6
7 Installation
8 ============
9
10
11
12 Environment
13 -----------
14
15 **Locally**
16
17 Ensure that you have a MongoDB and MariaDB instance running and properly
18 configured in *application.properties* file.
19 Run *Application.java* class in your favorite IDE
20
21 Or through a terminal, ensure that your maven installation is works and
22 run *mvn spring-boot:run* command to start the application.
23
24
25 **Docker**
26
27 Requirements: `Docker engine <https://docs.docker.com/engine/>`_ and
28 `docker-compose <https://docs.docker.com/compose/>`_.
29
30 To start the application:
31     1. Generate the application .jar file: `$ mvn clean package`
32     2. Configure the **.env** file
33     3. Start the *MariaDB* and *MongoDB* services:
34        `$ docker-compose up -d mongo mariadb`
35     4. Build and start the *NBI* service: `$ docker-compose up --build -d nbi`
36
37 You can view the log output of the application with the following command:
38
39 `$ docker-compose logs -f nbi`
40
41
42 Steps
43 -----
44
45 **Testing**
46 When the application is running, you can access the API at
47 :samp:`http://yourhostname:8080/nbi/api/v1/` and fill the URL with the name
48 of the resources you asking for (/serviceSpecification, /service,
49 /serviceOrder or /status)
50 You can run a test by using `VisualStudio RestClient
51 plugin <https://github.com/Huachao/vscode-restclient>`_
52 See the *restclient* package at root level to find *.vscode/settings.json*
53 configuration file and */json/* package with samples requests that can be run.
54 You can also trigger these endpoints with any RESTful client or
55 automation framework.
56