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 |
- How it works
- Required
- Environment variable
- Docker build and publish
- Kubernetes deployment
- DB configuration
- E2E Postman testing
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.
More info about Ingres.
In postman-collection. Folder you can find an exported sky collection and envs.
For development services can be run as Spring Boot app or via Gradle.
See more:
Local development
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
sky which should be configured before lunching services.
See DB configuration for manual how to configure.
- Kubernetes deployment: Kafka kubernetes.
- Local installation: Local development.
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;
See Deployment for more info.
See Deployment for more info.
The Fastest way to configure the DB is:
- create a schema named "sky".
- start all sky services
- run in sky DB: ./config/script/sql_commands/sql_offers_insert.sql
- run in sky DB: ./config/script/sql_commands/sql_messages_insert.sql
- In postman-collection click on "sky" collection.
- Click "Run" in the right top corner.
- Change run order:
deleteOffershould be called last,
deleteBookingsecond last. inner getOfferOwnerEmailtest should not be run because it has no ingress- In Runner "Function" tab > Advanced Settings
check checkbox "Run collection without stored cookies" - 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.