Skip to content

Commit d9edd38

Browse files
committed
Update README and configuration scripts to reflect branch name changes and improve package versioning
- Enhanced README.md with formatting improvements and clarified sections. - Updated GitHub Actions workflow to use 'main' branch instead of 'master'. - Modified build and packaging scripts to align with the new branch naming convention. - Changed package references in Orders.WebApi.csproj to use version wildcards for better flexibility.
1 parent 858cfdb commit d9edd38

File tree

11 files changed

+2527
-79
lines changed

11 files changed

+2527
-79
lines changed

.github/workflows/build_and_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build test and pack
22

33
on:
44
push:
5-
branches: [master, develop]
5+
branches: [main, develop]
66
pull_request:
7-
branches: [master, develop]
7+
branches: [main, develop]
88

99
jobs:
1010
build:

README.md

Lines changed: 49 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!-- PROJECT SHIELDS -->
2+
23
[![License][license-shield]][license-url]
34
[![Build][build-shield]][build-url]
45
[![Downloads][downloads-shield]][downloads-url]
@@ -37,31 +38,29 @@
3738
[twitterx-shield]: https://img.shields.io/twitter/url/https/twitter.com/genocs.svg?style=social
3839
[twitterx-url]: https://twitter.com/genocs
3940

40-
4141
<p align="center">
4242
<img src="./assets/genocs-library-logo.png" alt="icon">
4343
</p>
4444

45-
4645
# Genocs .NET library
4746

48-
This repo contains a set of libraries to build LOB (Line Of Business) applications. The library is open source and built to be PRODUCTION READY. The library is built on top of .NET9, it is designed and maintained by Genocs.
47+
This repo contains a set of libraries to build LOB (Line Of Business) applications. The library is open source and built to be PRODUCTION READY. The library is built on top of .NET9, it is designed and maintained by Genocs.
4948

