{"id":18378089,"url":"https://github.com/mlabbe/buildbot-multi-project","last_synced_at":"2025-04-06T22:32:09.395Z","repository":{"id":143152006,"uuid":"114861331","full_name":"mlabbe/buildbot-multi-project","owner":"mlabbe","description":"Example configuration of Bulidbot supporting multiple projects","archived":false,"fork":false,"pushed_at":"2020-05-17T20:07:24.000Z","size":22,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T07:24:12.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlabbe.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-12-20T08:16:11.000Z","updated_at":"2025-02-18T10:14:12.000Z","dependencies_parsed_at":"2023-04-03T21:47:19.638Z","dependency_job_id":null,"html_url":"https://github.com/mlabbe/buildbot-multi-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabbe%2Fbuildbot-multi-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabbe%2Fbuildbot-multi-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabbe%2Fbuildbot-multi-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabbe%2Fbuildbot-multi-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlabbe","download_url":"https://codeload.github.com/mlabbe/buildbot-multi-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247563900,"owners_count":20958971,"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","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":"2024-11-06T00:31:09.488Z","updated_at":"2025-04-06T22:32:09.390Z","avatar_url":"https://github.com/mlabbe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Project Buildbot Configuration Example #\n\n[Buildbot](https://buildbot.net) is an excellent tool for automating\nall of your build and deploy needs across platforms for a project.\nHowever, a Buildbot instance isn't really designed for multiple,\ndisparate projects within an organization.  This configuration example\nshows how to add a new buildbot master for each project, neatly\norganizing them into containers and placing them behind reverse\nproxies on the same domain.\n\nWe use docker-compose with Nginx, PostgreSQL and Buildbot Master\ncontainers to configure multiple Buildbot masters which run\nside-by-side.\n                \n    https://example.net/buildbot/project1  # buildbot master for proj1\n    https://example.net/buildbot/project2  # buildbot master for proj2\n    \nNote that multi-project Buildbot is different than (but not\nfundamentally incompatible with) Buildbot\n[Multi-master](http://docs.buildbot.net/latest/manual/cfg-global.html#multi-master-mode)\nwhich lets a single project have more than one master for\nhigh-availability.\n\n## Features ##\n \n - All buildbot masters under one domain for easy addition of SSL\n - All state in a single PostgreSQL database volume for easy backup\n - Easy to add a new master for a new project\n - Map all buildbot master config to host for easy iteration\n - Protected by auth-digest htpasswd in Nginx out of the gate\n - Letsencrypt SSL support\n - Containerized Worker example with non-root user for added security\n - Sample Systemd startup scripts\n\n## Configuring auth ##\n\nThe file `/webproxy/conf/buildbot.htpasswd` should be set to the\nlogin/passwords you want to use.  The easiest way to do this is to run\nthe following command:\n\n    htpasswd -c buildbot.htpasswd \u003cusername\u003e\n                \n## Adding a New Master ##\n\n 1. Add the master to `docker-compose.yml`, copying the examples.\n    - Set the `BUILDBOT_WEB_URL` to the path within the domain.\n    - Set `POSTGRES_DB` to a unique db name, containing the state for this master.\n    - In order to have workers connect, map `BUILDBOT_WORKER_PORT` to\n      a unique port on the host.  ie: `\"9999:9989\"`, where 9999 is the\n      host port to listen on, and 9989 is the container's `BUILDBOT_WORKER_PORT`.\n    - Add your new master to the `links` section of `webproxy`.\n    - Leave the web port at 8080; it's just for inside the container\n      anyway, and is never made public.\n 2. In `webproxy/conf/sites-enabled`, make the following changes:\n    - Rename the example domain to your domain.\n    \n## Running Letsencrypt ##\n\nThe `ssl` subdirectory contains `init.sh` and `renew.sh` which\nrequests and renews letsencrypt certificates, placing them at\n`/etc/letsencrypt` on the host system.\n\nThis avoids the need to reconfigure nginx to handle the ACME response.\nHowever, it should not be attempted if you already have an\n`/etc/letsencrypt` directory.  If that's the case, just edit the shell\nscripts to a new path and change the Nginx keys to match.\n\nNote that the `renew.sh` has not been sufficiently tested by the\ndeveloper because he hasn't actually had to renew his certificate at\nthe time this code was published.  This message will be updated once\nthis changes.\n\n## Running on Startup ##\n\n`install.sh` is provided to enable running on startup via systemd.\nConfigure the location of `docker-compose` in `buildbot.service`.\n\n## Example Worker ##\n\nThere is a buildbot worker container in the `example-worker`\nsubdirectory which is not included in the docker-compose\nconfiguration.  This is considered an example worker which\ndemonstrates how to containerize a worker for a single project.  It is\npresumed that a serious multi-project configuration would have workers\nstrewn out over multiple computers, so it is only a standalone\nexample.\n\nContainerization is relevant to multi-project configurations because\nit allows for clean separation and upgrades of toolschains without\naffecting other projects.\n\n### Worker Features ###\n\nThe worker container provided is similar to the [official\nimage](https://hub.docker.com/r/buildbot/buildbot-worker/), but\nupdates package versions beyond the official one.\n\n`build.sh` and `run.sh` demonstrate how to build and configure\nenvironment variables to connect to a master.  Change the environment\nvariables to suit your configuration.\n\n`install.sh` installs a systemd service to start the container on\nsystem startup if that is something you would want to do.  Both it,\nand the `buildbot-example-worker.service` must be configured to your\nliking.  Consider it a template, or a starting point.\n\n## Stuff to Back Up ##\n\nOnce set up, you will need to back up the following unique assets:\n \n 1. All of your buildbot master configs, stored under `buildbot` outside of the containers.\n 2. [PostgreSQL Docker volume](https://stackoverflow.com/questions/24718706/backup-restore-a-dockerized-postgresql-database).\n 3. Letsencrypt state, stored at `ssl/mount` outside of the containers.\n 4. Your customized Nginx config, stored at `webproxy/conf` outside of the containers.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabbe%2Fbuildbot-multi-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlabbe%2Fbuildbot-multi-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabbe%2Fbuildbot-multi-project/lists"}