commit | 66b3afa06776e9944ad515206d281d67747c9770 | [log] [tgz] |
---|---|---|
author | Leonard, Mark (ml401d) <ml401d@att.com> | Wed Mar 21 18:40:41 2018 +0000 |
committer | Mark Leonard <mark.j.leonard@gmail.com> | Wed Mar 28 13:50:51 2018 +0100 |
tree | 427098937879fe09ae4fc3af4ae004359a60212a | |
parent | 161f5a7d9b900ae34a4886d7f7fb01ea496f71eb [diff] |
Incorporate the ECOMP SDC Artefact Generator code Remove the Maven dependency on openecomp-sdc-artifact-generator-core, because this is not maintained in the ONAP source code repositories. The functionality provided by the SDC Artifact Generator is replaced with equivalent code that depends on the SDC-TOSCA parsing library, without introducing any backwards-compatibility breaks. The intention is to make this Maven project more maintainable by depending only the common ONAP libraries. Change-Id: I01d78575d3b7c70a11e4c7989a021de3c0913a06 Issue-ID: AAI-943 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Babel is a microservice in the AAI project that can be used by clients that work with TOSCA CSAR files.
It parses the TOSCA CSAR to generate xml files from a set of YAML files found in the TOSCA CSAR file.
Babel service can be compiled easily using maven command mvn clean install
The compiled results will be the following artifacts in the "target" folder:
Maven will install the following artifacts in the local repository:
Create the docker image: docker build -t aai/babel target
The project will build a client jar that can be used by clients when using the Babel service.
The client jar contains two objects that are used in the Babel service API.
BabelRequest is used to supply the inputs into the Babel service. BabelArtifact is the response artifact in the list of artifacts returned from the Babel service.
Push the Docker image that you have built to your Docker repository and pull it down to the location that you will be running Babel from.
Create the following directories on the host machine:
./logs ./opt/app/babel/appconfig ./opt/app/babel/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:
The following file must be present in this directory on the host machine:
The purpose of this configuration directory is to maintain configuration files specific to authentication/authorization for the Babel service. The following files must be present in this directory on the host machine:
babel-auth.properties
auth.policy.file=/auth/auth_policy.json auth.authentication.disable=false
artifact-generator.properties
Contains model invariants ids used by SDC artifact generator library
auth_policy.json
Create a policy file defining the roles and users that will be allowed to access Babel service. This is a JSON format file which will look something like the following example:
{ "roles": [ { "name": "admin", "functions": [ { "name": "search", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" } ] } ], "users": [ { "username": "CN=babeladmin, OU=My Organization Unit, O=, L=Sometown, ST=SomeProvince, C=CA" } ] } ] }
tomcatkeystore
Create a keystore with this name containing whatever CA certificates that you want your instance of the Babel service to accept for HTTPS traffic.
To include the Babel service client jar in your project add the following maven dependency to your project's pom:
<dependency> <groupId>org.onap.aai</groupId> <artifactId>babel</artifactId> <version>*</version> <classifier>client</classifier> </dependency>