update link to upper-constraints.txt
[aai/sparky-be.git] / README.MD
1 # Sparky - Inventory UI Service\r
2 \r
3 [![alt text](https://bestpractices.coreinfrastructure.org/projects/1737/badge)](https://bestpractices.coreinfrastructure.org/projects/1737)\r
4 \r
5 ## Overview\r
6 _Sparky_ is a service that interacts with AAI and provides users a UI to view and analyze AAI data. The main goal behind _Sparky_ is providing a more user friendly and clear view of AAI data.\r
7 \r
8 At this time, _Sparky_ has two views available for use:\r
9 \r
10 [View and Inspect](./VIEW_INSPECT.md) - Graph based view of entities within AAI.\r
11 \r
12 [VNFs](./VNFS.md) - Aggregation based view of VNFs within AAI.\r
13 \r
14 ## Interfaces\r
15 \r
16 User/Browser -> _Sparky_ port 9517 (HTTP) (can be configured as port 8000 HTTPS) \r
17 Purposes: \r
18  - Suggestions requests\r
19  - data retrieval\r
20 \r
21 _Sparky_ -> AAI HA proxy port 8443 (REST)\r
22 Purposes: \r
23  - data retrieval\r
24  - Index synchronization\r
25    \r
26 _Sparky_ -> Elastic Search port 9200 (REST) \r
27 Purpose: \r
28  - data retrieval (VNFs queries) \r
29 \r
30 _Sparky_ -> Search data Service port 9509 (REST) \r
31 Purpose: \r
32  - Data retrieval for search bar\r
33 \r
34 ## Getting Started\r
35 \r
36 ### Building _Sparky_\r
37 \r
38 After cloning the project, execute the following Maven command from the project's top level directory to build the project:\r
39 \r
40     > mvn clean install\r
41 \r
42 After a successful install, build the docker image:\r
43 \r
44     > docker build -t openecomp/sparky target \r
45 \r
46 ### Deploying _Sparky_\r
47 \r
48 Push the Docker image that you have built to your Docker repository and pull it down to the location that you will be running _Sparky_.\r
49 \r
50 **Create the following directories on the host machine:**\r
51 \r
52     /logs\r
53     /opt/app/sparky/appconfig\r
54 \r
55 You will be mounting these as data volumes when you start the Docker container.\r
56 \r
57 #### Clone Configuration Repo\r
58 \r
59 Clone the "test-config" repo to a seperate directory.\r
60 Navigate to <test-config repo location>/sparky/appconfig (will contain files such as aaiui_filters.json and authentication files).\r
61 Copy the entire contents of <test-config repo location>/sparky/appconfig into the /opt/app/sparky/appconfig directory you created in an above step.\r
62 Copy the entire contents of <test-config repo location>/sparky/dynamic into the /opt/app/sparky/dynamic directory you created in an above step.\r
63 \r
64 The *dynamic* folder contains spring-beans and camel routes.  The spring-beans must be updated with environmental configuration, to enable correct operation. \r
65 \r
66 #### Edits to property files in /opt/app/sparky/appconfig\r
67 \r
68 Listed below are the values that will need to be updated to make _Sparky_ operate properly. The config files contain comments on the contents not listed here.\r
69 \r
70 **sparky-core.xml**\r
71 \r
72 - searchServiceRestEndpointConfig\r
73         - endpointIpAddress ( ip address of the Search Data Service )\r
74         - endpointServerPort ( server port of Search Data Service ) \r
75 \r
76 **sparky-core-sync.xml**\r
77  \r
78 - elasticSearchRestEndpointConfig\r
79     - endpointIpAddress (ElasticSearch server ip address)\r
80     - endpointServerPort (ElasticSearch transport server port.  Default: 9200)\r
81 \r
82 - aaiRestEndpointConfig\r
83     - endpointIpAddress (AAI server ip address)\r
84     - endpointServerPort (AAI server port.  Default: 8443)\r
85 \r
86 **portal/portal.properties**\r
87 **portal/portal-authentication.properties**\r
88 \r
89 If this instance of _Sparky_ will be served in an ONAP Portal instance, use the two files above to configure against the proper Portal instance.\r
90 \r
91 ### Dependencies\r
92 \r
93 _Sparky_ requires:\r
94 \r
95 - AAI instance as the main driver behind data.\r
96 - Elasticsearch instance for data storage.\r
97 - Search-Data-Service instance for search functionality.\r
98 - ONAP Portal instance for authentication.