Skip to content

SocraticGrid/UCS-Implementation

Repository files navigation

All the projects in this repository require JDK8 or greater

UCS implementation using NiFi

This is the home repository for the UCS implementation using NiFi workflow processor (https://nifi.incubator.apache.org/).

Build License

How to run UCS server

1.- NiFi Server

The first thing we need in order to run UCS-NiFi server is to setup a NiFi instance.

You can either get the binaries from here, or build it yourself by following the instructions here.

The current implementation of UCS was tested with NiFi version 0.6.0.

Before you start NiFi server, please complete the following steps.

2.- Cognitive's NiFi Extensions

UCS-NiFi uses a set of common processors that are placed in the nifi-extensions repository.

You need to clone this repository and build it. Then, you need to copy the file $NIFI_EXTENSIONS_HOME/nifi-cognitive-extensions/nifi-cognitive-nar/target/nifi-cognitive-nar-0.3-SNAPSHOT.nar into NiFi's directory $NIFI_HOME/lib.

A pre-built version of the common processors can be found as part of the ucs-docker repository.

3.- Build this project

This repository contains a NiFi-based implementation of UCS. After you build all the projects in this repository, you need to copy the generated file $UCS_IMPLEMENTATION_HOME/ucs-nifi-extensions/nifi-ucs-nifi-extensions-nar/target/nifi-ucs-nifi-extensions-nar-0.5-SNAPSHOT.nar into NiFi's directiory $NIFI_HOME/lib

A pre-built version of the UCS-related processors can be found as part of the ucs-docker repository.

4.- Configure NiFi Flow

Before start NiFi server, we need to replace the flow it will run (with the UCS flow).

Different versions of the UCS flow can be found in ucs-nifi-extensions/nifi-ucs-nifi-extensions-processors module. Starting from v29, these templates can be used in version 0.4.1 of NiFi (or grater). Previous versions of the templates are outdated and they target older versions of NiFi.

In order to tell NiFi which flow we want to run, we have to select the biggest version from the /nifi-templates directory and copy the flow.xml.gz file it contains into $NIFI_HOME/conf/.

5.- (Optional) Configure NiFi's Port

By default, NiFi will run on port 8080. If, for some reason, we need to change the port number we want to use, we have to edit NiFi's configuration file: $NIFI_HOME/conf/nifi.properties. The property we should change inside this file is nifi.web.http.port.

This configuration file contains many other configuration options that we may want to review in case something else needs to be configured.

6.- Configure Contact Information

By default, UCS will resolve any contact information (phone number, email, etc.) using a text configuration file that must be placed in $NIFI_HOME/conf/contact/. The name of this configuration file must be mock-users-contact.txt and its content must be a CSV of: name, email, telephone number, chat id, text to voice number.

An example of this file can be obtained here.

7.- Starting NiFi

From NiFi's bin directory, run the command ./nifi.sh start.

Once NiFi is running, you can access its we console using the following URL: http://localhost:8080/nifi.

About

UCS-API Implementation using NiFi framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published