{"id":21428104,"url":"https://github.com/redhat-developer-demos/brewery","last_synced_at":"2025-10-05T22:21:02.803Z","repository":{"id":91531398,"uuid":"99777329","full_name":"redhat-developer-demos/brewery","owner":"redhat-developer-demos","description":"The repository to hold the Spring Cloud Brewery application which will be deployed to OpenShift/Kubernetes","archived":false,"fork":false,"pushed_at":"2018-09-06T05:02:10.000Z","size":39074,"stargazers_count":10,"open_issues_count":2,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-14T11:50:43.794Z","etag":null,"topics":["demos","kubernetes","microservices","openshift","spring"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-developer-demos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-09T07:17:39.000Z","updated_at":"2023-08-04T07:20:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"73deffa4-c6d2-4f77-8d78-18390e42efa9","html_url":"https://github.com/redhat-developer-demos/brewery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/redhat-developer-demos/brewery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fbrewery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fbrewery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fbrewery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fbrewery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-developer-demos","download_url":"https://codeload.github.com/redhat-developer-demos/brewery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer-demos%2Fbrewery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278529111,"owners_count":26001873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demos","kubernetes","microservices","openshift","spring"],"created_at":"2024-11-22T22:10:39.266Z","updated_at":"2025-10-05T22:21:02.769Z","avatar_url":"https://github.com/redhat-developer-demos.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Brewery\n\nEver wanted to brew your beer using microservices? This repository will allow you to do so!\n\nThis repository is used throughout the Spring Cloud libraries builds as end to end testing set up. Check\n[Acceptance Tests Readme](acceptance-tests/README.md) for more information.\n\n## How to build and deploy it \n\nhttps://redhat-developer-demos.github.io/brewery/ \n\n\n## Brewery Components\n\nHere is the business flow of the app. Below you'll see more detailed explanation with numbers corresponding\nto the numbers in the diagram\n\nNOTE: This section will be updated and subject to changes\n\n![Diagram](img/Brewery.png)\n\nAnd here additional tech related applications:\n\n![Diagram](img/Tech_apps.png)\n\nAnd here how the flow of apps look like (screenshot taken from Zipkin)\n\n![Diagram](img/Dependency_graph.png)\n\n### Presenting service (point of entry to the system)\n\nHere is the UI\n\n![UI](img/Brewery_UI.png)\n\n- Go to the presenting service (http://presenting-myproject.$(minishift ip).nip.io) and order ingredients **(1)**\n- A request from the presenting service is sent to the aggregating service when order is placed **(2)**\n- A \"PROCESS-ID\" header is set and will be passed through each part of beer brewing\n\n### Brewing service\n\nBrewing service contains the following functionalities:\n\n#### Aggregating\n\n- Service contains a warehouse (\"database\") where is stores the ingredients\n- Basing on the order placed it will contact the Zuul proxy to fetch ingredients **(3)**\n- Once the ingredients have been received an event is emitted **(7)**\n- You have to have all 4 ingredients reach their threshold (1000) to start maturing the beer \n- Once the brewing has been started an event is emitted **(7)**\n- Once the threshold is met the application sends a request to the maturing service **(8)**\n- Each time a request is sent to the aggregating service it returns as a response its warehouse state\n\n#### Maturing\n\n- It receives a request with ingredients needed to brew a beer\n- The brewing process starts thanks to the `Thread.sleep` method\n- Once it's done an event is emitted **(9)** \n- And a request to the bottling service is sent with number of worts **(10)**\n- Presenting service is called to update the current status of the beer brewing process\n\n#### Bottling\n\n- Waits some time to bottle the beer\n- Once it's done an event is emitted **(11)** \n- Presenting service is called to update the current status of the beer brewing process **(12)**\n\n### Ingredients Service\n\n- Returns a fixed value of ingredients **(5)**\n\n### Reporting Service\n\n- Listens to events and stores them in the \"database\"\n\n### Zuul proxy\n\n- Proxy over the \"adapters\" to external world to fetch ingredients\n- Routes all requests to the respective \"ingredient adapter\" **(4)**\n- For simplicity we have one ingredient adapter called \"ingredients\" that returns a stubbed quantity\n- Returns back the ingredients to the aggregating **(6)**\n\n## Project structure\n\n```\n├── acceptance-tests (code containing acceptace-tests of brewery)\n├── brewing          (service that creates beer - consists of aggregating, maturing, bottling functionalities)\n├── common           (common code for the services)\n├── docker           (docker scripts for additional apps - e.g. graphite)\n├── config-server    (set up for the config server)\n├── eureka           (Eureka server needed for Eureka tests)\n├── git-props        (properties for config-server to pick)\n├── gradle           (gradle related stuff)\n├── img              (the fabulous diagram of the brewery)\n├── ingredients      (service returns ingredients)\n├── presenting       (UI of the brewery)\n├── reporting        (service that listens to events)\n├── zipkin-server    (Zipkin Server for Sleuth Stream tests)\n├── zookeeper        (embedded zookeeper)\n└── zuul             (Zuul proxy that forwards requests to ingredients)\n```\n\n## Authors\n\nThe code is ported from https://github.com/spring-cloud-samples/brewery and adapted for Kubernetes/OpenShift\n\nThe authors of the initial version of the code are:\n- Marcin Grzejszczak (marcingrzejszczak)\n- Tomasz Szymanski (szimano)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer-demos%2Fbrewery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-developer-demos%2Fbrewery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer-demos%2Fbrewery/lists"}