From c7d3869e64534a06692191d0cdfecb2b30138c13 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Thu, 22 Feb 2024 13:19:35 +0100 Subject: Update aai-common-alpine base image in model-loader - update aai-common-alpine base image from 1.8.1 to 1.13.2 - rename README file Issue-ID: AAI-3785 Change-Id: I0343c5ffc4dc3b00fd95cdd1a18f4d9ca663f832 Signed-off-by: Fiete Ostkamp --- .gitignore | 1 + README.md | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Readme.md | 140 ------------------------------------------------------------- pom.xml | 2 +- 4 files changed, 142 insertions(+), 141 deletions(-) create mode 100644 README.md delete mode 100644 Readme.md diff --git a/.gitignore b/.gitignore index 56f75e2..e4b4035 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ debug-logs/ .checkstyle .idea/ *.iml +.vscode \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5aa1733 --- /dev/null +++ b/README.md @@ -0,0 +1,140 @@ +# Introduction + +The A&AI Model Loader Service is an application that facilitates the distribution and ingestion of +new service and resource models and VNF catalogs from the SDC to the A&AI. + +## Features + +The Model Loader: + +* registers with the SDC to receive notification events +* polls the UEB/DMaap cluster for notification events +* downloads artifacts from SDC upon receipt of a distribution event +* pushes distribution components to A&AI + +### VNF Catalog loading + +The Model Loader supports two methods for supplying VNF Catalog data for loading into A&AI: + +* Embedded TOSCA image and vendor data
VNF Catalog data can be embedded within the TOSCA yaml files contained in the CSAR. + + +* VNF Catalog XML files
VNF Catalog data in the form of XML files can be supplied in the CSAR under the path `Artifacts/Deployment/VNF_CATALOG` + +**Note: Each CSAR should provide VNF Catalog information using only one of the above methods. If a CSAR contains both TOSCA and XML VNF Catalog information, a deploy failure will be logged and published to SDC, and no VNF Catalog data will be loaded into A&AI** + +## Compiling Model Loader + +Model Loader can be compiled by running `mvn clean install` +A Model Loader docker image can be created by running `docker build -t onap/model-loader target` + +## Running Model Loader + +Push the Docker image to your Docker repository. Pull this down to the host machine. + +**Create the following directories on the host machine:** + + ./logs + ./opt/app/model-loader/appconfig + ./opt/app/model-loader/appconfig/auth + +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) + +**Populate these directories as follows:** + +#### Contents of /opt/app/model-loader/appconfig + +The following file must be present in this directory on the host machine: + +_model-loader.properties_ + + # Always false. TLS Auth currently not supported + ml.distribution.ACTIVE_SERVER_TLS_AUTH=false + + # Address/port of the SDC + ml.distribution.ASDC_ADDRESS=:8443 + + # Kafka consumer group. + ml.distribution.CONSUMER_GROUP=aai-ml-group + + # Kafka consumer ID + ml.distribution.CONSUMER_ID=aai-ml + + # SDC Environment Name. This must match the environment name configured on the SDC + ml.distribution.ENVIRONMENT_NAME= + + # Currently not used + ml.distribution.KEYSTORE_PASSWORD= + + # Currently not used + ml.distribution.KEYSTORE_FILE= + + # Obfuscated password to connect to the SDC. To obtain this value, use the following Jetty library to + # obfuscate the cleartext password: http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html + ml.distribution.PASSWORD=OBF: + + # How often (in seconds) to poll the Kafka topic for new model events + ml.distribution.POLLING_INTERVAL= + + # Timeout value (in seconds) when polling the Kafka topic for new model events + ml.distribution.POLLING_TIMEOUT= + + # Username to use when connecting to the SDC + ml.distribution.USER= + + # Artifact type we want to download from the SDC (the values below will typically suffice) + ml.distribution.ARTIFACT_TYPES=MODEL_QUERY_SPEC,TOSCA_CSAR + + # URL of the A&AI + ml.aai.BASE_URL=https://:8443 + + # A&AI endpoint to post models + ml.aai.MODEL_URL=/aai/v*/service-design-and-creation/models/model/ + + # A&AI endpoint to post named queries + ml.aai.NAMED_QUERY_URL=/aai/v*/service-design-and-creation/named-queries/named-query/ + + # A&AI endpoint to post vnf images + ml.aai.VNF_IMAGE_URL=/aai/v*/service-design-and-creation/vnf-images + + # Name of certificate to use in connecting to the A&AI + ml.aai.KEYSTORE_FILE=aai-os-cert.p12 + + # Obfuscated keystore password to connect to the A&AI. This is only required if using 2-way SSL (not basic auth). + # To obtain this value, use the following Jetty library to obfuscate the cleartext password: + # http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html + ml.aai.KEYSTORE_PASSWORD=OBF: + + # Name of user to use when connecting to the A&AI. This is only required if using basic auth (not 2-way SSL). + ml.aai.AUTH_USER= + + # Obfuscated password to connect to the A&AI. This is only required if using basic auth (not 2-way SSL). + # To obtain this value, use the following Jetty library to obfuscate the cleartext password: + # http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html + ml.aai.AUTH_PASSWORD=OBF: + + + +##### Contents of the /opt/app/model-loader/app-config/auth Directory + +The following files must be present in this directory on the host machine: + +_aai-os-cert.p12_ + +The certificate used to connected to the A&AI + +**Start the service:** + +You can now start the Docker container for the _Model Loader Service_, e.g: + + docker run -d \ + -e CONFIG_HOME=/opt/app/model-loader/config/ \ + -v /logs:/logs \ + -v /opt/app/model-loader/appconfig:/opt/app/model-loader/config \ + --name model-loader \ + {{your docker repo}}/model-loader + +where + + {{your docker repo}} +is the Docker repository you have published your image to. diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 5aa1733..0000000 --- a/Readme.md +++ /dev/null @@ -1,140 +0,0 @@ -# Introduction - -The A&AI Model Loader Service is an application that facilitates the distribution and ingestion of -new service and resource models and VNF catalogs from the SDC to the A&AI. - -## Features - -The Model Loader: - -* registers with the SDC to receive notification events -* polls the UEB/DMaap cluster for notification events -* downloads artifacts from SDC upon receipt of a distribution event -* pushes distribution components to A&AI - -### VNF Catalog loading - -The Model Loader supports two methods for supplying VNF Catalog data for loading into A&AI: - -* Embedded TOSCA image and vendor data
VNF Catalog data can be embedded within the TOSCA yaml files contained in the CSAR. - - -* VNF Catalog XML files
VNF Catalog data in the form of XML files can be supplied in the CSAR under the path `Artifacts/Deployment/VNF_CATALOG` - -**Note: Each CSAR should provide VNF Catalog information using only one of the above methods. If a CSAR contains both TOSCA and XML VNF Catalog information, a deploy failure will be logged and published to SDC, and no VNF Catalog data will be loaded into A&AI** - -## Compiling Model Loader - -Model Loader can be compiled by running `mvn clean install` -A Model Loader docker image can be created by running `docker build -t onap/model-loader target` - -## Running Model Loader - -Push the Docker image to your Docker repository. Pull this down to the host machine. - -**Create the following directories on the host machine:** - - ./logs - ./opt/app/model-loader/appconfig - ./opt/app/model-loader/appconfig/auth - -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) - -**Populate these directories as follows:** - -#### Contents of /opt/app/model-loader/appconfig - -The following file must be present in this directory on the host machine: - -_model-loader.properties_ - - # Always false. TLS Auth currently not supported - ml.distribution.ACTIVE_SERVER_TLS_AUTH=false - - # Address/port of the SDC - ml.distribution.ASDC_ADDRESS=:8443 - - # Kafka consumer group. - ml.distribution.CONSUMER_GROUP=aai-ml-group - - # Kafka consumer ID - ml.distribution.CONSUMER_ID=aai-ml - - # SDC Environment Name. This must match the environment name configured on the SDC - ml.distribution.ENVIRONMENT_NAME= - - # Currently not used - ml.distribution.KEYSTORE_PASSWORD= - - # Currently not used - ml.distribution.KEYSTORE_FILE= - - # Obfuscated password to connect to the SDC. To obtain this value, use the following Jetty library to - # obfuscate the cleartext password: http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html - ml.distribution.PASSWORD=OBF: - - # How often (in seconds) to poll the Kafka topic for new model events - ml.distribution.POLLING_INTERVAL= - - # Timeout value (in seconds) when polling the Kafka topic for new model events - ml.distribution.POLLING_TIMEOUT= - - # Username to use when connecting to the SDC - ml.distribution.USER= - - # Artifact type we want to download from the SDC (the values below will typically suffice) - ml.distribution.ARTIFACT_TYPES=MODEL_QUERY_SPEC,TOSCA_CSAR - - # URL of the A&AI - ml.aai.BASE_URL=https://:8443 - - # A&AI endpoint to post models - ml.aai.MODEL_URL=/aai/v*/service-design-and-creation/models/model/ - - # A&AI endpoint to post named queries - ml.aai.NAMED_QUERY_URL=/aai/v*/service-design-and-creation/named-queries/named-query/ - - # A&AI endpoint to post vnf images - ml.aai.VNF_IMAGE_URL=/aai/v*/service-design-and-creation/vnf-images - - # Name of certificate to use in connecting to the A&AI - ml.aai.KEYSTORE_FILE=aai-os-cert.p12 - - # Obfuscated keystore password to connect to the A&AI. This is only required if using 2-way SSL (not basic auth). - # To obtain this value, use the following Jetty library to obfuscate the cleartext password: - # http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html - ml.aai.KEYSTORE_PASSWORD=OBF: - - # Name of user to use when connecting to the A&AI. This is only required if using basic auth (not 2-way SSL). - ml.aai.AUTH_USER= - - # Obfuscated password to connect to the A&AI. This is only required if using basic auth (not 2-way SSL). - # To obtain this value, use the following Jetty library to obfuscate the cleartext password: - # http://www.eclipse.org/jetty/documentation/9.4.x/configuring-security-secure-passwords.html - ml.aai.AUTH_PASSWORD=OBF: - - - -##### Contents of the /opt/app/model-loader/app-config/auth Directory - -The following files must be present in this directory on the host machine: - -_aai-os-cert.p12_ - -The certificate used to connected to the A&AI - -**Start the service:** - -You can now start the Docker container for the _Model Loader Service_, e.g: - - docker run -d \ - -e CONFIG_HOME=/opt/app/model-loader/config/ \ - -v /logs:/logs \ - -v /opt/app/model-loader/appconfig:/opt/app/model-loader/config \ - --name model-loader \ - {{your docker repo}}/model-loader - -where - - {{your docker repo}} -is the Docker repository you have published your image to. diff --git a/pom.xml b/pom.xml index abf60e2..27978bb 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ ${project.build.directory}/${project.artifactId}-${project.version}-build/ onap alpine - 1.8.1 + 1.13.2 yyyyMMdd'T'HHmmss'Z' -- cgit 1.2.3-korg