From d1dba4254ed896b14441fa660cac8c05125ef2c6 Mon Sep 17 00:00:00 2001 From: Pc Date: Sun, 26 Feb 2023 01:51:25 +0330 Subject: [PATCH 1/3] chore: Update README.md --- README.md | 29 ++++++++++++++++++++++++----- current-version.txt | 0 2 files changed, 24 insertions(+), 5 deletions(-) delete mode 100644 current-version.txt diff --git a/README.md b/README.md index e149b68..2e16768 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,9 @@ Using the CQRS pattern, we cut each business functionality into vertical slices, ## How to Run -### Config Certificate +> ### Docker + +#### Config Certificate Run the following commands for [Config SSL](https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-6.0) in your system @@ -150,20 +152,37 @@ dotnet dev-certs https --trust dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p $CREDENTIAL_PLACEHOLDER$ dotnet dev-certs https --trust ``` -### Docker Compose +#### Docker Compose Run this app in docker using the [docker-compose.yaml](./deployments/docker-compose/docker-compose.yaml) file with the below command at the root of the application: ```bash docker-compose -f ./deployments/docker-compose/docker-compose.yaml up -d ``` -Also we have a seprate docker file for up and running [infrastracture.yaml](./deployments/docker-compose/infrastracture.yaml) independently: + +> ### Kubernetes +1- Run the following command for apply TLS in kubernetes cluster ```bash -docker-compose -f ./deployments/docker-compose/infrastracture.yaml up -d +kubectl apply -f ./deployments/kubernetes/booking-secret.yml +``` +#### Note: +Also we can run this commands for create new tls.key and tls.crt and replace them with old one in `booking-secret.yml` +```bash +openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout tls.key -out tls.crt -subj "/CN=booking-microservices.com" -days 365 + +kubectl create secret tls booking-tls --key tls.key --cert tls.crt ``` -### Kubernetes - TODO +2- Run the following command for apply all services and deployments and configmap that we need +```bash +kubectl apply -f ./deployments/kubernetes/booking-microservices.yml +``` + +3- Run the following command for apply ingress-controller for revers proxy +```bash +kubectl apply -f ./deployments/kubernetes/ingress.yml +``` ### Documentation Apis diff --git a/current-version.txt b/current-version.txt deleted file mode 100644 index e69de29..0000000 From 9a798c3e3c595c8c8e2673456ebdcdab3fa65cb6 Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Sun, 26 Feb 2023 01:59:27 +0330 Subject: [PATCH 2/3] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2e16768..96d0fbc 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ Using the CQRS pattern, we cut each business functionality into vertical slices, #### Config Certificate -Run the following commands for [Config SSL](https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-6.0) in your system +Run the following commands to [Config SSL](https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-6.0) in your system #### Windows using Linux containers ```bash @@ -161,20 +161,20 @@ docker-compose -f ./deployments/docker-compose/docker-compose.yaml up -d ``` > ### Kubernetes -1- Run the following command for apply TLS in kubernetes cluster +1- Run the following command for applying TLS in Kubernetes cluster ```bash kubectl apply -f ./deployments/kubernetes/booking-secret.yml ``` #### Note: -Also we can run this commands for create new tls.key and tls.crt and replace them with old one in `booking-secret.yml` +Also, we can run this commands for creating new `tls.key` and `tls.crt` and replace them with old one in `booking-secret.yml` ```bash openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout tls.key -out tls.crt -subj "/CN=booking-microservices.com" -days 365 kubectl create secret tls booking-tls --key tls.key --cert tls.crt ``` -2- Run the following command for apply all services and deployments and configmap that we need +2- Run the following command to apply all services and deployments and configmap that we need ```bash kubectl apply -f ./deployments/kubernetes/booking-microservices.yml ``` @@ -187,7 +187,7 @@ kubectl apply -f ./deployments/kubernetes/ingress.yml ### Documentation Apis Each microservice uses swagger open api, navigate to /swagger for a list of every endpoint. -For testing apis I used the [REST Client](https://github.com/Huachao/vscode-restclient) plugin for VSCode running this file [booking.rest](./booking.rest). +For testing apis I used the [REST Client](https://github.com/Huachao/vscode-restclient) plugin for VS Code running this file [booking.rest](./booking.rest). # Support @@ -199,7 +199,7 @@ Thanks a bunch for supporting me! ## Contribution -Thanks to all [contributors](https://github.com/meysamhadeli/booking-microservices/graphs/contributors), you're awesome and this wouldn't be possible without you! The goal is to build a categorized community-driven collection of very well-known resources. +Thanks to all [contributors](https://github.com/meysamhadeli/booking-microservices/graphs/contributors), you're awesome and this wouldn't be possible without you! The goal is to build a categorized, community-driven collection of very well-known resources. ## Project References & Credits From 3a7185e4313aecf797e111c9d978a90cfc0efc7e Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Sun, 26 Feb 2023 02:00:52 +0330 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96d0fbc..4544142 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout tls.key -out tls.crt - kubectl create secret tls booking-tls --key tls.key --cert tls.crt ``` -2- Run the following command to apply all services and deployments and configmap that we need +2- Run the following command to apply all deployments and services and configmaps that we need ```bash kubectl apply -f ./deployments/kubernetes/booking-microservices.yml ```