5049
Packages are available on [NuGet Genocs](https://www.nuget.org/profiles/gioema_nocco).
5150

5251
## The idea
5352

54-
***Build a software library to be cloud agnostic***
53+
**_Build a software library to be cloud agnostic_**
5554

56-
Building a software library to be cloud agnostic has several advantages. First, it allows developers to create applications that can be deployed on any cloud platform without having to rewrite code or make major changes. This makes it easier for developers to quickly deploy their applications across multiple cloud providers. Additionally, it reduces the cost of development and maintenance since developers don’t have to write separate code for each cloud provider. Finally, it increases the scalability of applications since they can be easily deployed on different cloud platforms with minimal effort.
55+
Building a software library to be cloud agnostic has several advantages. First, it allows developers to create applications that can be deployed on any cloud platform without having to rewrite code or make major changes. This makes it easier for developers to quickly deploy their applications across multiple cloud providers. Additionally, it reduces the cost of development and maintenance since developers don’t have to write separate code for each cloud provider. Finally, it increases the scalability of applications since they can be easily deployed on different cloud platforms with minimal effort.
5756

58-
***Cloud agnostic by use of Containers***
57+
**_Cloud agnostic by use of Containers_**
5958

6059
The advantages of using containers are numerous. Containers provide a lightweight, portable, and isolated environment for applications to run in, allowing them to be easily moved between different systems. This makes it easier to deploy applications quickly and reliably across different environments. Additionally, containers can help reduce resource consumption by running multiple applications on the same host, as each container is isolated from the others. This helps to improve efficiency and scalability. Finally, containers provide an additional layer of security, as they are isolated from the underlying operating system and other applications.
6160

6261
## Documentation
6362

64-
You can find a useful documentation about how to use the library. The documentation contains the complete set of libraries, template, CLI that altogether make the *genocs ecosystem* a comprensive set of tools to build enterprise solutions.
63+
You can find a useful documentation about how to use the library. The documentation contains the complete set of libraries, template, CLI that altogether make the _genocs ecosystem_ a comprensive set of tools to build enterprise solutions.
6564

6665
Documentation available at [Genocs Blog](https://genocs-blog.netlify.app/library/)
6766

@@ -70,8 +69,7 @@ Documentation available at [Genocs Blog](https://genocs-blog.netlify.app/library
7069
In this section you can find the infrastructure components you need to execute the solution. Infrastucture components are the database, the enterprice servise bus, the distributed logging, monitoring, tracing systems along with database and many more.
7170
You can use **Docker compose** to setup the infrastructure components just by running few commands.
7271

73-
74-
``` bash
72+
```bash
7573
cd ./containers
7674

7775
# Setup the infrastructure.
@@ -107,46 +105,45 @@ docker compose -f ./infrastructure-ml.yml --env-file ./.env --project-name genoc
107105
```
108106

109107
`infrastructure.yml` allows to install the basic infrastructure components. They are:
108+
110109
- [RabbitMQ](https://rabbitmq.com)
111110
- [MongoDB](https://mongodb.com)
112111

113-
114112
`infrastructure-db.yml` allows to install Redis and PostgreSQL
113+
115114
- [Redis](https://redis.io)
116115
- [Postgres](https://www.postgresql.org/)
117116

118-
119117
You can check them locally:
120118

121119
- [RabbitMQ](http://localhost:15672): `localhost:15672`
122120
- Redis: `TCP:localhost:6379`
123121
- MongoDB: `TCP:localhost:27017`
124122
- Postgres: `TCP:localhost:5432`
125123

126-
127124
`infrastructure-monitoring.yml` allows to install the monitoring infrastructure components. They are:
125+
128126
- [Aspire](https://learn.microsoft.com/en-us/dotnet/aspire/)
129127
- [Prometheus](https://prometheus.io/)
130128
- [Grafana](https://grafana.com/)
131129
- [InfluxDB](https://www.influxdata.com/)
132130
- [Jaeger](https://www.jaegertracing.io/)
133131
- [Seq](https://datalust.co/seq)
134132

135-
136133
You can find the console locally at:
134+
137135
- [Aspire](localhost:18888): `localhost:18888`
138136
- [Prometheus](localhost:9090): `localhost:9090`
139137
- [Grafana](localhost:3000): `localhost:3000`
140138
- [InfluxDB](localhost:8086): `localhost:8086`
141139
- [Jaeger](localhost:16686): `localhost:16686`
142140
- [Seq](localhost:5341): `localhost:5341`
143141

144-
145142
`infrastructure-scaling.yml` allows to install the scaling infrastructure components composed by a Fabio (Loadbalancer) Service Discovery (Consul) components. They are:
143+
146144
- [Fabio](https://fabiolb.net/)
147145
- [Consul](https://www.consul.io/)
148146

149-
150147
`infrastructure-security.yml` allows to install the security infrastructure components.
151148

152149
Inside the file you can find:
@@ -158,9 +155,8 @@ Inside the file you can find:
158155
> The commands above allows to setup infrastructure components, this means you can find all the containers inside the same network `genocs`.
159156
>
160157
> Whenever possible the data are persisted on the host machine by means of volumens, so you can restart the containers without losing data.
161-
162158
163-
``` yml
159+
```yml
164160
networks:
165161
genocs:
166162
name: genocs-network
@@ -185,26 +181,24 @@ volumes:
185181
186182
Remember to add the network configuration inside your docker compose file to setup the network, before running the containers.
187183
188-
189-
## ***Kubernetes cluster***
184+
## **_Kubernetes cluster_**
190185
191186
You can setup the application inside a Kubernetes cluster.
192187
193-
Check the repo [enterprise-containers](https://github.com/Genocs/enterprise-containers) to setup a Kubernetes cluster.
188+
Check the repo [enterprise-containers](https://github.com/Genocs/enterprise-containers) to setup a Kubernetes cluster.
194189
There you can find scripts, configuration files and documentation to setup a cluster from scratch.
195190
196-
## ***Aspire Integration***
191+
## **_Aspire Integration_**
197192
198193
SOON :rocket:
199194
200-
201195
## Support
202196
203-
Use [**api-workbench**](./api-workbench.rest) inside Visual Studio code with [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) plugin
197+
Use [**api-workbench**](./api-workbench.rest) inside Visual Studio code with [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) plugin
204198
205199
## Configuration
206200
207-
``` json
201+
```json
208202
"app": {
209203
"name": "Demo WebApi",
210204
"service": "demo-service",
@@ -432,15 +426,17 @@ Use [**api-workbench**](./api-workbench.rest) inside Visual Studio code with [RE
432426
}
433427
}
434428
```
429+
435430
---
436431

437432
## Demo Application
438-
Inside the library there is a simple demo application you can use to test the library.
433+
434+
Inside the library there is a simple demo application you can use to test the library.
439435

440436
Following are the commands to build and run the demo application.
441437

442-
``` bash
443-
# Build the solution
438+
```bash
439+
# Build the solution
444440
dotnet build
445441

446442
# Pack the projects
@@ -451,7 +447,7 @@ dotnet run --project ./src/Genocs.Core.Demo.WebApi
451447
dotnet run --project ./src/Genocs.Core.Demo.Worker
452448
```
453449

454-
``` bash
450+
```bash
455451
# To pack the project with nuspec file
456452
cd src/Genocs.Core
457453
dotnet pack -p:NuspecFile=./Genocs.Core.nuspec --no-restore -o .
@@ -463,7 +459,7 @@ dotnet nuget push *.nupkg -k $NUGET_API_KEY -s $NUGET_SOURCE
463459

464460
### How to build Docker Demo images
465461

466-
``` bash
462+
```bash
467463
# Build webapi
468464
docker build -t genocs/demo-webapi:2.0.0 -t genocs/demo-webapi:latest -f ./demo-webapi.dockerfile .
469465

@@ -478,14 +474,15 @@ docker build -t genocs/demo-worker:2.0.0 -t genocs/demo-worker:latest -f ./demo-
478474
docker push genocs/demo-worker:2.0.0
479475
docker push genocs/demo-worker:latest
480476
```
477+
481478
---
482479

483480
## **Enterprise Application**
484481

485482
### Application Components
486483

487-
488484
Inside **./src/apps** folder you can find a full-fledged application composed by:
485+
489486
- ApiGateway
490487
- Identity Service
491488
- Order Service
@@ -494,26 +491,25 @@ Inside **./src/apps** folder you can find a full-fledged application composed by
494491

495492
In that way you can test the entire flow.
496493

497-
| Component | Description | Container Port | Visibility |
498-
|-------------------|-----------------------------------|----------------|------------------------------|
499-
| ApiGateway | Handles API requests | :5500 | Public |
500-
| Identity Service | Manages user identities | :5510* | Private through API Gateway |
501-
| Product Service | Manages product information | :5520* | Private through API Gateway |
502-
| Order Service | Processes orders | :5530* | Private through API Gateway |
503-
| SignalR Service | Handles real-time communication | :5540* | Private through API Gateway |
504-
494+
| Component | Description | Container Port | Visibility |
495+
| ---------------- | ------------------------------- | -------------- | --------------------------- |
496+
| ApiGateway | Handles API requests | :5500 | Public |
497+
| Identity Service | Manages user identities | :5510\* | Private through API Gateway |
498+
| Product Service | Manages product information | :5520\* | Private through API Gateway |
499+
| Order Service | Processes orders | :5530\* | Private through API Gateway |
500+
| SignalR Service | Handles real-time communication | :5540\* | Private through API Gateway |
505501

506502
![Architecture](./assets/architecture_01.png)
507503

508504
### How to BUILD & RUN the application
509505

510-
The build and run process can be done by using docker-compose.
506+
The build and run process can be done by using docker-compose.
511507

512508
Pre-requisites:
513-
- Docker
514509

510+
- Docker
515511

516-
``` bash
512+
```bash
517513
cd ./src/apps
518514

519515
# Build with docker compose
@@ -529,10 +525,9 @@ docker compose -f ./docker-compose.yml --env-file ./local.env --project-name gen
529525
docker builder prune
530526
```
531527

532-
533528
Use following to build and push the images one by one
534529

535-
``` bash
530+
```bash
536531
# Build images
537532
./src/apps/scripts/build-images.sh
538533

@@ -544,55 +539,54 @@ Use following to build and push the images one by one
544539

545540
You can deploy the application on Kubernetes cluster.
546541

547-
``` bash
542+
```bash
548543
# Build images
549544
./src/apps/scripts/deploy-k8s.sh
550545
```
551546

552547
### How to use makefile
553548

554549
Prerequisites:
550+
555551
- make
556552

557553
To install make on MacOS you can use brew
558554

559-
``` bash
555+
```bash
560556
brew install make
561557
```
562558

563559
To install make on Ubuntu you can use apt
564560

565-
``` bash
561+
```bash
566562
sudo apt install make
567563
```
568564

569565
To install make on Windows you can use [choco](https://chocolatey.org/)
570566

571-
``` bash
567+
```bash
572568
choco install make
573569
```
574570

575571
Upon installation you can use the makefile to build, run, deploy the application.
576572

577-
``` bash
573+
```bash
578574
# Build the solution
579575
make build
580576
```
581577

582-
583578
### How to use Helm chart
584579

585580
Inside the folder **./src/apps/k8s/helm** you can find the Helm chart to deploy the application on Kubernetes.
586581

587-
``` bash
582+
```bash
588583
cd ./src/apps/k8s/helm
589584
microk8s helm install genocs ./gnxchart
590585
```
591586

592-
593587
### Deploy in a cloud instance
594588

595-
You can deploy Demo Application with one click in Heroku, Microsoft Azure, or Google Cloud Platform:
589+
You can deploy Demo Application with one click in Heroku, Microsoft Azure, or Google Cloud Platform:
596590

597591
[<img src="https://www.herokucdn.com/deploy/button.svg" height="30px">](https://heroku.com/deploy?template=https://github.com/heartexlabs/label-studio/tree/heroku-persistent-pg)
598592
[<img src="https://aka.ms/deploytoazurebutton" height="30px">](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fheartexlabs%2Flabel-studio%2Fmaster%2Fazuredeploy.json)
@@ -612,17 +606,15 @@ View Complete [Changelog](https://github.com/Genocs/microservice-template/blob/m
612606
- Facebook Page [@genocs](https://facebook.com/Genocs)
613607
- Youtube Channel [@genocs](https://youtube.com/c/genocs)
614608

615-
616609
## Support
617610

618611
Has this Project helped you learn something New? or Helped you at work?
619612
Here are a few ways by which you can support.
620613

621-
- ⭐ Leave a star!
614+
- ⭐ Leave a star!
622615
- 🥇 Recommend this project to your colleagues.
623-
- 🦸 Do consider endorsing me on LinkedIn for ASP.NET Core - [Connect via LinkedIn](https://www.linkedin.com/in/giovanni-emanuele-nocco-b31a5169/)
616+
- 🦸 Do consider endorsing me on LinkedIn for ASP.NET Core - [Connect via LinkedIn](https://www.linkedin.com/in/giovanni-emanuele-nocco-b31a5169/)
624617
- ☕ If you want to support this project in the long run, [consider buying me a coffee](https://www.buymeacoffee.com/genocs)!
625-
626618

627619
[![buy-me-a-coffee](https://raw.githubusercontent.com/Genocs/genocs-library/main/assets/buy-me-a-coffee.png "buy-me-a-coffee")](https://www.buymeacoffee.com/genocs)
628620

@@ -638,7 +630,7 @@ Become a financial contributor and help me sustain the project. [Support the Pro
638630

639631
<a href="https://opencollective.com/genocs"><img src="https://opencollective.com/genocs/individuals.svg?width=890"></a>
640632

641-
642633
## Acknowledgements
634+
643635
- [devmentors](https://github.com/devmentors)
644636
- [abp](https://github.com/abpframework)

0 commit comments

Comments
 (0)