Documentation improvement
[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.servlet.context-path          = /nbi/api/${nbi.version}
27     server.port                          = 8080
28
29     # LOGGING
30     logging.level.                       = WARN
31     logging.level.org.springframework    = OFF
32     logging.level.org.onap               = INFO
33     logging.level.root                   = WARN
34     spring.main.banner-mode              = off
35
36     # ONAP
37     onap.lcpCloudRegionId                = RegionOne
38     onap.tenantId                        = 6e97a2bd51d74f6db5671d8dc1517d82
39     onap.cloudOwner                      = CloudOwner
40
41     # NBI
42     nbi.url                              = http://localhost:${server.port}${server.servlet.context-path}
43     nbi.callForVNF                       = false
44
45     # SCHEDULER
46     scheduler.pollingDurationInMins      = 360
47     serviceOrder.schedule                = 5000
48     serviceOrder.initial                 = 1
49     executionTask.schedule               = 2000
50     executionTask.initial                = 1
51     dmaapCheck.schedule                  = 10000
52     dmaapCheck.initial                   = 1
53
54     # SDC
55     sdc.host                             = http://10.0.3.1:8080
56     sdc.header.ecompInstanceId           = demo
57     sdc.header.authorization             = Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
58     # AAI
59
60     aai.host                             = https://10.0.1.1:8443
61     aai.header.authorization             = Basic QUFJOkFBSQ==
62     aai.api.id                           = NBI
63     aai.header.transaction.id            = 808b54e3-e563-4144-a1b9-e24e2ed93d4f
64
65     # SO
66     so.host                              = http://10.0.5.1:8080
67     so.header.authorization              = Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
68     so.api.id                            = SO
69     so.owning.entity.id                  = 6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e
70     so.owning.entity.name                = OE-generic
71     so.project.name                      = Project-generic
72
73     # DMAAP
74     dmaap.host                           = http://10.0.6.1:3904
75     dmaap.aai.topic                      = AAI-EVENT
76     dmaap.sdc.topic                      = SDC-DISTR-NOTIF-TOPIC-AUTO
77     dmaap.consumergroup                  = NBICG1
78     dmaap.consumerid                     = NBIC1
79     dmaap.timeout                        = 2000
80
81     # MSB
82     msb.enabled                          = true
83     msb.discovery.host                   = msb_discovery
84     msb.discovery.port                   = 10081
85     msb.discovery.retry                  = 1
86     msb.discovery.retry_interval         = 5000
87     msb.service.host                     =
88     msb.service.name                     = nbi
89     msb.service.custom_path              =
90     msb.service.protocol                 = REST
91     msb.service.visual_range             = 1
92     msb.service.enable_ssl               = false
93
94     # MONGO
95     spring.data.mongodb.host             = localhost
96     spring.data.mongodb.port             = 27017
97     spring.data.mongodb.database         = ServiceOrderDB
98
99     # MYSQL
100     spring.datasource.url                = jdbc:mariadb://localhost:3306/nbi
101     spring.datasource.username           = root
102     spring.datasource.password           = secret
103     spring.datasource.testWhileIdle      = true
104     spring.datasource.validationQuery    = SELECT 1
105     spring.datasource.driver-class-name  = org.mariadb.jdbc.Driver
106     spring.jpa.show-sql                  = false
107     spring.jpa.hibernate.ddl-auto        = update
108     spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
109
110 ***************
111 Changing values
112 ***************
113
114 To adapt application parameters to your context, you need to set up some
115 environment attributes. For example :
116
117 ::
118
119       SPRING_DATASOURCE_PASSWORD: your own value here
120       SPRING_DATASOURCE_USERNAME: your own value here
121       SDC_HOST: http://${SDC_IP}:8080
122       AAI_HOST: https://${AAI_IP}:8443
123       SO_HOST: http://${SO_IP}:8080
124       DMAAP_HOST: http://${DMAAP_IP}:3904
125