add info in doc
[externalapi/nbi.git] / docs / configuration / configuration.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2018 ORANGE
4
5
6 Configuration
7 =============
8
9 A configuration file, *src/main/resources/application-localhost.properties* list all the component interface that can be configured depending on the environment were the app is deployed.
10 By default, the application runs with an embedded both MongoDB and MariaDB local instance.
11 This file also list configurations of all the REST interface maid from NBI to other ONAP component such as SDC, AA&I and SO.
12
13
14 Default values
15 ==============
16
17 **SERVER**
18
19 server.contextPath=/nbi/api/v1
20 server.port = 8080
21
22 **LOGGING**
23
24 logging.level.=INFO
25
26 **ONAP**
27
28 onap.lcpCloudRegionId=RegionOne
29 onap.tenantId=6e97a2bd51d74f6db5671d8dc1517d82
30 onap.cloudOwner=CloudOwner
31
32 **NBI**
33
34 nbi.url=http://localhost:8080/nbi/api/v1
35 nbi.callForVNF=false
36
37 **SDC**
38
39 sdc.host=http://10.0.3.1:8080
40 sdc.header.ecompInstanceId=demo
41 sdc.header.authorization=Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
42
43 **AAI**
44
45 aai.host=https://10.0.1.1:8443
46 aai.header.authorization=Basic QUFJOkFBSQ==
47 aai.api.id=AAI
48
49 **SO**
50
51 so.host=http://10.0.5.1:8080
52 so.header.authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
53 so.api.id=SO
54
55 **MONGO**
56
57 spring.data.mongodb.host=localhost
58 spring.data.mongodb.port=27017
59 spring.data.mongodb.database=ServiceOrderDB
60
61 **MYSQL**
62
63 spring.datasource.url=jdbc:mariadb://localhost:3306/nbi
64 spring.datasource.username=root
65 spring.datasource.password=secret
66 spring.datasource.testWhileIdle=true
67 spring.datasource.validationQuery=SELECT 1
68 spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
69 spring.jpa.show-sql=false
70 spring.jpa.hibernate.ddl-auto=update
71 spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
72
73
74 Changing values
75 ===============
76
77 To adapt application parameters to your context, you need to set up some environment attributes. For example :
78
79
80       SPRING_DATASOURCE_PASSWORD: your own value here
81       SPRING_DATASOURCE_USERNAME: your own value here
82       SDC_HOST: http://${SDC_IP}:8080
83       AAI_HOST: https://${AAI_IP}:8443
84       SO_HOST: http://${SO_IP}:8080