Skip to content

Session Management

Darshan Shinde edited this page Feb 14, 2020 · 3 revisions

Description:

Session Management micro-service tracks all user activities which can be used to monitor errors and user-activity trends.

How to run Session Management micro-service?

Pre-requisites:

  1. JAVA 8
  2. Zookeeper
  3. Kafka
  4. JAVA_HOME environment variable needs to be set to the JAVA installation directory. Refer: https://www.java.com/en/download/

Go to /sessionmanagement folder in the repository.

Other dependencies:

  1. Zookeeper should be running before starting the Session Management micro-service.
    To install and configure Zookeeper and Kafka refer: https://www.c-sharpcorner.com/article/step-by-step-installation-and-configuration-guide-of-apache-kafka-on-windows-ope/

  2. Create a secret key using the following steps.
    a. In python prompt run following commands.

import os
os.urandom(24)

b. Copy the sub-string between quotes and set it in the environment variable with the name SECRET_KEY.

example,
b'asd78ihji&&(hjkhKjh((jkj#$%}{}jkljhjkhjg7uhuj'
Copy bold part of the generated output.

Starting the microservice:

  1. mvn clean install
  2. mvn spring-boot:run

Note: The Session Management micro-service will run on port 8084