Skip to content

Lukk17/sky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sky

App deployed in Kubernetes on GCP:

https://skycloud.luksarna.com/


Backend application for handling offers and booking them by users.
Working via rest API. Example can be seen in Sky-View application.

Microservice Description Port README
sky-booking Service handling operation connected with offers bookings. 5555 Booking
sky-offer Service handling operation connected with offers. 5552 Offer
sky-message Service handling sending and receiving messages between users 5553 Message
sky-notify Service handling notification propagation to client 5554 Notify

Table of content


How it works

Microservices are designed to work in Kubernetes cluster which will take care of user authentication and authorization. Kubernetes Ingress controller is exposing services to the world. Each microservice will have its API endpoints exposed.

Ingress

More info about Ingres.

Postman

In postman-collection. Folder you can find an exported sky collection and envs.

Dev

For development services can be run as Spring Boot app or via Gradle.
See more: Local development

Swagger

Swagger is added and can be accessed under:
<app address>/swagger-ui/index.html
example:
http://localhost:5552/swagger-ui/index.html

For Kubernetes Swagger access, see this


Required

MySQL

sky which should be configured before lunching services.
See DB configuration for manual how to configure.

Kafka


Environment variable

List all used variables with default values (in docker):

SPRING_PROFILES_ACTIVE = default;
MYSQL_HOST = host.docker.internal;
MYSQL_PORT = 3306;
DB_PARAMS = useSSL=false&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Europe/Warsaw;
MYSQL_USER = YYY;
MYSQL_PASS = XXX;
MYSQL_DATABASE_NAME = sky;
SPRING_DEBUG = INFO;
HIBERNATE_DEBUG = INFO;
MYSQL_DATABASE_NAME = sky;
SHOW_SQL_QUERIES = false;
SPRING_SECURITY_USER = XYZ;
SPRING_SECURITY_PASS = XYZ;

Docker build and publish

See Deployment for more info.


Kubernetes deployment

See Deployment for more info.


DB configuration

The Fastest way to configure the DB is:

  1. create a schema named "sky".
  2. start all sky services
  3. run in sky DB: ./config/script/sql_commands/sql_offers_insert.sql
  4. run in sky DB: ./config/script/sql_commands/sql_messages_insert.sql

E2E Postman testing

  1. In postman-collection click on "sky" collection.
  2. Click "Run" in the right top corner.
  3. Change run order:
    deleteOffer should be called last,
    deleteBooking second last.
  4. inner getOfferOwnerEmail test should not be run because it has no ingress
  5. In Runner "Function" tab > Advanced Settings
    check checkbox "Run collection without stored cookies"
  6. Click "Run sky"

Request:
workaround for auth0 no information callback
is needed because of lack of starting endpoint in Auth0 callback redirection.
Due to that ingress controller redirect to a root path "https://skycloud.luksarna.com". This way first endpoint which needs authentication will not be checked because redirected to root endpoint.

About

website with offers

Resources

Stars

Watchers

Forks

Packages

No packages published