{"id":33179002,"url":"https://github.com/HubSpot/Baragon","last_synced_at":"2025-11-20T21:03:09.627Z","repository":{"id":11641598,"uuid":"14145875","full_name":"HubSpot/Baragon","owner":"HubSpot","description":"Load balancer API","archived":false,"fork":false,"pushed_at":"2024-04-19T08:07:48.000Z","size":9439,"stargazers_count":113,"open_issues_count":5,"forks_count":36,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-10-24T05:43:48.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/HubSpot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-05T15:51:09.000Z","updated_at":"2025-10-06T01:50:37.000Z","dependencies_parsed_at":"2023-01-13T16:36:16.516Z","dependency_job_id":null,"html_url":"https://github.com/HubSpot/Baragon","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/HubSpot/Baragon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FBaragon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FBaragon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FBaragon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FBaragon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HubSpot","download_url":"https://codeload.github.com/HubSpot/Baragon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FBaragon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285511775,"owners_count":27184237,"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-11-20T02:00:05.334Z","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":[],"created_at":"2025-11-16T03:00:36.817Z","updated_at":"2025-11-20T21:03:09.622Z","avatar_url":"https://github.com/HubSpot.png","language":"Java","funding_links":[],"categories":["容错组件"],"sub_categories":[],"readme":"\u003ca id=\"top\"\u003e\u003c/a\u003e\n# Baragon [![Build Status](https://travis-ci.org/HubSpot/Baragon.svg?branch=master)](https://travis-ci.org/HubSpot/Baragon)\n\n![Behold the mighty Baragon's roar](http://i.imgur.com/mCbkbcZ.jpg)\n\nBaragon is a system for automating load balancer configuration updates. It pairs well with the [Singularity](https://github.com/HubSpot/Singularity) Mesos framework.\n\n## Contents\n\n- [Baragon Basics](#basics)\n- [Getting Started](#start)\n  - [Quick Start](#start)\n  - [Detailed Setup Guide](Docs/managing_baragon.md)\n  - [Example Baragon Service Configuration](Docs/config/baragon_service_config.md)\n  - [Example Baragon Agent Configuration](Docs/config/baragon_agent_config.md)\n- [Quick Start With Docker Compose](#docker)\n- [BaragonUI](#ui)\n- [API Docs](Docs/api.md)\n- [Developing](Docs/development.md)\n\n\u003ca id=\"basics\"\u003e\u003c/a\u003e\n## Baragon Basics\n\nBaragon is made up of two services:\n\n- BaragonService -- coordination service\n\n- BaragonAgentService -- applies changes on the actual load balancer\n\nWhen a web service changes (i.e. upstreams added / removed), POST a [BaragonRequest](Docs/api.md#requests) JSON object to BaragonService's `/[contextPath]/request` endpoint like this one:\n\n```json\n{\n  \"loadBalancerRequestId\": \"4\",\n  \"loadBalancerService\": {\n    \"serviceId\": \"1\",\n    \"owners\": [\"foo\"],\n    \"serviceBasePath\": \"/basepath\",\n    \"loadBalancerGroups\": [\"loadBalancerGroupName\"]\n  },\n  \"addUpstreams\": [\"1.1.1.1:80\"],\n  \"removeUpstreams\": []\n}\n```\n\n- `BaragonService` will fan out the update to all `BaragonAgent`s in the specified `loadBalancerGroups`\n- `BaragonAgent`s will apply the changes on the load balancer using templates provided in its configuration and report back a Success or Failure to `BaragonService`\n- Polling the `BaragonService` request status url (`/[contextPath]/request/{loadBalancerRequestId}`) will indicate the current status of the request\n\nCheck out the [API Docs](Docs/api.md) for additional `BaragonRequest` fields and returned values.\n\n\u003ca id=\"start\"\u003e\u003c/a\u003e\n## Getting Started\n\nFor more details on configuring and using Baragon, check out the [detailed setup and management guide](Docs/managing_baragon.md)\n\n** Prerequisite: A working ZooKeeper cluster **\n\n1. Build JARs via `mvn clean package`.\n\n2. Create a configuration file for Baragon Service and Baragon Agent. These are an extended version of a Dropwizard configuration file. Details on configurable fields can be found in the example configs below and in the [detailed setup and management guide](Docs/managing_baragon.md) \n  - [Example Baragon Service Configuration](Docs/config/baragon_service_config.md). This will be referenced as `$SERVICE_CONFIG_YAML`.\n  - [Example Baragon Agent Configuration](Docs/config/baragon_agent_config.md). This will be referenced as `$AGENT_CONFIG_YAML`.\n\n3. Copy `BaragonService-*-SNAPSHOT.jar` and `$SERVICE_CONFIG_YAML` onto one or more hosts, and start the service via `java -jar BaragonService-*-SNAPSHOT.jar server $SERVICE_CONFIG_YAML`.\n\n4. Copy `BaragonAgentService-*-SNAPSHOT.jar` and `$AGENT_CONFIG_YAML` onto each of your load balancer hosts. Start the BaragonAgent service via `java -jar BaragonAgentService-*-SNAPSHOT.jar server $AGENT_CONFIG_YAML`.\n\n\u003ca id=\"docker\"\u003e\u003c/a\u003e\n## Quickstart with Docker Compose\n\nTo get an example cluster up and running, you can install [docker](https://docs.docker.com/installation/) and [docker-compose](https://docs.docker.com/compose/#installation-and-set-up).\n\nSimply run `docker-compose up` to bring up:\n- zookeper container\n- Baragon Service container\n- Two Baragon Agent + Nginx containers\n\nThe Baragon UI will be available at [localhost:8080](http://localhost:8080) and nginx at [localhost:80](http://localhost:80).\n\n***If using boot2docker replace localhost with the `boot2docker ip`***\n\nNginx's config directories that BaragonAgent writes to will also be mounted as volumes in the `docker/configs` folder on your local machine.\n\n\u003ca id=\"ui\"\u003e\u003c/a\u003e\n## BaragonUI\n \nBaragon comes with a UI for visualization and easier management of load balancer paths and upstreams. By default it will be available in a read-only mode at `/[contextPath]/ui` see the [Example Baragon Service Configuration](Docs/config/baragon_service_config.md) or [detailed setup and management guide](Docs/managing_baragon.md) for more details on configuring BaragonUI behavior.\n\n## Baragon API Docs\n\nFull documentation on the Baragon Service API can be found [here](Docs/api.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHubSpot%2FBaragon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHubSpot%2FBaragon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHubSpot%2FBaragon/lists"}