Update Poms and Tests
[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
20 ## Running Model Loader 
21
22 ### Create a config file with the following key/values:
23
24 ```
25 DISTR_CLIENT_ASDC_ADDRESS=<SDC_ADDRESS>
26 DISTR_CLIENT_CONSUMER_GROUP=<UEB_CONSUMER_GROUP>  ;;  Uniquely identiy this group of model loaders.
27 DISTR_CLIENT_CONSUMER_ID=<UEB_CONSUMER_GROUP_ID>  ;;  Uniquely identiythis model loader.
28 DISTR_CLIENT_ENVIRONMENT_NAME=<ENVIRONMENT_NAME>  ;;  Environment name configured on the SDC
29 DISTR_CLIENT_PASSWORD=<DISTR_PASSWORD>            ;;  Password to connect to SDC
30 DISTR_CLIENT_USER=<USER_ID>                       ;;  User name to connect to SDC
31                      
32 APP_SERVER_BASE_URL=https://<aai-address>:8443    ;; AAI Address (URL)
33 APP_SERVER_AUTH_USER=<USER_ID>                    ;; User name to connect to AAI
34 APP_SERVER_AUTH_PASSWORD=<PASSWORD>               ;; Password to connect to AAi
35
36 ```
37
38 ### Docker 
39
40 #### Build your own Model Loader docker image and create docker containers
41 1. mvn clean package docker:build                 ;; Build a docker image of Model Loader
42 2. sudo docker images                             ;; list docker images and check if the image you build is listed.
43 3. sudo docker run --env-file <config-filename> <model-loader-image> /opt/jetty/jetty*/bin/startup.sh
44
45
46 #### Retrieve logs from stopped container
47 * docker cp <container-id>:/opt/jetty/jetty-distribution-9.3.9.v20160517/logs/AAI-ML/error.log /tmp/