Merge "Fixed the streams and the imports issues"
[dcaegen2/platform/cli.git] / dcaedftool / README.md
1 # DCAE Data Format Validator
2
3 # Purpose & Responsibilities 
4 The purposes of this repo is provide tools for creating and checking DCAE Data Format Schema used by the DCAP CDAP Broker to define user data formats 
5 The build is currently done on Windows but since node.js and docker are widely supported a similar process should allow builds in other environments 
6
7 # DCAE Data Format Schema Tool 
8 The DCAE Data Format Schema Tool is a web application that checks the validity of a user created Data Format Schema.   Schemas can define JSON, delimited, XML, and unstructured data. 
9 DCAE Data Format Schemas that define JSON schema can be  checked against JSON input
10
11 ## Installation and build on Windows 
12 It is assumed that node.js and docker Toolkit are installed
13 After the git repo is cloned, cd to the dcaedftool directory and issue:
14 ``` 
15     npm install 
16 ``` 
17 to load the necessary libraries. Note that the latest libraries will be loaded.  If there is a problem the libraries used for testing can be loaded.  They are recorded in package-lock.json.  There was a problem once when a Material 2 library was upgraded.
18 ## Regression testing on Windows
19 To test use the following command to run the Jasmine/karma regression suite.  This currently tests the program logic.   Protractor tests may follow...
20 ``` 
21    ng test 
22 ``` 
23 ## GUI testing using node.js 
24 To test under node.js using localhost:4200, issue: 
25 ``` 
26    ng serve
27 ``` 
28 ##  Docker build - remember to update the image version
29 To build a Docker image using nginx as a static page server issue:
30 ``` 
31    . ./dockerbuild.sh
32 ``` 
33 ## Docker windows testing - remember to update the image version
34 ``` 
35    sh dockerrun.sh
36 ``` 
37 ## To get the local IP address for testing - use 8080 for the port 
38 ``` 
39    docker-machine ip box 
40 ``` 
41 ## Use docker push to export to production