Remove OpenECOMP from license file
[aai/model-loader.git] / Readme.md
1 # Introduction
2
3 The A&AI Model Loader Service is an application that facilitates
4 distribution, ingestion of new service and resource models, and vnf
5 catalogs from the SDC to the A&AI.
6
7 ## Features
8
9 The Model Loader:
10
11 * registers with the SDC to receive notification events 
12 * polls the UEB/DMaap cluster for notification events
13 * downloads artifacts from SDC upon receipt of a distribution event
14 * pushes distribution components to A&AI
15                     
16 ## Compiling Model Loader
17
18 Model Loader can be compiled by running `mvn clean install`
19 A Model Loader docker image can be created by running `docker build -t openecomp/model-loader target`
20
21 ## Running Model Loader 
22
23 ### Deploying The Micro Service 
24
25 Push the Docker image that you have built to your Docker repository and pull it down to the location that you will be running the search service from.
26
27 **Create the following directories on the host machine:**
28
29     ./logs
30     ./opt/app/model-loader/appconfig
31     ./opt/app/model-loader/appconfig/auth
32     
33 You will be mounting these as data volumes when you start the Docker container.  For examples of the files required in these directories, see the aai/test/config repository (https://gerrit.onap.org/r/#/admin/projects/aai/test-config)
34
35 **Populate these directories as follows:**
36
37 ##### Contents of /opt/app/model-loader/appconfig
38
39 The following file must be present in this directory on the host machine:
40     
41 _model-loader.properties_  
42     # Always false.  TLS Auth currently not supported 
43     ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
44     
45     # Address/port of the SDC
46     ml.distribution.ASDC_ADDRESS=<SDC-Hostname>:8443
47     
48     # DMaaP consumer group.  
49     ml.distribution.CONSUMER_GROUP=aai-ml-group
50     
51     # DMaaP consumer ID
52     ml.distribution.CONSUMER_ID=aai-ml
53     
54     # SDC Environment Name.  This must match the environment name configured on the SDC
55     ml.distribution.ENVIRONMENT_NAME=<Environment Name>
56     
57     # Currently not used
58     ml.distribution.KEYSTORE_PASSWORD=
59     
60     # Currently not used
61     ml.distribution.KEYSTORE_FILE=
62     
63     # Obfuscated password to connect to the SDC.  To obtain this value, use the following Jetty library to 
64     # obfuscate the cleartext password:  http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html
65     ml.distribution.PASSWORD=OBF:<password>
66     
67     # How often (in seconds) to poll the DMaaP cluster for new model events
68     ml.distribution.POLLING_INTERVAL=<integer>
69     
70     # Timeout value (in seconds) when polling DMaaP for new model events
71     ml.distribution.POLLING_TIMEOUT=<integer>
72     
73     # Username to use when connecting to the SDC
74     ml.distribution.USER=<username>
75     
76     # Artifact type we want to download from the SDC (the values below will typically suffice)
77     ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
78
79     # URL of the A&AI
80     ml.aai.BASE_URL=https://<AAI-Hostname>:8443
81     
82     # A&AI endpoint to post models
83     ml.aai.MODEL_URL=/aai/v*/service-design-and-creation/models/model/
84     
85     # A&AI endpoint to post named queries
86     ml.aai.NAMED_QUERY_URL=/aai/v*/service-design-and-creation/named-queries/named-query/
87     
88     # A&AI endpoint to post vnf images
89     ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
90     
91     # Name of certificate to use in connecting to the A&AI
92     ml.aai.KEYSTORE_FILE=aai-os-cert.p12
93     
94     # Obfuscated keystore password to connect to the A&AI.  This is only required if using 2-way SSL (not basic auth).
95     # To obtain this value, use the following Jetty library to obfuscate the cleartext password:
96     # http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html
97     ml.aai.KEYSTORE_PASSWORD=OBF:<password>
98     
99     # Name of user to use when connecting to the A&AI.  This is only required if using basic auth (not 2-way SSL).
100     ml.aai.AUTH_USER=<username>
101     
102     # Obfuscated password to connect to the A&AI.  This is only required if using basic auth (not 2-way SSL).
103     # To obtain this value, use the following Jetty library to obfuscate the cleartext password:
104     # http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html
105     ml.aai.AUTH_PASSWORD=OBF:<password>
106     
107
108
109 ##### Contents of the /opt/app/model-loader/app-config/auth Directory
110
111 The following files must be present in this directory on the host machine:
112
113 _aai-os-cert.p12_
114
115 The certificate used to connected to the A&AI
116
117 **Start the service:**
118
119 You can now start the Docker container for the _Search Data Service_, in the following manner:
120
121         docker run -d \
122                 -e CONFIG_HOME=/opt/app/model-loader/config/ \
123             -v /logs:/logs \
124             -v /opt/app/model-loader/appconfig:/opt/app/model-loader/config \
125             --name model-loader \
126             {{your docker repo}}/model-loader
127     
128 Where,
129
130     {{your docker repo}} = The Docker repository you have published your image to.