Let’s Coordinate - Getting started

1. Prerequisites

To use Let’s Coordinate, you need a linux OS with the following:

Please note:

2. Setup and run Let’s Coordinate

2.1. Clone Let’s Coordinate project

To start Let’s Coordinate, you first need to clone the letscoordinate git project:

git clone https://github.com/opfab/letscoordinate.git

2.2. Create test branch

Before starting Let’s Coordinate, it’s recommended to create a test branch from the latest stable release (1.3.1.RELEASE in our case). To do this, you first need to make sure that you have the latest tag list from your remote repository:

git fetch --all --tags

Then, you can create the test branch:

git checkout tags/1.3.1.RELEASE -b test-letsco-1.3.1.RELEASE

2.3. Run Let’s Coordinate

a. Prepare the environment

Before starting the Let’s Coordinate getting started project, it is important to mention that we use the “karate.jar” dependency to initialize our database with required test data.

Download the latest karate jar file from Karate github release page , put it in the “opfab/prepare-opfab-env” directory, rename it to “karate.jar” to use it easily.

Then, position your self in the “bin” directory and check that you have the right “SERVER_IP” value in the “load_environment.sh” file (this action is mandatory only if you are running Let’s Coordinate in a remote server! If it is the case, please edit the file and replace “localhost” by your server IP address, else if you are testing locally, please skip this step):

sed -n '13,+6p' load_environment.sh

Finally, in the same “bin” directory, you should load the environment variables by executing the following command:

source ./load_environment.sh
b. Start the server

To start Let’s Coordinate, position your self in the “bin” directory and execute the following commands:

./server.sh --build start 

This command (with --build or -b option) allows to:

When the first command is executed correctly, please run the following command:

./server.sh --init start 

This command (with --init or -i option) allows to:

For next usage of the server.sh script, the --build and --init options are not necessary.

To be sure that all the services are correctly started, you can try the following command:

./server.sh status 

To see more about the server.sh commands and options, please try:

./server.sh --help

3. Use Let’s Coordinate

3.1. Generate a token

To be able to use the secured APIs of the letsco-api module (e.g. to send notifications, to generate an RSC KPI report, …), you first need to generate a new token:

The result returned in the “Response body” is the token that we will use in the next sections for authentication (by default the generated tokens are valid for 24 hours. After exceeding this period, a new token should be generated)

3.2. Send a new card

If you open a browser and connect to application (http://localhost/ui/) with the username user.test and password test, you should see the new card in the Feed (if it is not the case, please change the timeline view or/and period to include the card’s dates: timestamp or/and business period).

Feel free to test the other json samples from the directory “util/messages_models/json/card_feed

3.3. Generate a RSC KPI report

4. Stop the application

To stop the application, position yourself in the bin directory and run the following command:

./server.sh stop

To be sure that all the services are correctly stopped, you can try the following command:

./server.sh status 

If you want to stop the application and definitely remove all docker containers, you can use the following command:

./server.sh down