Skip to content

stakater-lab/stakater-nordmart-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stakater-nordmart-cart

Overview

A maven spring boot cart application.

Configurations

Environment variables can be provided to configure the cart service.

  • CATALOG_ENDPOINT - Endpoint of the catalog endpoint

Keycloak configurations

  • KEYCLOAK_REALM - Keycloak realm name.
  • KEYCLOAK_URL - Keycloak authentication URL.
  • KEYCLOAK_CLIENT_BACKEND - Keycloak client for backend token based authentication.
  • KEYCLOAK_CLIENT_SECRET_KEY - Keycloak secret key for accessing the keycloak client backend.

Dependencies

It requires following things to be installed:

  • Java: ^8.0.
  • Maven

Deployment strategy

Local deployment

To run the application locally use the command given below:

mvn clean spring-boot:run

Docker

To deploy app inside a docker container

  • Create a network if it doesn't already exist by executing

    docker network create --driver bridge nordmart-apps
  • Build jar file of the app by executing

    mvn clean package
  • Next build the image using

    docker build -t cart .
  • Finally run the image by executing

    docker run -d --name cart --network nordmart-apps -p 8082:8080 -e CATALOG_ENDPOINT="catalog:8080" cart

    Note: Make sure that catalog is running before running this.

Helm Charts

Pre-requisites

Helm operator needs to to be running inside the cluster. Helm operator is deployed by Stakater Global Stack, deployment guidelines are provided in this link

Helm chart deployment

To create helm release of this application using the command given here:

kubectl apply -f helm-release.yaml -n