Skip to content

Commit aeea6c2

Browse files
committed
merge
2 parents a81d81c + 068ffd9 commit aeea6c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1670
-142
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
build:
22
dotnet build
33
start:
4-
dotnet run --project ./src/Genocs.TelegramIntegration.WebApi
4+
dotnet run --project ./src/apps/Genocs.TelegramIntegration.WebApi
55
nuget:
66
nuget pack -NoDefaultExcludes -OutputDirectory nupkgs
77
publish:
@@ -23,4 +23,12 @@ fds: # force rededeploy aws ecs service
2323
gw: # git docker workflow to push docker image to the repository based on the main branch
2424
@echo triggering github workflow to push docker image to container
2525
@echo ensure that you have the gh-cli installed and authenticated.
26-
gh workflow run dockerhub-publish -f push_to_docker=true
26+
gh workflow run dockerhub-publish -f push_to_docker=true
27+
28+
d-build: # docker build images
29+
@echo building docker images
30+
@echo you should have docker installed and running
31+
bash ./src/apps/scripts/build-images.sh
32+
d-push: # docker tag and push images
33+
@echo tag images as latest and publish
34+
bash ./src/apps/scripts/push-images.sh

README.md

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ Use [**api-workbench**](./api-workbench.rest) inside Visual Studio code with [RE
289289
"password": "test",
290290
"rawData": ""
291291
},
292-
"issuer": "genocs-identity-service",
293-
"validIssuer": "genocs-identity-service",
292+
"issuer": "genocs-identities-service",
293+
"validIssuer": "genocs-identities-service",
294294
"validateAudience": false,
295295
"validateIssuer": true,
296296
"validateLifetime": true,
@@ -521,35 +521,60 @@ docker builder prune
521521
Following commands are useful to build and push the images one by one
522522

523523
``` bash
524-
cd src/apps
524+
# Build images
525+
./src/apps/scripts/build-images.sh
525526

526-
# Build the api gateway
527-
docker build -t genocs/apigateway:1.0.0 -t genocs/apigateway:latest -f ./apigateway.dockerfile .
527+
# Push images
528+
./src/apps/scripts/push-images.sh
529+
```
530+
531+
### How to deploy the application on Kubernetes
528532

529-
# Build the identity service
530-
docker build -t genocs/identities:1.0.0 -t genocs/identities:latest -f ./identity.dockerfile .
533+
You can deploy the application on Kubernetes cluster.
531534

532-
# Build the order service
533-
docker build -t genocs/orders:1.0.0 -t genocs/orders:latest -f ./containers/order.dockerfile .
535+
``` bash
536+
# Build images
537+
./src/apps/scripts/deploy-k8s.sh
538+
```
534539

535-
# Build the product service
536-
docker build -t genocs/products:1.0.0 -t genocs/products:latest -f ./product.dockerfile .
540+
### How to use makefile
537541

538-
# Build the signalr service
539-
docker build -t genocs/signalr:1.0.0 -t genocs/signalr:latest -f ./signalr.dockerfile .
542+
Prerequisites:
543+
- make
540544

545+
To install make on MacOS you can use brew
541546

542-
# Push on Dockerhub
543-
docker push genocs/apigateway:1.0.0
544-
docker push genocs/apigateway:latest
545-
docker push genocs/identities:1.0.0
546-
docker push genocs/identities:latest
547-
docker push genocs/orders:1.0.0
548-
docker push genocs/orders:latest
549-
docker push genocs/products:1.0.0
550-
docker push genocs/products:latest
551-
docker push genocs/signalr:1.0.0
552-
docker push genocs/signalr:latest
547+
``` bash
548+
brew install make
549+
```
550+
551+
To install make on Ubuntu you can use apt
552+
553+
``` bash
554+
sudo apt install make
555+
```
556+
557+
To install make on Windows you can use [choco](https://chocolatey.org/)
558+
559+
``` bash
560+
choco install make
561+
```
562+
563+
Upon installation you can use the makefile to build, run, deploy the application.
564+
565+
``` bash
566+
# Build the solution
567+
make build
568+
```
569+
570+
571+
### How to use Helm chart
572+
573+
Inside the folder **./src/apps/k8s/helm** you can find the Helm chart to deploy the application on Kubernetes.
574+
575+
``` bash
576+
cd ./src/apps/k8s/helm
577+
microk8s helm install genocs ./gnxchart
553578
```
554579

555580

containers/prometheus/prometheus.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ scrape_configs:
77
static_configs:
88
- targets: ["prometheus:9090"]
99

10-
- job_name: "api-gateway"
10+
- job_name: "apigateway"
1111
static_configs:
12-
- targets: ["api-gateway"]
12+
- targets: ["apigateway"]
1313

14-
- job_name: "identity-service"
14+
- job_name: "identities-service"
1515
static_configs:
16-
- targets: ["identity-service"]
16+
- targets: ["identities-service"]
1717

1818
- job_name: "products-service"
1919
static_configs:
@@ -23,6 +23,6 @@ scrape_configs:
2323
static_configs:
2424
- targets: ["orders-service"]
2525

26-
- job_name: "signalr-service"
26+
- job_name: "notifications-service"
2727
static_configs:
28-
- targets: ["signalr-service"]
28+
- targets: ["notifications-service"]

genocs.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application"
120120
src\apps\apigateway.dockerfile = src\apps\apigateway.dockerfile
121121
src\apps\docker-compose.override.yml = src\apps\docker-compose.override.yml
122122
src\apps\docker-compose.yml = src\apps\docker-compose.yml
123-
src\apps\identity.dockerfile = src\apps\identity.dockerfile
123+
src\apps\identities.dockerfile = src\apps\identities.dockerfile
124124
src\apps\local.env = src\apps\local.env
125125
src\apps\notifications.dockerfile = src\apps\notifications.dockerfile
126126
src\apps\orders.dockerfile = src\apps\orders.dockerfile

src/Genocs.Auth/README_NUGET.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Following are the project settings needed to enable monitoring
2626
"password": "test",
2727
"rawData": ""
2828
},
29-
"issuer": "genocs-identity-service",
30-
"validIssuer": "genocs-identity-service",
29+
"issuer": "genocs-identities-service",
30+
"validIssuer": "genocs-identities-service",
3131
"validateAudience": false,
3232
"validateIssuer": true,
3333
"validateLifetime": true,

