Homeworks for Highload Architecture course in NaUKMA
main- main for CI (Lab 5)feature-lab5-splitted-actions- develop CI featurefeature-lab4- for Lab 4deploy- for extra deploy task (almost work)
- Make two API endpoints: GET and POST
- For read action you should use cache
- For post action you should use queue
- Result must be wrapped in
docker-composewith instructions to deploy.
- Rename
.env.exampleto.env - Use
docker compose upto create instances - Wait for initialization
- After it you can access API with
localhost:4000 - Also you can try use
--scale {service_name}={scale_number}to increase number of containers for some services.
Service names: read, write, worker
Just copy docker compose up --scale worker=3 --scale read=2 --scale write=2
/get- returns all books (with caching)/get/<id>- returns book by id (with caching)/write/add- create new instance (with queue)/write/edit/<id>- edit instance (with queue)/write/check_status/<job_id>- check job status
You can use configured postman collection for test purpose.
P.S. Postman sometimes ignore variable assigning, check it if error with request occur.
Create a CI using simple GitHub Flow around your previous project (API for managing books):
- Use docker as a build environment within GitHub Actions Stages: build, test (pls write some tests for your app please, at least 2)
- Apply actions automaticaly on merge in master (main) branch from your feature branch
- Use GitHub flow
Create CD (Continuos Delivery) job based on GitHub Actions, whitch will deploy your app to your AWS infrastructure (+10 points to your score)