Please check the TechStack.md file for details.
You don't need to install NVM per se. This may only be need if you are running a non LTS version of nodejs. In that case, just run:
nvm-install.sh
node -v
3.1 - Run docker
sudo usermod -a -G docker $(whoami)
Restart and:
newgrp docker
make docker-clean-build-start
3.2 - Load Kong Settings
Wait for containers to start (usually no more than 10 seconds).
make kong-setup
3.4 - Docker Usage
docker exec -it buy-oyc-nginx /bin/bash
docker exec -it kong /bin/bash
docker exec -it buy-oyc-parking /bin/bash
docker exec -it buy-oyc-ticket /bin/bash
curl http://buy-oyc-ticket:8000/api/yucca-ticket
API
- http://localhost:8080
- http://localhost:8000/api/yucca-api/
- http://localhost:8000/api/yucca-ticket/
- http://localhost:8000/api/yucca-parking/
- http://localhost:8000/api/yucca-catering/
Routes
Although this project is meant to be used with Locust and for benchmark testing and rate-limiting, it may be interesting to understand the data model first. Swagger UI helps with that.
Please run
make docker-clean-build-start
before anything. If you are running the services outside Docker, please make sure to have these environment variables assigned:POSTGRESQL_HOST=localhost;REDIS_HOST=localhost
Here are the endpoints for the services with the open port:
- buy-oyc-api-service
- buy-oyc-catering-service
- buy-oyc-concert-service
- buy-oyc-parking-service
- buy-oyc-ticket-service
Via Kong Gateway for swagger.yml
- http://localhost:8000/api/yucca-api/swagger/swagger.yml
- http://localhost:8000/api/yucca-ticket/swagger/swagger.yml
- http://localhost:8000/api/yucca-parking/swagger/swagger.yml
- http://localhost:8000/api/yucca-catering/swagger/swagger.yml
- http://localhost:8000/api/yucca-concert/swagger/swagger.yml
Via Kong Gateway for Swagger UI
- http://localhost:8000/api/yucca-api/swagger/views/swagger-ui/index.html
- http://localhost:8000/api/yucca-ticket/swagger/views/swagger-ui/index.html
- http://localhost:8000/api/yucca-parking/swagger/views/swagger-ui/index.html
- http://localhost:8000/api/yucca-catering/swagger/views/swagger-ui/index.html
- http://localhost:8000/api/yucca-concert/swagger/views/swagger-ui/index.html
Make sure to check the e2e tests in order to see how Swagger is implemented. The Explorer textbox needs to be manually configured at the moment.
In order to run cypress tests, please run
make dcup-full
Then go to the e2e folder and run:
make cypress-open
3.5. - Security Report
mvn clean install -Powasp
Read report after running:
- Making Regression/Chain tests in Micronaut
- Pub-sub Redis in Micronaut
- Micronaut - Getting the basics
- Redis Cache - A String story
- Kotlin's reified and why you should use it(or maybe not)
- Kotlin Data Modelling with Micronaut
- Micronaut and Kotlin - Making round trip integration tests
sequenceDiagram
participant Customer Service Client
participant API
participant Ticket API
participant Concert API
participant Catering API
participant Parking API
participant Redis
participant Database
rect rgb(1,40,25)
Customer Service Client -->> API: Request Ticket Reservation (POST)
API -->> Database: Persists Reservation
Database -->> API: Delivers record with Reference ID
API -->> Redis: Publishes TicketDto Payload
API -->> Customer Service Client: Response with reservation number
Redis --x API: Listens to TicketDto
API -->> Ticket API: Posts ticket dto payload
Ticket API -->> Redis: Publish Ticket Dto to Redis
Ticket API --x API: Async ACK
Redis --x Ticket API: Listen to Ticket Dto
Ticket API -->> Concert API: Post Concert Fragment
Concert API --x Redis: Publish Concert
Concert API --x Ticket API: Async ACK
Ticket API -->> Catering API: Send Drink(s)
Catering API --x Redis: Publish Drink(s)
Catering API --x Ticket API: Drink Async ACK
Ticket API -->> Catering API: Send Meal(s)
Catering API --x Redis: Publish Meal(s)
Catering API --x Ticket API: Meal Async ACK
Ticket API -->> Parking API: Send Parking Reservation
Parking API --x Ticket API: Parking Reservation ACK
Parking API --x Redis: Publish Parking Reservation
Redis --x Concert API: Listen to concert data
Concert API --x Database: Persist concert data
Redis --x Catering API: Listen to drink data
Catering API --x Database: Persist drinks data
Redis --x Catering API: Listen to meal data
Catering API --x Database: Persist meals data
Redis --x Parking API: Listen to parking data
Parking API --x Database: Persist parking data
end
7.1. Online
- Permission issue with PostgreSQL in docker container
- What kinds of bot attacks are stopped by rate limiting?
- Using Micronaut Data, JDBC, R2DBC, TestContainers, and Flyway with multiple schemas
- Realtime Testing: Micronaut, Postgres and Testcontainer
- Entity-Relationship Diagram Symbols and Notation
- MICRONAUT 1.0 RC1 AND THE POWER OF AHEAD-OF-TIME COMPILATION
- From Spring Boot to Micronaut
- Create a New React App
- Micronaut: A five-minute introduction
- Micronaut CLI
- CREATING YOUR FIRST MICRONAUT APPLICATION
- Micronaut
- Deploy an Enterprise License
- Kong Gateway Licensing @ Kong Docs
- How To Enable the Dev Portal @ Kong Docs
- Kong /docker-kong 🦍 (sounds like Donkey Kong!)
- Kong Gateway
- MemboxX
- Kong Inc. Wikipedia Repubished
- 5 questions for Kong CEO Augusto Marietti
- Author: Augusto Marietti
- Years after crashing on Travis Kalanick’s couch, this founder has raised $18M for his startup, Mashape
- Mashape Rebrands as Kong Inc., Declares Monolithic Application Dead
- Kong Inc.
- Redhwan Nacef's Kong Tutorial On GitHub
- Lorem Picsum Phosots
7.2. Online Videos
- Compose V2
- Kong Gateway for Beginners: Adding a Service, Route and Plugins
- Kong Gateway Tutorial | API Gateway For Beginners
- How to Use Kong Gateway JWT Plugin
- Developing Micronaut Applications with IntelliJ IDEA
- Micronaut Deep Dive by Graeme Rocher
- Introduction to Micronaut • Graeme Rocher • GOTO 2019
- What is Rate Limiting / API Throttling? | System Design Concepts
- API Gateway Plugins for Kubernetes Ingress Controller
- Installing Kong's API Gateway with Docker
- DevOps Is More Than Configuration Management
- DynamoDB Partitions - How they work - AWS Service Deep Dive
- Working with DynamoDB Tables - Partition Key and Sort Key - Dynamo Deep Dive
- AWS re:Invent 2018: Amazon DynamoDB Deep Dive: Advanced Design Patterns for DynamoDB (DAT401)
- What is a DynamoDB GSI (Global Secondary Index) ?