1 # CRUD Microservice (Gizmo)
4 The CRUD microservice implements a set of RESTful APIs which allow a client to perform CREATE, UPDATE, GET, and DELETE operations on verticies and edges within the A&AI graph database.
8 ### Building The Microservice
10 After cloning the project, execute the following Maven command from the project's top level directory to build the project:
14 Now, you can build your Docker image:
16 > docker build -t onap/crud-service target
18 ### Deploying The Microservice
20 Push the Docker image that you have built to your Docker repository and pull it down to the location from which you will be running the service.
22 **Create the following directories on the host machine:**
28 You will be mounting these as data volumes when you start the Docker container.
30 #### Configuring the Microservice
32 Create configuration file **../appconfig/crud-api.properties**
34 # List of hostnames/addresses of the graph database
35 crud.graph.host=graphhost1.onap.com,graphhost2.onap.com
37 # Port on which to connect to the graph database
40 # Name of the graph on which this service will operate
41 crud.graph.name=aaigraphautomation
43 # Backend storage type for the graph. Types currently supported:
46 crud.storage.backend.db=cassandra
48 # List of hostnames/addresses of the DMaaP/Kafka cluster on which to post notification events
49 event.stream.hosts=kafkahost1.onap.com,kafkahost2.onap.com
51 # Number of events to bath up before posting to DMaaP/Kafka
52 event.stream.batch-size=100
54 # Amount of time (in ms) to wait before sending batch of events (when batch does not reach batch-size)
55 event.stream.batch-timeout=60000
57 Create configuration file **../appconfig/auth/crud-policy.json**
59 This policy file defines which client certificates are authorized to use the service's APIs. An example policy file follows:
67 "name": "search", "methods": [ { "name": "GET" },{ "name": "DELETE" }, { "name": "PUT" }, { "name": "POST" } ]
72 "username": "CN=admin, OU=My Organization Unit, O=, L=Sometown, ST=SomeProvince, C=CA"
79 Create keystore file **../appconfig/auth/tomcat\_keystore**
82 Create a keystore with this name containing whatever CA certificates that you want your instance of the CRUD service to accept for HTTPS traffic.
84 #### Start the service
86 You can now start the Docker container in the following manner:
90 -e CONFIG_HOME=/opt/app/crud-service/config/ \
91 -e KEY_STORE_PASSWORD={{obfuscated password}} \
92 -e KEY_MANAGER_PASSWORD=OBF:{{obfuscated password}} \
93 -v /<path>/logs:/opt/aai/logroot/AAI-CRUD \
94 -v /<path>/appconfig:/opt/app/crud-service/config \
96 {{your docker repo}}/crud-service
100 {{your docker repo}} = The Docker repository you have published your CRUD Service image to.
101 {{obfuscated password}} = The password for your key store/key manager after running it through the Jetty obfuscation tool.
107 URL: https://<host>:9520/services/crud-api/v1/echo-service/echo/<input>
109 Success Response: 200
112 Gizmo exposes a set of APIs to operate on verticies within the graph.
113 [Vertex APIs](./VERTEX.md)
116 Gizmo exposes a set of APIs to operate on edges within the graph.
117 [Edge APIs](./EDGE.md)
120 Gizmo exposes a bulk API to operate on multiple graph entities within a single request.
121 [Bulk API](./BULK.md)
124 Gizmo is capable of working Synchronously and Asynchronously. Asynchronous Pipeline is explained
125 here: [Async Pipeline](./ASYNC.MD)