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.
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
16 ## Compiling Model Loader
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`
21 ## Running Model Loader
23 ### Deploying The Micro Service
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.
27 **Create the following directories on the host machine:**
30 ./opt/app/model-loader/appconfig
31 ./opt/app/model-loader/appconfig/auth
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)
35 **Populate these directories as follows:**
37 ##### Contents of /opt/app/model-loader/appconfig
39 The following file must be present in this directory on the host machine:
41 _model-loader.properties_
42 # Always false. TLS Auth currently not supported
43 ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
45 # Address/port of the SDC
46 ml.distribution.ASDC_ADDRESS=<SDC-Hostname>:8443
48 # DMaaP consumer group.
49 ml.distribution.CONSUMER_GROUP=aai-ml-group
52 ml.distribution.CONSUMER_ID=aai-ml
54 # SDC Environment Name. This must match the environment name configured on the SDC
55 ml.distribution.ENVIRONMENT_NAME=<Environment Name>
58 ml.distribution.KEYSTORE_PASSWORD=
61 ml.distribution.KEYSTORE_FILE=
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>
67 # How often (in seconds) to poll the DMaaP cluster for new model events
68 ml.distribution.POLLING_INTERVAL=<integer>
70 # Timeout value (in seconds) when polling DMaaP for new model events
71 ml.distribution.POLLING_TIMEOUT=<integer>
73 # Username to use when connecting to the SDC
74 ml.distribution.USER=<username>
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
80 ml.aai.BASE_URL=https://<AAI-Hostname>:8443
82 # A&AI endpoint to post models
83 ml.aai.MODEL_URL=/aai/v*/service-design-and-creation/models/model/
85 # A&AI endpoint to post named queries
86 ml.aai.NAMED_QUERY_URL=/aai/v*/service-design-and-creation/named-queries/named-query/
88 # A&AI endpoint to post vnf images
89 ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
91 # Name of certificate to use in connecting to the A&AI
92 ml.aai.KEYSTORE_FILE=aai-os-cert.p12
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>
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>
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>
109 ##### Contents of the /opt/app/model-loader/app-config/auth Directory
111 The following files must be present in this directory on the host machine:
115 The certificate used to connected to the A&AI
117 **Start the service:**
119 You can now start the Docker container for the _Search Data Service_, in the following manner:
122 -e CONFIG_HOME=/opt/app/model-loader/config/ \
124 -v /opt/app/model-loader/appconfig:/opt/app/model-loader/config \
125 --name model-loader \
126 {{your docker repo}}/model-loader
130 {{your docker repo}} = The Docker repository you have published your image to.