From 0177f2989b72bf9b3408e5d76fae4b9f6dd7d174 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Wed, 8 Jan 2025 16:56:55 -0500 Subject: [PATCH] docs: adding services continued --- docs/adding-services.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/docs/adding-services.md b/docs/adding-services.md index a3536add..27bc1a55 100644 --- a/docs/adding-services.md +++ b/docs/adding-services.md @@ -8,6 +8,8 @@ There are two types of services in Bento: ## Aspects to consider when adding any service to Bento +### Environment variables + * Service environment variables, used for configuring the image and some aspects of the service itself, should be added to `etc/bento.env`. These variables typically include: * Image @@ -17,17 +19,38 @@ There are two types of services in Bento: networks only as needed) * Debugger ports * Configuration environment variables TODO -* Docker container configuration via a Compose file in `lib//docker-compose..yaml` -* *As needed:* a gateway NGINX config in `lib/gateway/` -* TODO +### Container setup -Non-Bento services **MUST NOT** be put into `etc/bento_services.json`; this file is for Bento services only (see below). +The service's Docker container must be set up via a Compose file in `lib//docker-compose..yaml`. +This must then be included in the main `docker-compose.yaml` file, in the `include` block. + +The service's network (and potentially feature flag, if applicable), as well as container name and port environment +variables must be added to the gateway compose file (`lib/gateway/docker-compose.gateway.yaml`) if the service is to be +externally accessible. + +### Gateway configuration + +*As needed,* a gateway NGINX config must be placed into `lib/gateway/`. ### Required `bentoctl` changes TODO +* If new certificates are needed, add new entries to the `init_self_signed_certs` function (for development purposes) + in `py_bentoctl/other_helpers.py`. + +### Documentation changes + +* Make sure to add a note about how to set up the service for the first time to the + [Installation guide](./installation.md), as well as the migration guide for the version the service is introduced in. +* If additional deployment steps are needed (i.e., new certificates), add a note to the + [Deployment guide](./deployment.md). + +### Additional notes + +Non-Bento services **MUST NOT** be put into `etc/bento_services.json`; this file is for Bento services only (see below). + ## Additional considerations when adding new Bento services