00e4d8cab4f382f693dc8b285362a60f2dfe7def
[dmaap/dbcapi.git] / README.md
1 DMaaP Bus Controller API
2 =======================
3
4 Data Movement as a Platform (DMaaP) Bus Controller provides an API for other ONAP infrastructure components to provision DMaaP resources.
5 A typical DMaaP resource is a Data Router Feed or a Message Router Topic, and their associated publishers and subscribers.
6 Other infrastucture resources such as DR Nodes and MR Clusters are also provisioned through this API.
7
8 ### Build Instructions for a Continuous Integration environment using Jenkins
9
10 When this component is included in a Continuous Integration environment, such as structured by the Linux Foundation, the artifacts can be created and deployed via Jenkins.  The following maven targets are currently supported in the Build step:
11 ```
12 clean install
13 javadoc:javadoc
14 sonar:sonar
15 ```
16
17 ### Build Instructions for external developers
18
19 This project is organized as a mvn project for a jar package.
20 After cloning from this git repo:
21
22 ```
23 mvn clean install javadoc:javadoc
24 ```
25
26 A description of the API is generated, and found in targets/generated-source/swagger.json.
27
28 ### Configurable Parameters
29
30 Behavior of the API is controlled by settings in a properties file (typically etc/dmaapbc.properties).
31 The following describes these properties:
32
33 ```
34
35 #
36 #       Configuration parameters fixed at startup for the DMaaP Bus Controller
37 #
38 #
39 #       URI to retrieve dynamic DR configuration
40 #
41 ProvisioningURI:        /internal/prov
42 #
43 #       Allow http access to API 
44 #
45 HttpAllowed:    true
46 #
47 #       The port number for http as seen within the server
48 #
49 IntHttpPort:    8080
50 #
51 #       The port number for https as seen within the server
52 #   Set to 0 if no certificate is available yet...
53 #
54 IntHttpsPort:   8443
55 #
56 #       The external port number for https taking port mapping into account
57 #
58 ExtHttpsPort:   443
59 #
60 #       The type of keystore for https
61 #
62 KeyStoreType:   jks
63 #
64 #       The path to the keystore for https
65 #
66 KeyStoreFile:   etc/keystore
67 #
68 #       The password for the https keystore
69 #
70 KeyStorePassword:       changeit
71 #
72 #       The password for the private key in the https keystore
73 #
74 KeyPassword:    changeit
75 #
76 #       The type of truststore for https
77 #
78 TrustStoreType: jks
79 #
80 #       The path to the truststore for https
81 #
82 TrustStoreFile: /opt/app/java/jdk/jdk180/jre/security/cacerts
83 #
84 #       The password for the https truststore
85 #
86 TrustStorePassword:     changeit
87 #
88 #       The path to the file used to trigger an orderly shutdown
89 #
90 QuiesceFile:    etc/SHUTDOWN
91 #
92 #       Enable postgress
93 #
94 UsePGSQL:       true
95 #
96 #       The host for postgres access
97 #
98 DB.host:        HostNotSet
99 #
100 #       For postgres access
101 #
102 DB.cred:        ValueNotSet
103 #
104 #       Name of this environment
105 #
106 DmaapName:      DeploymentEnvName
107 #
108 #       Name of DR prov server
109 #
110 DR.provhost:    dcae-drps.domain.notset.com
111 #
112 #       The Role and credentials of the MirrorMaker Provisioner.  This is used by DMaaP Bus Controller to pub to the provisioning topic
113 #   Not part of 1701
114 #
115 #MM.ProvRole: org.openecomp.dmaapBC.MMprov.prov
116 #MM.ProvUserMechId: idNotSet@namespaceNotSet
117 #MM.ProvUserPwd: enc:fMxh-hzYZldbtyXumQq9aJU08SslhbM6mXtt
118 #
119 #       The Role of the MirrorMaker Agent. This is used by MM to sub to provisioning topic
120 #
121 MM.AgentRole: org.openecomp.dmaapBC.MMagent.agent
122 #################
123 # AAF Properties:
124 #
125 # regarding password encryption:
126 # In the dependencies that Maven retrieves (e.g., under dcae_dmaapbc/target/deps/ is a jar file cadi-core-version.jar.  Generate the key file with:
127 #
128 # java \u2013jar wherever/cadi-core-*.jar keygen keyfilename
129 # chmod 400 keyfilename
130 #
131 # To encrypt a key:
132 #
133 # java \u2013jar wherever/cadi-core-*.jar digest password-to-encrypt keyfilename
134 #
135 # This will generate a string.  Put \u201Cenc:\u201D on the front of the string, and put the result in this properties file.
136 #
137 # Location of the Codec Keyfile which is used to decrypt passwords in this properties file before they are passed to AAF
138 #
139 # REF: https://wiki.domain.notset.com/display/cadi/CADI+Deployment
140 #
141 CredentialCodecKeyfile: etc/LocalKey
142 #
143 # URL of AAF environment to use.
144 #
145 aaf.URL:        https://authentication.simpledemo.openecomp.org:8095/proxy/
146 #
147 # TopicMgr mechid@namespace
148 #
149 aaf.TopicMgrUser:       idNotSet@namespaceNotSet
150 #
151 # TopicMgr password
152
153 aaf.TopicMgrPassword:   enc:zyRL9zbI0py3rJAjMS0dFOnYfEw_mJhO
154 #
155 # Bus Controller Namespace Admin  mechid@namespace
156 #
157 aaf.AdminUser:  idNotSet@namespaceNotSet
158 #
159 # Bus Controller Namespace Admin password
160 #
161 aaf.AdminPassword:      enc:YEaHwOJrwhDY8a6usetlhbB9mEjUq9m
162 #
163 # endof AAF Properties
164 #################
165 #################
166 # PolicyEngine Properties
167 #
168 # Flag to turn on/off Authentication
169 UsePE: false
170 #
171 # Argument to decisionAttributes.put("AAF_ENVIRONMENT", X); 
172 # where X is:  TEST= UAT, PROD = PROD, DEVL = TEST
173 #
174 PeAafEnvironment: DEVL
175 #
176 # Name of PolicyEngineApi properties file
177 PolicyEngineProperties: config/PolicyEngineApi.properties
178 #
179 # Namespace for URI values for API used to create AAF permissions
180 # e.g. if ApiNamespace is X.Y..dmaapBC.api then for URI /topics we create an AAF perm X.Y..dmaapBC.api.topics
181 ApiNamespace: org.onap.dmaap.dbcapi
182 #
183 # endof PolicyEngineProperties
184 #################
185
186 ```
187
188
189