src/Genocs.Core.Demo.HelloWorld/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@
7575
"simmetric_jwt": {
7676
"enabled": true,
7777
"requireHttpsMetadata": false,
78-
"issuer": "genocs-identity-service",
78+
"issuer": "genocs-identities-service",
7979
"issuerSigningKey": "THIS IS USED TO SIGN AND VERIFY JWT TOKENS, REPLACE IT WITH YOUR OWN SECRET, IT CAN BE ANY STRING",
8080
"validateIssuer": true,
81-
"validIssuer": "genocs-identity-service",
81+
"validIssuer": "genocs-identities-service",
8282
"validateAudience": false,
8383
"validateLifetime": false,
8484
"requireExpirationTime": false,

src/Genocs.Core.Demo.Worker/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@
128128
"password": "test",
129129
"rawData": ""
130130
},
131-
"issuer": "genocs-identity-service",
132-
"validIssuer": "genocs-identity-service",
131+
"issuer": "genocs-identities-service",
132+
"validIssuer": "genocs-identities-service",
133133
"validateAudience": false,
134134
"validateIssuer": true,
135135
"validateLifetime": true,

src/apps/apigateway/APIGateway.WebApi/APIGateway.WebApi.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<RootNamespace>Genocs.APIGateway.WebApi</RootNamespace>
77
<AssemblyName>Genocs.APIGateway.WebApi</AssemblyName>
88
<IsPackable>false</IsPackable>
9+
<UserSecretsId>Genocs</UserSecretsId>
910
</PropertyGroup>
1011

1112
<ItemGroup Condition="'$(Configuration)' == 'Debug'">

src/apps/apigateway/APIGateway.WebApi/appsettings.Containers.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"consul": {
33
"enabled": false,
44
"url": "consul",
5-
"service": "api-gateway",
5+
"service": "apigateway",
66
"address": "apigateway",
77
"port": "80",
88
"pingEnabled": true
99
},
1010
"fabio": {
1111
"enabled": true,
1212
"url": "http://fabio:9999",
13-
"service": "api-gateway",
13+
"service": "apigateway",
1414
"requestRetries": 3
1515
},
1616
"httpClient": {
@@ -50,7 +50,7 @@
5050
},
5151
"jaeger": {
5252
"enabled": true,
53-
"serviceName": "api-gateway",
53+
"serviceName": "apigateway",
5454
"udpHost": "http://localhost:4317",
5555
"udpPort": 6831,
5656
"maxPacketSize": 65000,
@@ -97,9 +97,9 @@
9797
"rawData": ""
9898
},
9999
"expiryMinutes": 60,
100-
"issuer": "genocs-identity-service",
100+
"issuer": "genocs-identities-service",
101101
"issuerSigningKey": "THIS IS USED TO SIGN AND VERIFY JWT TOKENS, REPLACE IT WITH YOUR OWN SECRET, IT CAN BE ANY STRING",
102-
"validIssuer": "genocs-identity-service",
102+
"validIssuer": "genocs-identities-service",
103103
"validateAudience": false,
104104
"validateIssuer": false,
105105
"validateLifetime": false,
@@ -120,22 +120,22 @@
120120
},
121121
"mongodb": {
122122
"connectionString": "mongodb://localhost:27017",
123-
"database": "api-gateway",
123+
"database": "apigateway",
124124
"seed": false,
125125
"enableTracing": true
126126
},
127127
"rabbitMq": {
128128
"redis": {
129129
"connectionString": "redis",
130-
"instance": "api-gateway:",
130+
"instance": "apigateway:",
131131
"database": 0
132132
},
133133
"reverseProxy": {
134134
"clusters": {
135-
"identity-cluster": {
135+
"identities-cluster": {
136136
"destinations": {
137137
"destination1": {
138-
"address": "https://identity-service"
138+
"address": "https://identities-service"
139139
}
140140
}
141141
},
@@ -173,17 +173,17 @@
173173
"enabled": false,
174174
"engineVersion": 2,
175175
"mountPoint": "kv",
176-
"path": "api-gateway/settings"
176+
"path": "apigateway/settings"
177177
},
178178
"pki": {
179179
"enabled": false,
180-
"roleName": "api-gateway",
181-
"commonName": "api-gateway.demo.io"
180+
"roleName": "apigateway",
181+
"commonName": "apigateway.demo.io"
182182
},
183183
"lease": {
184184
"mongo": {
185185
"type": "database",
186-
"roleName": "api-gateway",
186+
"roleName": "apigateway",
187187
"enabled": false,
188188
"autoRenewal": true,
189189
"templates": {

0 commit comments

Comments
 (0)