summaryrefslogtreecommitdiffstats
path: root/docs/installation
diff options
context:
space:
mode:
authorMatthieu Geerebaert <matthieu.geerebaert@orange.com>2020-04-22 17:32:27 +0200
committerMatthieu Geerebaert <matthieu.geerebaert@orange.com>2020-04-22 17:37:54 +0200
commitc663b5011fd9564a70f51a674ec5f3c34bdc9d90 (patch)
tree509a66dada34473b545c2b205e846d151b4346e9 /docs/installation
parent56b5ba4208b6cf4f3033946dee488002e7d1d7ee (diff)
Update documentation regarding HTTP / HTTPS
Change-Id: Id99bf0fc75d00ebee150620340fd8cf6962d1144 Issue-ID: EXTAPI-443 Signed-off-by: MatthieuGeerebaert <matthieu.geerebaert@orange.com>
Diffstat (limited to 'docs/installation')
-rw-r--r--docs/installation/installation.rst101
1 files changed, 76 insertions, 25 deletions
diff --git a/docs/installation/installation.rst b/docs/installation/installation.rst
index 95b7279..38ecb3c 100644
--- a/docs/installation/installation.rst
+++ b/docs/installation/installation.rst
@@ -5,7 +5,8 @@
Installation
============
-This document describes local build and installation for development purpose
+This document describes local installation for development purpose
+It also describes some keypoints for understanding NBI in OOM context
Build
-----
@@ -14,17 +15,14 @@ Requirements
* Java 11
* Maven
-* port 8080 should be free, used by tests
+* free port 8080, used by tests
-Build
-::
+Build::
mvn clean package
-Run
----
-
-**Maven**
+Alternative 1 run SpringBoot application
+----------------------------------------
Requirements
@@ -42,18 +40,18 @@ Defaults
Mariadb, url=jdbc:mariadb://localhost:3306/nbi, username=root,
password=secret
-Run
-::
+Run::
mvn spring-boot:run
-**Docker**
+Alternative 2 run docker
+------------------------
Requirements
* Docker
* Docker-compose
-* Free ports 8080 and 8443
+* Free ports 8080
Edit *docker-compose.yml* to select previous generated local build, replace::
@@ -74,16 +72,14 @@ Logs::
docker-compose logs -f nbi
-Test
-----
+Local tests
+-----------
-**Healthcheck**
+Status is available at http://localhost:8080/nbi/api/v4/status
-http://localhost:8080/nbi/api/v4/status
+Running a standalone test::
-and
-
-https://localhost:8443/nbi/api/v4/status
+ curl "http://localhost:8080/nbi/api/v4/status"
You should get::
@@ -93,13 +89,68 @@ You should get::
"version": "v4"
}
-**Play with RESTclient**
+Play with Postman
+-----------------
+
+A full collection of requests is available in *docs/offeredapis/postman* for inspiration
+
+OOM Context
+-----------
+
+**Healthcheck**
+
+Running a standalone test::
+
+ curl "https://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/status"
+
+ {
+ "name": "nbi",
+ "status": "ok",
+ "version": "v4"
+ }
+
+Running an integration test with SO, SDC, DMAAP, AAI::
+
+ curl "https://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/status?fullStatus=true"
+
+ {
+ "name": "nbi",
+ "status": "ok",
+ "version": "v4",
+ "components": [
+ {
+ "name": "so connectivity",
+ "status": "ok"
+ },
+ {
+ "name": "sdc connectivity",
+ "status": "ok"
+ },
+ {
+ "name": "dmaap connectivity",
+ "status": "ok"
+ },
+ {
+ "name": "aai connectivity",
+ "status": "ok"
+ }
+ ]
+ }
+
+**Understanding OOM deployment**
+
+NBI uses AAF init container to generate valid server certificate, signed by ONAP Root CA.
+This server certificate is used for TLS over HTTP.
+
+Passing specific JAVA_OPTS to NBI SpringBoot java app will enable HTTPS.
-You can also test NBI with `VisualStudio RestClient plugin <https://github.com/Huachao/vscode-restclient>`_
+Here are some OOM related files which could help to understand how HTTPS is set up.
-See the *restclient* package at root level to find *.vscode/settings.json*
-configuration file and */json/* package with samples requests that can be run.
+Search for JAVA_OPTS in
+https://github.com/onap/oom/blob/master/kubernetes/nbi/templates/deployment.yaml
-**Play with Postman**
+AAF values
+https://github.com/onap/oom/blob/master/kubernetes/nbi/values.yaml
-A collection is available here *docs/offeredapis/postman*
+AAF init container
+https://github.com/onap/oom/blob/master/kubernetes/nbi/templates/configmap-aaf-add-config.yaml