summaryrefslogtreecommitdiffstats
path: root/lighty/docs/README.md
diff options
context:
space:
mode:
authorMatej Perina <matej.perina@pantheon.tech>2019-04-03 09:17:40 +0200
committerSamuel Kontris <samuel.kontris@pantheon.tech>2019-08-28 12:18:55 +0200
commite385a7a1d1934c6a3d22df3c3244678ca415134a (patch)
tree477dead11f726bd3b61d29e56654eaca49a38b20 /lighty/docs/README.md
parent400d508da587d8c4fd5c19c15437b2fc2213c9b7 (diff)
Proposal to remove OSGi dependencies from the CCSDK project
Dependencies on the OSGi frameworks and libraries are removed by integrating the CCSDK project with the lighty.io. It's a toolkit that allows to use ODL services (in this case core services and the Restconf) without the dependency on the Karaf framework and the Blueprint DI. The ccsdk-lighty-module artifact contains lighty.io module that groups all other modules from other repositories and starts/stops them at once. The ccsdk-lighty-distribution artifact starts the lighty.io core, Restconf and the CCSDK integrated with the lighty.io and creates zip distribution with the CCSDK lighty.io application and necessary libraries. The distribution-lighty-ubuntu-docker artifact creates the docker image with the zip distribution from the ccsdk-lighty-application artifact and necessary configuration files. For more information see the README.md file in the lighty/docs directory. More info about the lighty.io - https://lighty.io Change-Id: Id29935c8e2951b400ad3217ff412bc5155384487 Signed-off-by: Matej Perina <matej.perina@pantheon.tech> Signed-off-by: Samuel Kontris <samuel.kontris@pantheon.tech>
Diffstat (limited to 'lighty/docs/README.md')
-rw-r--r--lighty/docs/README.md122
1 files changed, 122 insertions, 0 deletions
diff --git a/lighty/docs/README.md b/lighty/docs/README.md
new file mode 100644
index 00000000..7212084d
--- /dev/null
+++ b/lighty/docs/README.md
@@ -0,0 +1,122 @@
+## Integration of the lighty.io with the CCSDK
+
+These artifacts contain the examples of how can be the CCSDK integrated with the lighty.io. This
+integration removes the dependency on the OSGi framework (Karaf) and the Blueprint
+dependency injection - instead it uses only the plain java like _main_ method to start
+the application and plain java constructors as DI (but it is ready to be integrated with
+other frameworks).
+
+The CCSDK lighty.io modules can be all started at once (as in this example) or only the
+selected group of them - in case there is no need to run them all.
+
+For more information about the lighty.io visit the official web-page
+[https://lighty.io](https://lighty.io) or the
+[GitHub repository](https://github.com/PantheonTechnologies/lighty-core).
+
+
+### Artifact `ccsdk-lighty-module`
+
+The artifact `ccsdk-lighty-module` contains implementation of the lighty.io module that groups
+all the other lighty.io modules from the other repositories (core, adaptors, plugins,
+northbound). These grouped modules can be started all at once using just a few lines of code.
+
+In addition it contains implementation of the lighty.io module that
+groups the lighty.io controller (base services from the ODL), the RESTCONF lighty.io module
+(the RESTCONF from the ODL integrated with the lighty.io) and the CCSDK lighty.io module
+
+### Artifact `ccsdk-lighty-distribution`
+
+The CCSDK lighty.io application can be started via _main_ method from the _Main_ class.
+This artifact generates the _.zip_ file containing the _.jar_ file and all other necessary
+libraries.
+
+The path to the lighty.io configuration file can be passed to the _main_ method (or to
+the _.jar_ file) as an argument. This configuration file contains configuration for the
+lighty.io controller and the RESTCONF (for example the port or the IP address where should
+the RESTCONF listen or the yang modules that should be imported into the application).
+The example of the configuration file can be found in the _resources_ directory.
+If path to the configuration file will not be passed through the _main_ method then
+the default configuration will be used.
+
+
+### Artifact `distribution-lighty-ubuntu-docker`
+
+The artifact `distribution-lighty-ubuntu-docker` contains the _Dockerfile_ and the _docker-compose.yml_
+files for the CCSDK lighty.io. _Dockerfile_ is very similar to the original file from
+the `distribution-odlsli-ubuntu` artifact and the _docker-compose.yml_ to the original file from the
+`src/main/yaml` directory in the root of this repository.
+
+Necessary configuration files and the _.zip_ file containing the CCSDK lighty.io application
+are copied by the maven plugins into the respective directories during the the maven build.
+
+The _Dockerfile_ unpacks the _.zip_ distribution generated by the `ccsdk-lighty-distribution`
+artifact and runs the _startODL.sh_ script that starts the CCSDK lighty.io _.jar_ file using
+the `src/main/properties/lightyCcsdkConfig.json` configuration file.
+
+The _docker-compose.yml_ file contains three images - database, CCSDK lighty.io application
+and the _DG builder_.
+
+### How to run
+
+In order to run the CCSDK lighty.io application build the `distribution-lighty` repository
+using the maven with the _docker_ profile enabled (command: `mvn clean install -P docker`).
+Then run the _docker-compose_ from the `src/main/docker` directory
+(command: `docker-compose -f docker-compose.yml up`).
+
+After a few seconds CCSDK lighty.io application should be up and running together with the
+database and the _DG builder_.
+
+_DG builder_ web UI can be accessed through the `http://localhost:3000` address and RESTCONF at
+the `http://localhost:8383/restconf` address.
+
+
+#### DG Builder and the CCSDK lighty.io application example
+
+In the browser open the `localhost:3000` URL. Login with the default username `dguser` and
+the password `test123`. In the top right corner click on the menu -> import -> Clipboard.
+Copy and paste the content of the `hello_world.json` file (from the same directory where is
+this readme file located) to the text box. Then click on the OK button and place the graph
+to the sheet.
+
+To upload and activate the imported graph click on the small empty square on the left side
+of the `DGSTART` node and then click on the `Upload XML` button. Then click on the `ViewDG List`
+button and on the `Activate` link in the row where imported graph is.
+
+After the graph is activated it can be called using the POST REST request on the address:
+
+`http://<restconf_address:port>/restconf/operations/SLI-API:execute-graph`
+
+With the body like:
+
+```
+{
+ "input": {
+ "module-name": "<name of the module (service-logic type node)>",
+ "rpc-name": "<name of the rpc (method type node)>",
+ "mode": "sync",
+ "sli-parameter": [
+ ]
+ }
+}
+```
+
+So in order to call imported _hello world_ graph send the POST request to the address:
+
+`http://localhost:8383/restconf/operations/SLI-API:execute-graph`
+
+with the body:
+
+```
+{
+ "input": {
+ "module-name": "Test",
+ "rpc-name": "helloWorld",
+ "mode": "sync",
+ "sli-parameter": [
+ ]
+ }
+}
+```
+
+Now the _hello world_ message should be displayed in the console where the CCSDK lighty.io
+application is running.