4 Babel is a microservice in the AAI project that can be used by clients that work with TOSCA CSAR files.
6 It parses the TOSCA CSAR to generate xml files from a set of YAML files found in the TOSCA CSAR file.
9 Babel service can be compiled easily using maven command `mvn clean install`
11 The compiled results will be the following artifacts in the "target" folder:
13 * babel_v{major-version}.zip
14 * babel_v{major-version}_props.zip
16 * babel-{version}-client.jar
17 * babel-{version}-runtimeEnvironment.zip
21 Maven will install the following artifacts in the local repository:
23 * babel-{version}-client.jar
24 * babel-{version}-runtimeEnvironment.zip
26 Create the docker image:
27 docker build -t aai/babel target
30 The project will build a client jar that can be used by clients when using the Babel service.
32 The client jar contains two objects that are used in the Babel service API.
34 BabelRequest is used to supply the inputs into the Babel service.
35 BabelArtifact is the response artifact in the list of artifacts returned from the Babel service.
37 ### Deploying The Micro Service
39 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.
41 **Create the following directories on the host machine:**
44 ./opt/app/babel/appconfig
45 ./opt/app/babel/appconfig/auth
47 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)
49 **Populate these directories as follows:**
51 ##### Contents of /opt/app/babel/appconfig
53 The following file must be present in this directory on the host machine:
55 The purpose of this configuration directory is to maintain configuration files specific to authentication/authorization for the _Babel_ service.
56 The following files must be present in this directory on the host machine:
58 _babel-auth.properties_
60 auth.policy.file=/auth/auth_policy.json
61 auth.authentication.disable=false
64 _artifact-generator.properties_ <br />
65 Contains model invariants ids used by SDC artifact generator library
69 Logging configuration.
71 ##### Contents of /opt/app/babel/appconfig/auth
74 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:
82 "name": "search", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" } ]
87 "username": "CN=babeladmin, OU=My Organization Unit, O=, L=Sometown, ST=SomeProvince, C=CA"
96 Create a keystore with this name containing whatever CA certificates that you want your instance of the _Babel_ service to accept for HTTPS traffic.
99 ## Dependency Information
101 To include the Babel service client jar in your project add the following maven dependency to your project's pom:
104 <groupId>org.onap.aai</groupId>
105 <artifactId>babel</artifactId>
107 <classifier>client</classifier>