DMAAP-83 Initial code import
[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 ### Configurable Parameters
27
28 Behavior of the API is controlled by settings in a properties file (typically etc/dmaapbc.properties).
29 The following describes these properties:
30
31 ```
32
33 #
34 #       Configuration parameters fixed at startup for the DMaaP Bus Controller
35 #
36 #
37 #       URI to retrieve dynamic DR configuration
38 #
39 ProvisioningURI:        /internal/prov
40 #
41 #       Allow http access to API 
42 #
43 HttpAllowed:    true
44 #
45 #       The port number for http as seen within the server
46 #
47 IntHttpPort:    8080
48 #
49 #       The port number for https as seen within the server
50 #   Set to 0 if no certificate is available yet...
51 #
52 IntHttpsPort:   8443
53 #
54 #       The external port number for https taking port mapping into account
55 #
56 ExtHttpsPort:   443
57 #
58 #       The type of keystore for https
59 #
60 KeyStoreType:   jks
61 #
62 #       The path to the keystore for https
63 #
64 KeyStoreFile:   etc/keystore
65 #
66 #       The password for the https keystore
67 #
68 KeyStorePassword:       changeit
69 #
70 #       The password for the private key in the https keystore
71 #
72 KeyPassword:    changeit
73 #
74 #       The type of truststore for https
75 #
76 TrustStoreType: jks
77 #
78 #       The path to the truststore for https
79 #
80 TrustStoreFile: /opt/app/java/jdk/jdk180/jre/security/cacerts
81 #
82 #       The password for the https truststore
83 #
84 TrustStorePassword:     changeit
85 #
86 #       The path to the file used to trigger an orderly shutdown
87 #
88 QuiesceFile:    etc/SHUTDOWN
89 #
90 #       Enable postgress
91 #
92 UsePGSQL:       true
93 #
94 #       The host for postgres access
95 #
96 DB.host:        HostNotSet
97 #
98 #       For postgres access
99 #
100 DB.cred:        ValueNotSet
101 #
102 #       Name of this environment
103 #
104 DmaapName:      DeploymentEnvName
105 #
106 #       Name of DR prov server
107 #
108 DR.provhost:    dcae-drps.domain.notset.com
109 #
110 #       The Role and credentials of the MirrorMaker Provisioner.  This is used by DMaaP Bus Controller to pub to the provisioning topic
111 #   Not part of 1701
112 #
113 #MM.ProvRole: org.openecomp.dmaapBC.MMprov.prov
114 #MM.ProvUserMechId: idNotSet@namespaceNotSet
115 #MM.ProvUserPwd: enc:fMxh-hzYZldbtyXumQq9aJU08SslhbM6mXtt
116 #
117 #       The Role of the MirrorMaker Agent. This is used by MM to sub to provisioning topic
118 #
119 MM.AgentRole: org.openecomp.dmaapBC.MMagent.agent
120 #################
121 # AAF Properties:
122 #
123 # regarding password encryption:
124 # 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:
125 #
126 # java \u2013jar wherever/cadi-core-*.jar keygen keyfilename
127 # chmod 400 keyfilename
128 #
129 # To encrypt a key:
130 #
131 # java \u2013jar wherever/cadi-core-*.jar digest password-to-encrypt keyfilename
132 #
133 # This will generate a string.  Put \u201Cenc:\u201D on the front of the string, and put the result in this properties file.
134 #
135 # Location of the Codec Keyfile which is used to decrypt passwords in this properties file before they are passed to AAF
136 #
137 # REF: https://wiki.domain.notset.com/display/cadi/CADI+Deployment
138 #
139 CredentialCodecKeyfile: etc/LocalKey
140 #
141 # URL of AAF environment to use.
142 #
143 aaf.URL:        https://authentication.simpledemo.openecomp.org:8095/proxy/
144 #
145 # TopicMgr mechid@namespace
146 #
147 aaf.TopicMgrUser:       idNotSet@namespaceNotSet
148 #
149 # TopicMgr password
150
151 aaf.TopicMgrPassword:   enc:zyRL9zbI0py3rJAjMS0dFOnYfEw_mJhO
152 #
153 # Bus Controller Namespace Admin  mechid@namespace
154 #
155 aaf.AdminUser:  idNotSet@namespaceNotSet
156 #
157 # Bus Controller Namespace Admin password
158 #
159 aaf.AdminPassword:      enc:YEaHwOJrwhDY8a6usetlhbB9mEjUq9m
160 #
161 # endof AAF Properties
162 #################
163 #################
164 # PolicyEngine Properties
165 #
166 # Flag to turn on/off Authentication
167 UsePE: false
168 #
169 # Argument to decisionAttributes.put("AAF_ENVIRONMENT", X); 
170 # where X is:  TEST= UAT, PROD = PROD, DEVL = TEST
171 #
172 PeAafEnvironment: DEVL
173 #
174 # Name of PolicyEngineApi properties file
175 PolicyEngineProperties: config/PolicyEngineApi.properties
176 #
177 # Namespace for URI values for API used to create AAF permissions
178 # e.g. if ApiNamespace is X.Y..dmaapBC.api then for URI /topics we create an AAF perm X.Y..dmaapBC.api.topics
179 ApiNamespace: org.onap.dmaap.dbcapi
180 #
181 # endof PolicyEngineProperties
182 #################
183
184 ```
185
186
187