Giter Site home page Giter Site logo

devmentors / pacco Goto Github PK

View Code? Open in Web Editor NEW
800.0 58.0 204.0 1.86 MB

Sample microservices solution in .NET Core 3.1 based on the cloud-agnostic approach

Home Page: https://devmentors.io/courses/microservices-net

License: MIT License

Shell 74.76% Dockerfile 7.08% PowerShell 18.16%
microservices microservice microservices-architecture

pacco's Introduction

Pacco

What is Pacco?

Pacco is an open source project using microservices architecture written in .NET Core 3.1. The domain tackles an exclusive parcels delivery which revolves around the general concept of limited resources availability. Pacco does use an event-driven approach in order to asynchronously integrate between the microservices.

Pacco overview

Find out more about distributed systems patterns and practices in Microservices .NET online course and check out our article about starting Pacco microservices and infrastructure. The solution is maintained by devmentors.io.

Microservices .NET


The overall solution makes use of the cloud agnostic tools and most of them can be found under cncf.io. To easily plug into the complex infrastructure, Convey is being used.

Infrastructure


Depending on the particular microservice complexity, either the clean architecture + DDD approach (as presented below) is used or another style that is the best fit.

Clean architecture

Which repositories should I clone?

Please clone the following repositories and put them into the same working directory:

The above repositories can be also cloned via git-clone.sh script and updated via git-pull.sh script. Simply, copy the scripts to the directory next to the Pacco on your local drive, and execute them using shell. Inside Pacco, you will also find Pacco.sln that aggregates all the microservices under a single solution, in order to make it easier to work with during the local development.

How to start the solution?

Open Pacco/compose directory and execute:

docker-compose -f infrastructure.yml up -d

It will start the required infrastructure in the background. Then, you can start the services independently of each other via dotnet run or ./scripts/start.sh command in each microservice repository or run them all at once using Docker:

docker-compose -f services-local.yml up

What HTTP requests can be sent to the API?

You can find the list of all HTTP requests in Pacco-sample-scenario.rest file placed in the root folder of Pacco.APIGateway repository. This file is compatible with REST Client plugin for Visual Studio Code.

pacco's People

Contributors

goorion avatar rpajak-solarwinds avatar spetz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pacco's Issues

Project Structure Help

Hi guys not sure this is the best place for this but how do you get the project structure for your microsercices inside a .sln using the folder name/src/ (other dlls)

Unable to start the APIs in containers using services-local.yml

I successfully start the infrastructure related containers using the command docker-compose -f .\infrastructure.yml up -d. However, I am unable to start the APIs using the docker-compose -f services-local.yml up. I'm getting the flowing error:

WARNING: Found orphan containers (prometheus, consul, rabbitmq, redis, fabio, jaeger, grafana, seq, mongo, vault) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Building api-gateway
Traceback (most recent call last):
  File "docker-compose", line 6, in <module>
  File "compose\cli\main.py", line 72, in main
  File "compose\cli\main.py", line 128, in perform_command
  File "compose\cli\main.py", line 1077, in up
  File "compose\cli\main.py", line 1073, in up
  File "compose\project.py", line 548, in up
  File "compose\service.py", line 367, in ensure_image_exists
  File "compose\service.py", line 1106, in build
  File "site-packages\docker\api\build.py", line 261, in build
  File "site-packages\docker\api\build.py", line 308, in _set_auth_headers
  File "site-packages\docker\auth.py", line 311, in get_all_credentials
  File "site-packages\docker\auth.py", line 262, in _resolve_authconfig_credstore
  File "site-packages\docker\auth.py", line 287, in _get_store_instance
  File "site-packages\docker\credentials\store.py", line 25, in __init__
docker.credentials.errors.InitializationError: docker-credential-gcloud not installed or not available in PATH
[11788] Failed to execute script docker-compose

Thanks.

Error executing docker

I had an error trying to execute the command "docker-compose -f infrastructure.yml up -d"
The console shows:

Creating network "pacco-network" with the default driver
Creating volume "compose_mongo" with local driver
Creating volume "compose_redis" with local driver
Pulling consul (consul:)...
latest: Pulling from library/consul
ERROR: no matching manifest for unknown in the manifest list entries

Prometheus shows all APIs as DOWN when starting the APIs from the IDE while running the infrastructure in containers

I successfully start the infrastructure related containers using the command docker-compose -f .\infrastructure.yml up -d. I then configure Visual Studio to start all APIs using the "Multiple startup projects" option . However, when I navigate to Prometheus http://localhost:9090/targets I see that all APIs have status DOWN:

image

Is this due to the fact that the APIs are running outside the docker context? If so, is there a way to run infrastructure in container while the APIs are started from the IDE?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.