aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMatthieuGeerebaert <matthieu.geerebaert@orange.com>2018-05-15 16:25:41 +0200
committerMatthieuGeerebaert <matthieu.geerebaert@orange.com>2018-05-16 11:42:43 +0200
commit9d353deac4cbdeada20028515817314bfed02f0c (patch)
tree5d98d0178d043f9eab334aa9ea375e04b4a8d295 /docs
parent12875d9ac2e33ba4edbdee4f840813611786508c (diff)
Update installation note
Change-Id: I802ec6821ed206dde39fc3e4b8e1f68212332639 Issue-ID: EXTAPI-88 Signed-off-by: MatthieuGeerebaert <matthieu.geerebaert@orange.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/installation/installation.rst104
1 files changed, 75 insertions, 29 deletions
diff --git a/docs/installation/installation.rst b/docs/installation/installation.rst
index e5473e4..5fce7b8 100644
--- a/docs/installation/installation.rst
+++ b/docs/installation/installation.rst
@@ -7,50 +7,96 @@
Installation
============
+This document describes local build and installation for development purpose
+Build
+-----
+
+Requirements
+
+* Java 8
+* Maven
+* port 8080 should be free, used by tests
+
+Build
+::
+
+ mvn clean package
+
+Run
+---
+
+**Maven**
-Environment
------------
+Requirements
-**Locally**
+* Java 8
+* Maven
+* MongoDB
+* MariaDB
-Ensure that you have a MongoDB and MariaDB instance running and properly
-configured in *application.properties* file.
-Run *Application.java* class in your favorite IDE
+Review and edit *src/main/resources/application.properties*
-Or through a terminal, ensure that your maven installation is works and
-run *mvn spring-boot:run* command to start the application.
+Defaults
+ Mongo, host=localhost, port=27017, database=ServiceOrderDB
+
+ Mariadb, url=jdbc:mariadb://localhost:3306/nbi, username=root, password=secret
+
+Run
+::
+
+ mvn spring-boot:run
**Docker**
-Requirements: `Docker engine <https://docs.docker.com/engine/>`_ and
-`docker-compose <https://docs.docker.com/compose/>`_.
+Requirements
-To start the application:
- 1. Generate the application .jar file: `$ mvn clean package`
- 2. Configure the **.env** file
- 3. Start the *MariaDB* and *MongoDB* services:
- `$ docker-compose up -d mongo mariadb`
- 4. Build and start the *NBI* service: `$ docker-compose up --build -d nbi`
+* Docker
+* Docker-compose
-You can view the log output of the application with the following command:
+Edit *docker-compose.yml* to select previous generated local build, replace::
-`$ docker-compose logs -f nbi`
+ image: ${NEXUS_DOCKER_REPO}/onap/externalapi/nbi:latest
+by::
-Steps
------
+ build: .
+
+Run::
+
+ docker-compose up -d mongo mariadb
+
+ docker-compose up --build -d nbi
+
+Logs::
+
+ docker-compose logs -f nbi
+
+
+Test
+----
+
+**Healthcheck**
+
+http://localhost:8080/nbi/api/v1/status
+
+You should get::
+
+ {
+ "name": "nbi",
+ "status": "ok",
+ "version": "v1"
+ }
+
+**Play with RESTclient**
+
+You can also test NBI with `VisualStudio RestClient plugin <https://github.com/Huachao/vscode-restclient>`_
-**Testing**
-When the application is running, you can access the API at
-:samp:`http://yourhostname:8080/nbi/api/v1/` and fill the URL with the name
-of the resources you asking for (/serviceSpecification, /service,
-/serviceOrder or /status)
-You can run a test by using `VisualStudio RestClient
-plugin <https://github.com/Huachao/vscode-restclient>`_
See the *restclient* package at root level to find *.vscode/settings.json*
configuration file and */json/* package with samples requests that can be run.
-You can also trigger these endpoints with any RESTful client or
-automation framework.
+
+**Play with Postman**
+
+A collection is available here *docs/offeredapis/postman*