This is a small demo project to quickly setup a mix of containerized micro-services that communicate with each other within the network. This demo is intended to provide a playground for orchestrators!
The project consists of
- An API Gateway, written in .NET Core, exposes port
8080(8080when in a Container) - A Radom Number Generator Service, written in .NET Core, exposes port
8090(8080when in a Container) - A Web Frontend, written in Angular, exposes port
4200(8080when in a Container)
The easiest way to run and debug the microservices on you development machine is Visual Studio Code. Just open the folder and select one of the Debug configurations.
You need to set some environment variables to configure the services and their discovery.
MicroCommunication.Api:
ApiKey=test123Optional: The key, that the API allows for authorizationRedisCacheConnectionString=...Optional: The connection string for a Redis Cache to sync SignalR HubsApplicationInsightsConnectionString=...Optional: The Azure Application Insights Connection StringCorsOptional: The domain of your web app to add to the CORSRandomApiUrlThe URL to connect to the Random Service
MicroCommunication.Random:
MongoDbConnectionString=mongo://...Optional: The connection string for a Mongo DB to store the history inApplicationInsightsConnectionString=...Optional: The Azure Application Insights Connection StringCorsOptional: The domain of your web app to add to the CORS
MicroCommunication.Web:
API_URL=http://localhost:8080Where to find the APIAPI_KEY=test123Which key to use when calling the APIAPPLICATION_INSIGHTS_CONNECTION_STRING=...Optional: The Azure Application Insights Connection String
This Demo project is intended to be tested within container orchestrators. For the various different orchestrators out there, you can find configuration files for multiple different ones in the repository.
kubectl create -f env/kuberneteshelm install microcommunication env/helm \
--namespace microcommunication \
--create-namespacehelm repo add fluxcd https://charts.fluxcd.io
helm upgrade -i flux fluxcd/flux \
--set git.url=https://github.com/robinmanuelthiel/microcommunication.git \
--set git.path=env/kubernetes \
--set git.readonly=true \
--namespace fluxdocker compose -f env/docker/docker-compose.yaml upk6 tests/performance/script.js
