Skip to content

Commit e26d6d8

Browse files
committed
updates/organize better the project documentation
1 parent b8c4edf commit e26d6d8

6 files changed

+107
-23
lines changed

README.md

+15-23
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
1-
# Microservices with .Net Core, Docker and Azure Service Fabric
1+
# Microservices with .Net Core, Docker and Azure Service Fabric/Kubernetes
22

3-
## Prerequisites and Installation Requirements
3+
## Prerequisites and Installation Requirements (only for development)
44

5-
1. Install [Docker for Windows](https://docs.docker.com/docker-for-windows/install/).
6-
2. Install [.NET Core SDK](https://www.microsoft.com/net/download/windows)
7-
3. Install [Visual Studio 2019](https://www.visualstudio.com/downloads/) 16.4 or later.
8-
4. Share drives in Docker settings, in order to deploy and debug with Visual Studio 2019 (See the below image)
5+
1. Install Docker for [Windows](https://docs.docker.com/docker-for-windows/install/)/[Mac](https://docs.docker.com/docker-for-mac/install/).
6+
2. Install [.NET Core SDK](https://www.microsoft.com/net/download)
7+
3. Install [Visual Studio](https://www.visualstudio.com/downloads/) 2017 15.8 or later (Visual Studio 2019 16.4 or later recommended) or [Visual Studio Code](https://code.visualstudio.com/).
8+
4. [Tuning Docker for better performance and Debugging](https://github.com/vany0114/microservices-dotnetcore-docker-sf-k8s/blob/master/TunningDocker.md)
99
5. Clone this Repo
1010
6. Set `docker-compose` project as startup project.
1111
7. Press F5 and that's it!
1212

13-
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/docker_settings_shared_drives.png)
13+
## Architecture and Deployment
14+
* [Local deployment](https://github.com/vany0114/microservices-dotnetcore-docker-sf-k8s/blob/master/local-deployment.md)
15+
* [Service Fabric Architecture and Deployment](https://github.com/vany0114/microservices-dotnetcore-docker-sf-k8s/blob/master/SF-architecture.md)
16+
* [Kubernetes Architecture and Deployment](https://github.com/vany0114/microservices-dotnetcore-docker-sf-k8s/blob/master/k8s-architecture.md)
1417

15-
> Note: The first time you hit F5 it'll take a few minutes, because in addition to compile the solution, it needs to pull/download the base images (SQL for Linux Docker, ASPNET, MongoDb and RabbitMQ images) and register them in the local image repo of your PC. The next time you hit F5 it'll be much faster.
16-
17-
### Tuning Docker for better performance
18-
19-
It is important to set Docker up properly with enough memory RAM and CPU assigned to it in order to improve the performance, or you will get errors when starting the containers with VS 2017 or "docker-compose up". Once Docker for Windows is installed in your machine, enter into its Settings and the Advanced menu option so you are able to adjust it to the minimum amount of memory and CPU (Memory: Around 4096MB and CPU:3) as shown in the image.
20-
21-
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/docker_settings.png)
22-
23-
### Architecture
24-
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/Duber_Production_Environment_Architecture.png)
25-
26-
### Demo Screenshots
27-
#### Website
18+
## Screenshots
19+
### Website
2820
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/duber-in-action.gif)
29-
#### Trip API
21+
### Trip API
3022
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/duber-trip-api.png)
31-
#### Invoice API
23+
### Invoice API
3224
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/duber-invoice-api.png)
3325

3426
## Support
3527
If you find this project helpful you can [support me](http://www.paypal.me/vany0114/3)!
3628

37-
Visit my blog <http://elvanydev.com/Microservices-part1/> to view all the posts and to know all the details about this project.
29+
Visit my blog <http://elvanydev.com/Microservices-part1/> to view the whole posts series and to know all the details about this project.

SF-architecture.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Service Fabric Architecture and Deployment
2+
3+
## Architecture
4+
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/Duber_Production_Environment_Architecture.png)
5+
6+
## Deployment
7+
Visit [my blog](http://elvanydev.com/Microservices-part4/) to see all about the deployment using a Service Fabric cluster.

TunningDocker.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Tuning Docker for better performance and Debugging
2+
3+
It is important to set Docker up properly with enough memory RAM and CPU assigned to it in order to improve the performance on your local/development environment, or you will get errors when starting the containers with VS 2019 or "docker-compose up". Once Docker is installed in your machine, enter into its Settings and the Advanced menu option so you are able to adjust it to the minimum amount of memory and CPU (Memory: Around 4096MB and CPU:3) as shown in the image.
4+
5+
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/docker_settings.png)
6+
7+
Share drives in Docker settings, in order to deploy it as a Docker Compose application and also to debug with Visual Studio 2019 (See the below image)
8+
9+
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/docker_settings_shared_drives.png)
10+
11+
> Note: The first time you hit F5 it'll take a few minutes, because in addition to compile the solution, it needs to pull/download the base images (SQL for Linux Docker, ASPNET, MongoDb and RabbitMQ images, etc) and register them in the local image repo of your PC. The next time you hit F5 it'll be much faster.

deploy/k8s/local/deploy-local.ps1

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# k8s dashboard
2+
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
3+
kubectl apply -f dashboard-adminuser.yaml
4+
5+
# nginx-ingress
6+
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml
7+
kubectl apply -f nginx-ingress\custom-service.yaml
8+
9+
# mongo
10+
kubectl apply -f mongo\mongo-admin.yaml
11+
kubectl apply -f mongo\mongo-deployment.yaml
12+
kubectl apply -f mongo\mongo-service.yaml
13+
14+
# rabbit
15+
kubectl apply -f rabbit\rabbit-admin.yaml
16+
kubectl apply -f rabbit\rabbit-deployment.yaml
17+
kubectl apply -f rabbit\rabbit-service.yaml
18+
19+
# sql-server
20+
kubectl apply -f sql-server\sql-admin.yaml
21+
kubectl apply -f sql-server\sql-deployment.yaml
22+
kubectl apply -f sql-server\sql-service.yaml
23+
24+
# external system
25+
kubectl apply -f external-system\payment-deployment.yaml
26+
kubectl apply -f external-system\payment-service.yaml
27+
28+
# invoice
29+
kubectl apply -f invoice\invoice-deployment.yaml
30+
kubectl apply -f invoice\invoice-ingress.yaml
31+
kubectl apply -f invoice\invoice-service.yaml
32+
33+
# trip
34+
kubectl apply -f trip\trip-deployment.yaml
35+
kubectl apply -f trip\trip-hpa.yaml
36+
kubectl apply -f trip\trip-ingress.yaml
37+
kubectl apply -f trip\trip-service.yaml
38+
39+
# website
40+
kubectl apply -f website\website-deployment.yaml
41+
kubectl apply -f website\website-hpa.yaml
42+
kubectl apply -f website\website-ingress.yaml
43+
kubectl apply -f website\website-service.yaml

k8s-architecture.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Kubernetes Architecture and Deployment
2+
3+
## Architecture
4+
WIP
5+
6+
## Deployment
7+
WIP

local-deployment.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Local deplyment using Kubernetes
2+
3+
## Prerequisites and Installation Requirements
4+
5+
1. Install Docker for [Windows]((https://docs.docker.com/docker-for-windows/install/))/[Mac](https://docs.docker.com/docker-for-mac/install/).
6+
2. Make sure to check the opton *Enable Kubernetes* on your Docker settings.
7+
![](https://github.com/vany0114/vany0114.github.io/blob/master/images/docker-desktop-k8s.png)
8+
3. Run `deploy-local.ps1` script to deploy the solution on your local Kubernetes cluster.
9+
4. Add `duber.local.com` domain to your `hosts` file. That's the host using by our Ingress in order to expose the Frontend.
10+
```
11+
127.0.0.1 duber.local.com
12+
```
13+
Optionally, if you want to expose the API's you have to add `invoice.local.com` and `trip.local.com` domains too.
14+
```
15+
127.0.0.1 invoice.local.com
16+
127.0.0.1 trip.local.com
17+
```
18+
6. Go to http://duber.local.com:81/ and you'll see the application up and working!
19+
20+
## Admin tools
21+
To be able to access to our SQL or Mongo databases through an IDE, or to RabbitMQ' dashboard, we exposed a port through a `Node Port`:
22+
* SQL Server: `31433`, connection example: `tcp:127.0.0.1,31433`
23+
* Mongo: `31434`, connection example: `mongodb://0.0.0.0:31434/`
24+
* RabbitMQ: `31672`, connection example: `http://localhost:31672/#/`

0 commit comments

Comments
 (0)