Giter Club home page Giter Club logo

sales-order-system-2-k8-platform-configuration's Introduction

Sales Order System 2.0: Kubernetes Platform Configuration

This project is a spin-off from the main Sales Order System 2.0 project. Whereas that project showcases the theme of Application Development - this project demonstrates in particular the Infrastructure as Code concept of Platform Configuration and is the sister project of: Sales Order System 2.0: Infrastructure EKS.

For a typical application deployed onto Kubernetes you would have a set of application/platform configuration files which defines the application components as Kubernetes resources. This is what this project is all about, managing the configuration of those.

Table of Contents

Prerequisites

Provision Kubernetes Cluster

Provision the Kubernetes Cluster using - Sales Order System 2.0: Infrastructure EKS

Install NGINX Ingress Controller

For this platform, I have chosen to operate a Kubernetes Ingress and as such require an Ingress Controller to be installed.

I have chosen the NGINX Ingress as I wanted to replicate the architecture as defined in the spin off project: Sales Order System 2.0 - Application Platform

See: NGINX Ingress on AWS for instructions to install it.

*CAUTION
Manually creating the NGINX Ingress will auto provision an AWS ELB that is out of control of Terraform therefore if adopting IAC then should use with caution. I've only used above method due to time contraints for this particular demo project.

Platform Architecture

The configured platform would look like the following:

Platform Architecture

User Service

UserService uses an in-memory embedded database (H2) hence only create 1 single pod.

Customer Service

CustomerService is scaled to 3 replica pods which connects to the MySQL database where it is a singleton instance - managed by a ReplicaSet of 1.

Order Service

Similar to CustomerService, this microservices uses 3 replica pods be default. Backing datastore MongoDB is a 3 replicaset cluster with 1 primary (master) and 2 secondaries (slaves). The MongoDB instance is managed by a StatefulSet.

Product Service

Likewise, ProductService is also scaled to 3 replca pods with its backing Redis datastore being managed by a 3 replica cluster StatefulSet (similar to OrderService's MongoDB).

Configuration & Sensitive Data

Most microservices's configuration is injected into the pods via Environment Variables using a Configmap and their sensitive configs (username/passwords etc) are injected the same way using secrets.

Roadmap

Future exercises include:

  • Manage secrets in a secure storage mechanism such as Vault or AWS SSM Parameter Store
  • Put in place Persistence Volumes (PV) & Persistence Volume Claims (PVC) for the databases (MySQL) and/or datastores (MongoDB, Redis)
  • Configure HPA (Horizontal Pod Autoscaling) to dynamically elastically scale up/down the pods of the microservices

sales-order-system-2-k8-platform-configuration's People

Contributors

colinbut avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.