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