An API used to store and retrieve customer information.
The Api s developed as a proof of concept purpose.
Dotnet core 2.2 web api project.
Hosted using Docker on Kubernetes.
TBC
Owned by Xyz Team.
- Couchbase Database (To upsert and retrieve customer records)
24/7. If downtime occurs, applications will restart itself.
Is hosted using docker as container.
Nothing except for configuration for API endpoints/keys.
Uses dotnet core ASPNETCORE_ENVIRONMENT environment variable.
docker-compose.yml file exists to allow developer to easily run a local version of the API.
Build: docker-compose build
Run: docker-compose up
See here for how to run performance tests.
Postman pack is included in the root of the application for testing purposes.
Docker
Docker-Compose
POSTMAN
allows 128 cpu and 256 memory
Application configuration is stored in the appsettings.json. Infrastructure configuration is in docker-compose.yml
Secrets are passed in via secure environment variables at container run time.
The application uses BasicAuth strategy, the username and password are stored in the app config temporarily
The customer passwords are hashed for security reasons in the database.
None configured since its POC.
- App Insights SDK for machine level detail and APM diagnostics
- Serilog
structured JSON format.
Warnings logged for rules that fail. Any log message level of error is a critical error to the system.
/api/health should return 200 if service is up.
Image is built on DockerHub cloud platform. Deployment can be done on docker contianer hosting platforms such as ECS, Kubernetes, RancherOS.
If an instance becomes unhealthy (health check returns non-200) Check the logs for errors and investigate service related issues.
See here for extension methods for quick writing of rules.
The template for this came from SkeltonThatcher