From 0689e2af1bf1d44384886af42e15c6af621c43c0 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:14:24 +0200 Subject: [PATCH 01/38] Added new page for GitHub setup instructions --- docs/configuration-options.md | 4 ++ docs/setup-for-github.md | 101 ++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 docs/setup-for-github.md diff --git a/docs/configuration-options.md b/docs/configuration-options.md index d90f929d..4c04b333 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -39,6 +39,10 @@ Note: By default Renovate server will attempt to call this endpoint once during **`MEND_RNV_GITLAB_PAT`**: [GitLab only] Personal Access Token for the GitLab bot account. +**`MEND_RNV_BITBUCKET_USER`**: [Bitbucket only] Renovate Bot user account (“Bitbucket User” access only) + +**`MEND_RNV_BITBUCKET_PAT`**: [Bitbucket only] BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` + **`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` ### Optional Mend Renovate configuration diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md new file mode 100644 index 00000000..1c3a11e3 --- /dev/null +++ b/docs/setup-for-github.md @@ -0,0 +1,101 @@ +# Configuration - Mend Renovate Community Edition for GitHub + +## Create and Configure the GitHub App (bot) + +Before running Mend Renovate, you need to provision it as an App on GitHub, and retrieve the ID + private key provided. + +If you're running a self-hosted instance of GitHub Enterprise, it is suggested to name the app "Renovate" so that it shows up as easily recognizable as "renovate[bot]" in Pull Requests. +If you're running against `github.com` then the name Renovate is already taken by the hosted Mend Renovate app, so you will need something else like "YourCompany Renovate". + +The App requires the following permissions: + +- Repository permissions + - Administration: Read-only + - Checks: Read & write + - Commit statuses: Read & write + - Contents: Read & write + - Dependabot alerts: Read-only (optional) + - Issues: Read & write + - Metadata: Read-only + - Pull Requests: Read & write + - Workflows: Read & write +- Organization permissions + - Members: Read-only + +The App should also subscribe to the following webhook events: + +- Security Advisory +- Check run +- Check suite +- Issues +- Pull request +- Push +- Repository +- Status + +Description, Homepage, User authorization callback URL, and Setup URL are all unimportant so you may set them to whatever you like. + +The Mend Renovate webhook listener binds to port 8080 by default, however it will bind to `process.env.PORT` instead if that is defined. +Note: The Mend Renovate image takes care of exposing port 8080 of the container, so if you change this port then you will need to take care of any exposing/mapping of ports yourself. +In the [Docker Compose example config](https://github.com/mend/renovate-cc-ee/tree/main/examples/), the default port 8080 is used and then mapped to port 80 on the host. + +For the Webhook URL field, point it to `/webhook` on port 80 (or whatever port you mapped to) of the server that you will run Mend Renovate on, e.g. http://1.2.3.4/webhook +Be sure to enter a webhook secret too. +If you don't care about the value, then enter 'renovate' as that is the default secret that the webhook handler process uses. + +You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. + +## Run Mend Renovate + +You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. + +**Example Docker Compose files:** + +- [Mend Renovate Community Edition (GitHub)](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition (GitHub)](../examples/docker-compose/renovate-ee.yml) + +> [!NOTE] +> +> Some configuration of environment variables will be required inside the Docker Compose files. +> +> Essential configuration options are shown below. For a full list of configurable variables, see [Configuration Options](configuration-options.md). + +## Configure Environment Variables + +### Essential Configuration for Mend Renovate + +**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). + +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at [https://www.mend.io/renovate-community/]. For an Enterprise License key, contact Mend at [http://mend.io]. + +**`MEND_RNV_PLATFORM`**: Set this to `github`. + +**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. + +**`MEND_RNV_GITHUB_APP_KEY`**: The private key of the Renovate app on GitHub. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. + +**`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + +**`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. + +**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. + +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to `renovate`. + +**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. + +**`GITHUB_COM_TOKEN`**: [GitHub Enterprise Server only] A Personal Access Token for a user account on github.com (note: _not_ an account on your GitHub Enterprise instance). + +**Additional Configuration options** + +For further details and a list of all available options, see the [Configuration Options](configuration-options.md) page. + +### Renovate CLI Configuration + +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` mounted inside the Mend Renovate container to `/usr/src/app/config.js`. + +**npm Registry** + +If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. From b03ce708cd315f315e04244ce3005f637a306a42 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:23:30 +0200 Subject: [PATCH 02/38] Updates to the Config Options page --- docs/configuration-options.md | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 4c04b333..a932d70e 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -11,7 +11,7 @@ Separately, you can provide configuration for the Renovate Core. See the end of The following environment variables apply to **Mend Renovate Community Edition** and the **Mend Renovate Enterprise Edition Server**. Environment variables for the **Mend Renovate Enterprise Worker** are in the next section. -### Mend licensing config +### Mend Licensing Config **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). @@ -19,38 +19,44 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. -### Source code management (SCM) connection details +### Connection to the Source Code Management (SCM) This section contains configuration variables for connecting to your source code repository. Use the appropriate settings to define connection details to your specific SCM. **`MEND_RNV_PLATFORM`**: The type of SCM. Options: `github`, `gitlab`, `bitbucket-server`. -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your SCM. Required for self-hosted SCMs; not for GitHub.com. Include the trailing slash. +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your SCM. Not required for GitHub.com. Include the trailing slash. -**`MEND_RNV_GITHUB_APP_ID`**: [GitHub only] The GitHub App ID of the provisioned Renovate app on GitHub. +**GitHub connection variables** -**`MEND_RNV_GITHUB_APP_KEY`**: [GitHub only] A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. +**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. -**`RNV_GITHUB_PEM_FILE_PATH`**: [GitHub only] The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. +**`MEND_RNV_GITHUB_APP_KEY`**: A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. -**`MEND_RNV_GITHUB_BOT_USER_ID`**: [GitHub only] Optional: The bot user ID that will be used in `gitAuthor` (example author `myBotName[bot] <123456+myBotName[bot]@users.noreply.github.com` and the user id is `123456`). The value can be found by calling `https://api.github.com/users/{appName}[bot]` under the `id` key (replace the `{appName}` with the actual app name). +**`RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. + +**`MEND_RNV_GITHUB_BOT_USER_ID`**: Optional: The bot user ID that will be used in `gitAuthor` (example author `myBotName[bot] <123456+myBotName[bot]@users.noreply.github.com` and the user id is `123456`). The value can be found by calling `https://api.github.com/users/{appName}[bot]` under the `id` key (replace the `{appName}` with the actual app name). Note: By default Renovate server will attempt to call this endpoint once during startup (both CE and EE server) and it does not require authentication. If you wish to skip this call for any reason you will need to provide the value in `MEND_RNV_GITHUB_BOT_USER_ID=` -**`MEND_RNV_GITLAB_PAT`**: [GitLab only] Personal Access Token for the GitLab bot account. +**GitLab connection variables** -**`MEND_RNV_BITBUCKET_USER`**: [Bitbucket only] Renovate Bot user account (“Bitbucket User” access only) +**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. -**`MEND_RNV_BITBUCKET_PAT`**: [Bitbucket only] BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` +**Bitbucket connection variables** -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` +**`MEND_RNV_BITBUCKET_USER`**: Renovate Bot user account (“Bitbucket User” access only) + +**`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` -### Optional Mend Renovate configuration +### Server Config Options **`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Not required if SCM is GitHub.com. +**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` + **`MEND_RNV_SERVER_API_SECRET`**: [Required if APIs enabled. Required on Renovate Enterprise Server] Set an API secret. Must match the Worker instances and Admin APIs for communicating with the Server. **`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. From 749e80ccdb1ed90904b901edff12f7b5a3237bf1 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:29:12 +0200 Subject: [PATCH 03/38] Updates to the GitHub setup page --- docs/setup-for-github.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 1c3a11e3..82b2bcf0 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -66,7 +66,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at [https://www.mend.io/renovate-community/]. For an Enterprise License key, contact Mend at [http://mend.io]. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. @@ -74,7 +74,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_GITHUB_APP_KEY`**: The private key of the Renovate app on GitHub. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. -**`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. +**`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for a GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_APP_KEY`. **`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. @@ -82,7 +82,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. -**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to `renovate`. +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. **`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. @@ -94,7 +94,7 @@ For further details and a list of all available options, see the [Configuration ### Renovate CLI Configuration -Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` mounted inside the Mend Renovate container to `/usr/src/app/config.js`. +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file mounted to `/usr/src/app/config.js` inside the Mend Renovate container. **npm Registry** From 28897cede1637c4e0e338de55fff5f78ba1a7e11 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:30:55 +0200 Subject: [PATCH 04/38] Updates to the GitHub setup page --- docs/setup-for-github.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 82b2bcf0..400f2ebf 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -76,6 +76,8 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for a GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_APP_KEY`. +**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. + **`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. **`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. @@ -84,8 +86,6 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. -**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. - **`GITHUB_COM_TOKEN`**: [GitHub Enterprise Server only] A Personal Access Token for a user account on github.com (note: _not_ an account on your GitHub Enterprise instance). **Additional Configuration options** From 86a58df1d19c6b9314bdbbe53a6babc24cfda85c Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:02:12 +0200 Subject: [PATCH 05/38] Added setup doc for GitLab --- docs/setup-for-github.md | 20 ++++---- docs/setup-for-gitlab.md | 103 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 10 deletions(-) create mode 100644 docs/setup-for-gitlab.md diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 400f2ebf..bd23e61e 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -1,4 +1,4 @@ -# Configuration - Mend Renovate Community Edition for GitHub +# Set up Mend Renovate Self-hosted for GitHub ## Create and Configure the GitHub App (bot) @@ -45,14 +45,14 @@ If you don't care about the value, then enter 'renovate' as that is the default You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. -## Run Mend Renovate +## Run Mend Renovate Self-hosted -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** -- [Mend Renovate Community Edition (GitHub)](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition (GitHub)](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) > [!NOTE] > @@ -62,7 +62,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke ## Configure Environment Variables -### Essential Configuration for Mend Renovate +### Essential Configuration for Mend Renovate Server **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). @@ -70,16 +70,16 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_PLATFORM`**: Set this to `github`. +**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + **`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. **`MEND_RNV_GITHUB_APP_KEY`**: The private key of the Renovate app on GitHub. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. **`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for a GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_APP_KEY`. -**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - **`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md new file mode 100644 index 00000000..f7d1c442 --- /dev/null +++ b/docs/setup-for-gitlab.md @@ -0,0 +1,103 @@ +# Set up Mend Renovate Self-hosted for GitLab + +## Configure Renovate Bot Account on GitLab + +### Renovate Bot Account + +Create a GitLab user account to act as the "Renovate Bot". +If you are running your own instance of GitLab, it's suggested to name the account "Renovate Bot" with username "renovate-bot". + +Note: In GitLab, the "Renovate Bot" is not an App or Plugin; it's a GitLab user account that's been given the right permissions and System Hooks. +You should use a dedicated "bot account" for Renovate, instead of using someone's personal user account. +Apart from reducing the chance of conflicts, it is better for teams if the actions they see from Renovate are clearly marked as coming from a dedicated bot account and not from a teammate's account, which could be confusing at times. +e.g. Did the bot automerge that PR, or did a human do it? + +### Personal Access Token + +Once the account is created, create a Personal Access Token for it with the following permissions: + * `api` + * `read_user` + * `write_repository` + +### System Hook + +To activate Mend Renovate's webhook ability, create a System Hook that points to the Renovate installation. + +Create a System Hook (in Admin area) + +1. Set the webhook URL to point to the Renovate server url followed by `/webhook`. (e.g. `http://renovate.yourcompany.com:8080/webhook` or `https://1.2.3.4/webhook`) +2. Set the webhook secret to the same value configured for `MEND_RNV_WEBHOOK_SECRET` (defaults to `renovate`) +3. Set Hook triggers for: + * `Push events` + * `Merge request events` + +Remember: Renovate's webhook listener binds to port 8080 inside its container, but you can map it (using Docker) to whatever external port you require, including port 80. + +Set the "Secret Token" to the same value configured for `MEND_RNV_WEBHOOK_SECRET`, or set it to `"renovate"` if you left it as default. + +Once your System Hook is added, Renovate's webhook handler will receive events from _all_ repositories. +Therefore, Renovate maintains a list of all repositories it has access to and discards events from all others. + +### Repo Webhooks + +Because Issue events aren't included in System hooks, a webhook must be individually configured for each repository in which you want the Dependency Dashboard issue to be interactive. + +In the Repository settings, create a Webhook with the following settings: +1. Set the webhook URL - same as System Hook URL +2. Set the webhook secret - same as System Hook secret +3. Set Hook triggers for: + * `Issue events` + +This will need to be repeated for every repository that is onboarded to the Renovate Bot account. +It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. + +## Run Mend Renovate Self-hosted + +You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. + +**Example Docker Compose files:** + +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) + +> [!NOTE] +> +> Some configuration of environment variables will be required inside the Docker Compose files. +> +> Essential configuration options are shown below. For a full list of configurable variables, see [Configuration Options](configuration-options.md). + +## Configure Environment Variables + +### Essential Configuration for Mend Renovate Sever + +**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). + +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. + +**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. + +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitLab host. e.g. like `https://gitlab.company.com/api/v4/`. Include the trailing slash. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + +**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. + +**`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. + +**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. + +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. + +**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com + +**Additional Configuration options** + +For further details and a list of all available options, see the [Configuration Options](configuration-options.md) page. + +### Renovate CLI Configuration + +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file mounted to `/usr/src/app/config.js` inside the Mend Renovate container. + +**npm Registry** + +If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. From 396f1bde4839253182d96ae6a7f7725ed3873f5c Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:03:56 +0200 Subject: [PATCH 06/38] Update to GitLab setup doc --- docs/setup-for-gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index f7d1c442..b54d5721 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -86,7 +86,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. -**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitLab webhooks. Defaults to 'renovate'. **`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com From ff539f2c3b21f18bd9feaef92dcac5c3626cf670 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:12:37 +0200 Subject: [PATCH 07/38] Added setup doc for Bitbucket --- docs/setup-for-bitbucket.md | 354 ++++++++++++++++++++++++++++++++++++ 1 file changed, 354 insertions(+) create mode 100644 docs/setup-for-bitbucket.md diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md new file mode 100644 index 00000000..e017360b --- /dev/null +++ b/docs/setup-for-bitbucket.md @@ -0,0 +1,354 @@ +# Set up Mend Renovate Self-hosted for Bitbucket + +## Configure Renovate Bot Account on Bitbucket + +### 1.a. Configure Renovate Bot User Account + +The following configuration instructions are to be performed on Bitbucket Server by a user account with “Admin” or “System admin” global permissions on the Bitbucket Server. + +- Log in to Bitbucket Server with admin user (eg. http://localhost:7990)
+Note: Bitbucket Admin user permissions - Must be at least “Admin” to create a new user account.
+Also, only repo admins can add the Renovate Bot user and webhooks. + +- Navigate to the User settings page in Administration (Settings → Accounts/Users)
+eg. http://localhost:7990/admin/users + +![bb-admin-users.png](images%2Fbb-admin-users.png) + +- Click “Create user” to create an account for the Renovate Bot user. (eg. http://localhost:7990/admin/users?create) + +We recommend calling the account “Renovate Bot”. +- Username: “renovate-bot” +- Full name: “Renovate Bot” + +![bb-create-user.png](images%2Fbb-create-user.png) + +- Note: The Renovate Bot user will be the author of Renovate pull requests. + +![bb-renovate-bot.png](images%2Fbb-renovate-bot.png) + +- Give the Renovate Bot user basic Bitbucket user access (only required so a HTTP Token can be created through the UI) + - Under Global permissions, in the User Access section, click into the table header bar (where it says “Add Users”) and search for the Renovate Bot user. + - Leave the access level at “Bitbucket User”. + - Press “Add” + +![bb-user-access-1.png](images%2Fbb-user-access-1.png) + +- The end results should be a Renovate Bot user with “Bitbucket User” access only. + +![bb-user-access-2.png](images%2Fbb-user-access-2.png) + +
+Note: It is essential that the Renovate Bot user does NOT have Admin or System admin access. Because Bitbucket Admin and System admin users have full access to all projects and repos, there will be no way to control which repos Renovate will run against, and so Renovate will run against all repos. When the Renovate Bot user has only basic user access, administrators can control which repos run with Renovate by adding the Renovate Bot user to specific repos. +
+ +# Stage 1b: Fetch HTTP Access Token for the Renovate Bot user + +Once the Renovate Bot user account is created, log in to Bitbucket with the Renovate User account to fetch an HTTP access token for it. This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. +It will be used by Renovate OSS CLI to connect to repos on Bitbucket that the Renovate User has access to. + +- Log in to Bitbucket as the Renovate User
+http://localhost:7990/login + +**_Don’t use the Admin user account!_** +- If logged in as an Admin user account, log out of Bitbucket first. +- Alternatively, open a new web browser in incognito mode. _(Ctrl+Shift+N from a web browser)_ + +![bb-log-in.png](images%2Fbb-log-in.png) + +- Go to the Account management page (eg. http://localhost:7990/account) + +You can expand the menu on the user profile icon (top right of page) and click “Manage account”. + +![bb-manage-account.png](images%2Fbb-manage-account.png) + +- Navigate to the HTTP access tokens page + +- Press “Create token” to create a new HTTP access token + +![bb-access-token.png](images%2Fbb-access-token.png) + +- Create an HTTP access token (with `Repository Write` permission) + - Token name: Can be anything (eg. “Renovate User PAT”) + - Permissions: + - Project permissions: `Project read` + - Repository permissions: `Repository write` + +![bb-new-token.png](images%2Fbb-new-token.png) + +- Copy the token and store it for later use.
+This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. + +
+ +# Stage 2: Install Renovate CE/EE Application Server + +## Configure the Docker files / Helm charts +Fetch the example docker-compose file or Helm chart configuration files and edit accordingly. +Example files available here: +- Docker files (Renovate CE / Renovate EE) +- Helm charts (Renovate CE / Renovate EE) + +Edit the docker files / helm chart values to provide the required environment variables. +Refer to [Available Configurations section](#available_config) for a full list of Renovate CE/EE server variables. + +#### Bitbucket Server Connection details + +# Install Renovate Bot and Webhooks on BitBucket project or repository + +## Stage 3a: Install Renovate Bot on Repositories(/Projects) + +### Overview +Add the Renovate Bot user to any repo (or project) you want Renovate to run on. +Needs “Repository Write” permission so that it can create pull requests on the repo. + +### How it works +Renovate will run scans and create PRs on repositories in which the Renovate Bot user has Write access. +So, to install Renovate on a repository, add the Renovate Bot user to the Repository permissions for the repositories or projects you want it installed on. + +### Permissions required to install the Renovate Bot user +This must be done by a user with Repository Admin permission to the specific repository being added. +Note: Any Bitbucket user with global permissions of Admin or System admin has full access to every project and repository. + +### Note: +- Adding the Renovate Bot user to a **project** will install Renovate on **all repositories** in the project (current and future). +- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on the Bitbucket server. + +### How to add Renovate Bot to a Repository + +- Navigate to the Repository Settings page for a specific repository.
+Repo → Repository Settings → Repository permissions + +Repo settings page: http://localhost:7990/projects/PROJ1/repos/repo-1/permissions +![bb-repo-permissions.png](images%2Fbb-repo-permissions.png) + +- Click the “Add user or group” button (Top right corner) + +- Add the Renovate Bot user with permission: Repository Write
+ Note: The Renovate Bot user needs write permission so it can create pull requests on the repository. + +![bb-add-user.png](images%2Fbb-add-user.png) + +Now the Renovate Bot is installed on the repo. + +The Renovate server will detect the new repo on the next App Sync. + +### Run App Sync to detect new repositories + +**App Sync on schedule** + +App Sync runs on a schedule, which defaults to every 4 hours. +To update the schedule, set the EnvVar MEND_RNV_CRON_APP_SYNC on the Renovate Server. +Accepts a 5-part cron schedule. Defaults to `0 */4* * * *` (every 4 hours, on the hour). + +**Force App Sync via API call** + +To trigger the sync immediately, call the sync API (/api/sync) using a tool like Postman. +Requires + +Note: To run APIs, ensure Renovate Server has EnvVar `MEND_RNV_ADMIN_API_ENABLED=true` + +``` +[POST] http:///api/sync +Authorization: +``` + +![bb-postman-sync.png](images%2Fbb-postman-sync.png) + +
+ +## Stage 3b: Add Webhooks to Repositories(/Projects) + +Webhooks enable a message to be sent from the Bitbucket repository to the Renovate server to trigger a Renovate job on a repository when important files have changed (ie. package files, Renovate config files). + +Webhooks can be enabled at the project level or at the repository level. + +Note: Only a Bitbucket user with Admin or System Admin global permissions can create web hooks on a project or repository. +Create webhooks via the Bitbucket UI + +**To create a webhook on a repository:** + +- Navigate to the repository in which you want to add a webhook + +- Go to the Repository settings and the Webhooks settings page (under Workflow menu)
+ [Repo → Repository Settings → Webhooks]
+ http://localhost:7990/projects/PROJ1/repos/repo-1/settings + +![bb-repo-webhooks.png](images%2Fbb-repo-webhooks.png) + +- Click “Create webhook” to open the Create webhook page + +![bb-create-webhook-1.png](images%2Fbb-create-webhook-1.png) + +**Provide the following values for the webhook:** +- Name: Can be anything. Duplicates are allowed. +- URL: The URL of the Renovate Server plus “/webhook”. Must be accessible to receive incoming calls from the Bitbucker server. +- Status: Active (true) +- Secret: Must match the value in `MEND_RNV_WEBHOOK_SECRET`. (Defaults to ‘renovate’) +- Authentication: None +- SSL/TLS: (Do not skip certificate verification) +- Events: + - Project: Modified (Only available when creating Project webhooks) + - Repository: Push, Modified + - Pull request: Modified + +![bb-create-webhook-2.png](images%2Fbb-create-webhook-2.png) + +- Click “Save” to finish creating the webhook + +Webhooks will now be triggered when relevant events occur on the repository. +Renovate jobs will automatically run on the triggering repository as required. + +### Create webhooks via the Bitbucket API + +Run Bitbucket API to create webhooks on repositories and projects. + +**Permissions** + +Only Bitbucket users with Admin or System admin global permissions can create webhooks on projects or repositories. +To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access token as a Bearer Authorization token in the API header. + +#### Fetch the Authorization Bearer token + +- Log in to Bitbucket as a user with Admin or System admin global permissions +- Navigate to the HTTP access tokens page
+ http://localhost:7990/plugins/servlet/access-tokens/users/admin/manage + +![bb-admin-token.png](images%2Fbb-admin-token.png) + +- Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. + +Note: +- To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
+- To create **repository** webhooks, the HTTP access token must have `Repository Admin` permissions. (Project Admin not required.) + +![bb-create-admin-token.png](images%2Fbb-create-admin-token.png) + +- Click “Create” to finish creating the access token +- Copy the access token when it is presented. Store it for use when calling Bitbucket Admin APIs. + +### Create Repository webhooks via Bitbucket API + +``` +[POST] - http:///rest/api/latest/projects//repos//webhooks + +Authorization: Bearer +``` + +Body: (raw - JSON) +```json +{ + "name": "renovate", + "url": "https:///webhook", + "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET + "events": [ + "repo:refs_changed", + "repo:modified", + "pr:modified" + ], + "active": true, + "statistics": {}, + "scopeType": "repository", + "sslVerificationRequired": false +} +``` + +### Create Project webhooks via Bitbucket API + +``` +POST http:///rest/api/latest/projects//webhooks + +Authorization: Bearer +``` + +Body: (raw - JSON) +```json +{ + "name": "renovate", + "url": "https:///webhook", + "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET + "events": [ + "pr:modified", ← Optional: Add this if you want ALL repos on the project to trigger + "repo:refs_changed", ← Optional: Add this if you want ALL repos on the project to trigger + "repo:modified", ← Optional: Add this if you want ALL repos on the project to trigger + "project:modified" + ], + "active": true, + "statistics": {}, + "scopeType": "repository", + "sslVerificationRequired": false +} +``` + +**Provide the following values:** +- name: Can be anything. Duplicate names are allowed. +- url: The URL and port of the Renovate Server. + - Note: Ensure ports are open to receiving incoming calls from the Bitbucket server. +- secret: The Webhook secret defined in the MEND_RNV_WEBHOOK_SECRET environment variable on the Renovate Server. + +### Allow Renovate CE/EE to create Repository webhooks via Bitbucket API + +By setting the values of the two environment variables `MEND_RNV_WEBHOOK_URL` and `MEND_RNV_ADMIN_TOKEN` +the server will manage the repositories webhooks automatically + + +Notes: `MEND_RNV_ADMIN_TOKEN` +1. Recommended to use a different token than the token for Renovate bot user +2. This admin token is only used for searching/adding and removing of webhooks on repository level + +## Run Mend Renovate Self-hosted + +You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. + +**Example Docker Compose files:** + +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) + +> [!NOTE] +> +> Some configuration of environment variables will be required inside the Docker Compose files. +> +> Essential configuration options are shown below. For a full list of configurable variables, see [Configuration Options](configuration-options.md). + +## Configure Environment Variables + +### Essential Configuration for Mend Renovate Sever + +**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). + +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. + +**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. + +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Server installation. Include the trailing slash. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + +**`MEND_RNV_BITBUCKET_USER`**: Renovate Bot user account (“Bitbucket User” access only) + +**`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` + +**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus `/webhook`. Must be accessible to receive incoming calls from the BitBucket server. + +**`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. required if `MEND_RNV_WEBHOOK_URL` is set. + +**`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. + +**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. + +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitLab webhooks. Defaults to 'renovate'. + +**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com + +**Additional Configuration options** + +For further details and a list of all available options, see the [Configuration Options](configuration-options.md) page. + +### Renovate CLI Configuration + +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file mounted to `/usr/src/app/config.js` inside the Mend Renovate container. + +**npm Registry** + +If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. From 873b1dfd5ec389016efdca123f24ff4b5d55b0fa Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:16:00 +0200 Subject: [PATCH 08/38] Updates to Bitbucket setup doc --- docs/setup-for-bitbucket.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index e017360b..fabd630b 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -319,7 +319,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. -**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. +**`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. **`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Server installation. Include the trailing slash. @@ -329,15 +329,15 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` -**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus `/webhook`. Must be accessible to receive incoming calls from the BitBucket server. +**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus '/webhook'. Must be accessible to receive incoming calls from the BitBucket server. -**`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. required if `MEND_RNV_WEBHOOK_URL` is set. +**`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. Required if `MEND_RNV_WEBHOOK_URL` is set. **`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. -**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitLab webhooks. Defaults to 'renovate'. +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the Bitbucket webhooks. Defaults to 'renovate'. **`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com From 7d59a24d0f44348d850b2f3459ebaf467a4ea5e8 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:22:17 +0200 Subject: [PATCH 09/38] Update product name to "Mend Renovate Self-hosted" --- docs/README.md | 6 +++--- docs/configuration-options.md | 2 +- docs/overview.md | 30 +++++++++++++++--------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/README.md b/docs/README.md index f947d100..df4a1406 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,8 +1,8 @@ -# Mend Renovate Community Edition and Enterprise Edition Documentation +# Mend Renovate Self-hosted Documentation -This repository provides documentation specific to Mend Renovate Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). +This repository provides documentation specific to Mend Renovate Self-hosted - Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). -Mend Renovate CE was formerly known as "Mend Renovate On-Premises". +Mend Renovate Community Edition was formerly known as "Mend Renovate On-Premises". ## Supported platforms diff --git a/docs/configuration-options.md b/docs/configuration-options.md index a932d70e..75402a6d 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -1,4 +1,4 @@ -# Mend Renovate Configuration Options +# Mend Renovate Self-hosted Configuration Options Mend Renovate Enterprise Edition runs with one or more **_Server_** containers and one or more **_Worker_** containers. Mend Renovate Community Edition runs on a single Server container that also performs the Worker actions. diff --git a/docs/overview.md b/docs/overview.md index 04623f6c..26418d92 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,8 +1,8 @@ -# Mend Renovate Community Edition and Enterprise Edition +# Mend Renovate Self-hosted - Community Edition and Enterprise Edition ## Overview -Mend Renovate Community Edition (Renovate CE) and Enterprise Edition (Renovate EE) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub or GitLab. +Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket. Essentially, it is an alternative to running the `renovate` CLI tool, with the following additions: @@ -11,18 +11,18 @@ Essentially, it is an alternative to running the `renovate` CLI tool, with the f - Webhook listener to enable dynamic reactions to repository events - Administration APIs for probing the system state or triggering jobs -## Mend Renovate features +## Mend Renovate Self-hosted features #### Job scheduler -The Mend Renovate's Docker container contains a built-in job scheduler that defaults to enqueing all repositories once per hour. +The Docker containers for Mend Renovate Self-hosted contain a built-in job scheduler that defaults to enqueing all repositories once per hour. This saves the need for configuring and monitoring any external `cron` process. #### Webhook handler -Mend Renovate also supports a webserver to listen for system webhooks received from GitLab. +Mend Renovate Self-hosted also supports a webserver to listen for system webhooks received from the SCM (GitHub, GitLab, Bitbucket). -In particular, Renovate checks webhooks for: +In particular, it checks webhooks for: - Projects it has just been added to - Commits to `main` branch for "important" files such as `package.json` and `renovate.json` @@ -54,10 +54,10 @@ Logically, Mend Renovate consists of four components: - Listens for webhook events from GitHub/GitLab, on path `/webhook` - Adds high priority jobs to the job queue if event conditions are met (e.g. a merged or closed Renovate PR, an update to an existing Renovate PR, a commit to `renovate.json` in `main` branch, etc) 4. Worker - - A wrapper on Renovate OSS, it runs non-stop, retrieving the highest priority job (repository) from the queue one at a time + - A wrapper on Renovate CLI, it runs non-stop, retrieving the highest priority job (repository) from the queue one at a time All four components run within a shared container. -As with Renovate OSS, it can also be configured to interact with an external Redis server as an alternative to the default disk-based cache. +As with Renovate CLI, it can also be configured to interact with an external Redis server as an alternative to the default disk-based cache. ## Downloading @@ -66,11 +66,11 @@ Use of the image is in accordance with the [Mend Terms of Service](https://www.m ## Versioning -Mend Renovate products have their own versioning and release schedule, independent of Renovate OSS versioning. +Mend Renovate Self-hosted products have their own versioning and release schedule, independent of Renovate CLI versioning. -Additionally, it is intended that Mend Renovate will have a slower release cadence than Renovate OSS in order to provide greater stability for Enterprise use. +Additionally, it is intended that Mend Renovate will have a slower release cadence than Renovate CLI in order to provide greater stability for Enterprise use. -Specifically for Mend Renovate's use of SemVer: +Specifically, use of SemVer for Mend Renovate Self-hosted: **Major**: Used only for breaking changes @@ -80,19 +80,19 @@ Specifically for Mend Renovate's use of SemVer: i.e. we do not want to ever "break" anyone with a patch release, or have behavior change. -Renovate OSS feature releases (i.e. minor version bumps in Renovate OSS) will therefore only be incorporated into minor releases of Mend Renovate. +Renovate CLI feature releases (i.e. minor version bumps in Renovate CLI) will therefore only be incorporated into minor releases of Mend Renovate. -Typically, multiple Renovate OSS feature releases will be rolled up into a single Mend Renovate release, and release notes will be embedded so that you do not need to look them up separately. +Typically, multiple Renovate CLI feature releases will be rolled up into a single Mend Renovate release, and release notes will be embedded so that you do not need to look them up separately. ## Releasing and Upgrading -The release cadence of Mend Renovate is not fixed, as it will be determined largely by the importance and stability of new Renovate OSS features, which will typically be tested using the hosted Renovate GitHub App first. +The release cadence of Mend Renovate is not fixed, as it will be determined largely by the importance and stability of new Renovate CLI features, which will typically be tested using the hosted Renovate GitHub App first. When a new version of Mend Renovate is pushed to GHCR, Release Notes will be added to this [github.com/mend/renovate-ce-ee](https://github.com/mend/renovate-ce-ee) repository. Naturally, it is recommended that you use Renovate itself for detecting and updating Mend Renovate versions if you are using a Docker Compose file internally for running Mend Renovate. -## Running Mend Renovate +## Running Mend Renovate Self-hosted Examples using Docker Compose can be found at the bottom of the configuration documentation for each product. - Configuration - Renovate Community Edition - ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ce-gitlab.md)) From 2acc60ee5feff17336fa3add7ca108728331eedb Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:27:24 +0200 Subject: [PATCH 10/38] Add link to Enterprise Edition Docker images on ghcr.io --- docs/overview.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/overview.md b/docs/overview.md index 26418d92..6b2d977e 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -61,8 +61,16 @@ As with Renovate CLI, it can also be configured to interact with an external Red ## Downloading -The Mend Renovate CE image is available via GitHub Container Registry (ghcr.io) using the namespace [mend/renovate-ce](https://ghcr.io/mend/renovate-ce). -Use of the image is in accordance with the [Mend Terms of Service](https://www.mend.io/terms-of-service/). +The Docker images for Mend Renovate Self-hosted are available via GitHub Container Registry (ghcr.io) + +Use of the images are in accordance with the [Mend Terms of Service](https://www.mend.io/terms-of-service/). + +- Community Edition: [mend/renovate-ce](https://ghcr.io/mend/renovate-ce). + +- Enterprise Edition: +Enterprise Edition uses two separate Docker images: The Server image, and the Worker image. + - Server image: [mend/renovate-ee-server](https://ghcr.io/mend/renovate-ee-server) + - Worker image: [mend/renovate-ee-worker](https://ghcr.io/mend/renovate-ee-worker) ## Versioning From 30cc0c0ae839ab16d95a59a0d81be924494a7dee Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Fri, 27 Sep 2024 15:03:55 +0200 Subject: [PATCH 11/38] Updated configuration docs with Setup Guides. Provided information about the 10-repo license key. --- docs/README.md | 10 +- docs/configuration-options.md | 12 +- docs/configure-renovate-bitbucket-server.md | 454 ------------------ docs/configure-renovate-ce-github.md | 181 ------- docs/configure-renovate-ce-gitlab.md | 192 -------- docs/configure-renovate-ee-github.md | 217 --------- docs/configure-renovate-ee-gitlab.md | 219 --------- docs/installation-helm.md | 2 +- docs/migrating-to-renovate-ce.md | 2 +- docs/overview.md | 22 +- docs/setup-for-bitbucket.md | 50 +- docs/setup-for-github.md | 16 +- docs/setup-for-gitlab.md | 16 +- .../docker-compose/renovate-ce-github.yml | 3 +- .../docker-compose/renovate-ce-postgres.yml | 3 +- 15 files changed, 97 insertions(+), 1302 deletions(-) delete mode 100644 docs/configure-renovate-bitbucket-server.md delete mode 100644 docs/configure-renovate-ce-github.md delete mode 100644 docs/configure-renovate-ce-gitlab.md delete mode 100644 docs/configure-renovate-ee-github.md delete mode 100644 docs/configure-renovate-ee-gitlab.md diff --git a/docs/README.md b/docs/README.md index df4a1406..4f8275f3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -16,10 +16,14 @@ The following platforms are supported by Mend Renovate Community Edition and Ent 1. [Overview](./overview.md) 1. Installation ([Helm](./installation-helm.md)) +1. Getting Started + - [Setup guide for GitHub](setup-for-github.md) + - [Setup guide for GitLab](setup-for-gitlab.md) + - [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) 1. Configuration - - Renovate Community Edition - ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ce-gitlab.md)) - - Renovate Enterprise Edition - ([GitHub](./configure-renovate-ee-github.md), [GitLab](./configure-renovate-ee-gitlab.md)) - - Configuration - [Environment variables](configuration-options.md) + - [Self-hosted configuration options](configuration-options.md) + - [Configure PostgreSQL DB](configure-postgres-db.md) + - [Configure High Server Availability](high-server-availability.md) 1. Migration ([Renovate On-Premises to Renovate Community](./migrating-to-renovate-ce.md)) 1. API Documentation - [Admin APIs](./api.md) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 7318c948..37b2c736 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -15,7 +15,17 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Contact Mend to request a license key at [mend.io/renovate-community](https://www.mend.io/renovate-community/) +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. diff --git a/docs/configure-renovate-bitbucket-server.md b/docs/configure-renovate-bitbucket-server.md deleted file mode 100644 index 74fea153..00000000 --- a/docs/configure-renovate-bitbucket-server.md +++ /dev/null @@ -1,454 +0,0 @@ -# Configuration - Mend Renovate CE/EE for Bitbucket Server - - -# Table of Content -* [Available Renovate CE/EE Configurations](#available_config) -* [Installation Stages](#stages) - * [Stage 1: Configure Renovate Bot account on Bitbucket Server](#stg_1) - * [1a: Create a Renovate Bot user account (“Bitbucket User” access only)](#stg_1a) - * [1b: Fetch an HTTP Access Token for the Renovate Bot user (Project Read, Repo Write)](#stg_1b) - * [Stage 2: Install Renovate CE/EE application server (Docker-compose or Kubernetes)](#stg_2) - * [Stage 3: Install Renovate Bot and Webhooks on BitBucket project or repository](#stg_3) - * [3a: Install the Renovate Bot on Repositories](#stg_3a) - * [3b: Add Webhooks to Repositories(/Projects)](#stg_3b) - - -# Available Configurations for CE/EE - -`MEND_RNV_ACCEPT_TOS`: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -`MEND_RNV_LICENSE_KEY`: This should be the license key you obtained after registering at [https://www.mend.io/renovate-community/](https://www.mend.io/renovate-community/). - -`MEND_RNV_PLATFORM`: Set this to `bitbucket-server`. - -`MEND_RNV_ENDPOINT`: This is the API endpoint for your BitBucket Server installation. - -`MEND_RNV_BITBUCKET_USER`: Renovate Bot user account (“Bitbucket User” access only) - -`MEND_RNV_BITBUCKET_PAT`: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` - -`MEND_RNV_WEBHOOK_SECRET`: Optional: Defaults to `renovate` - -`MEND_RNV_WEBHOOK_URL`: Optional: The URL of the Renovate Server plus `/webhook`. Must be accessible to receive incoming calls from the BitBucket server. - -`MEND_RNV_ADMIN_TOKEN`: Optional: A token used for searching/add/removing repository webhooks. required if `MEND_RNV_WEBHOOK_URL` is set. - -`MEND_RNV_ADMIN_API_ENABLED`: Optional: Set to `true` to enable Admin APIs. Defaults to `false`. - -`MEND_RNV_SERVER_API_SECRET`: Required if Admin APIs are enabled. - -`MEND_RNV_SERVER_PORT`: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -`MEND_RNV_CRON_JOB_SCHEDULER`: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not exhaust the available hourly rate limit of the app on GitHub server or cause too much load. - -`MEND_RNV_CRON_APP_SYNC`: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -`MEND_RNV_WORKER_EXECUTION_TIMEOUT`: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -`MEND_RNV_AUTODISCOVER_FILTER`: a string of a comma separated values. (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -`MEND_RNV_SQLITE_FILE_PATH`: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate CE service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (ubuntu) and gid=0 (root). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -`MEND_RNV_LOG_HISTORY_DIR`: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -> [!IMPORTANT] -> Note for EE: Logs are saved by the workers but clean is done by the server, so the corresponding folder must be shared between the Worker and Server containers. - -`MEND_RNV_LOG_HISTORY_TTL_DAYS`: Optional: The number of days to save log files. Defaults to 30. - -`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -`MEND_RNV_MC_TOKEN` _(EE only)_: The merge confidence token used for Smart-Merge-Control authentication - - -# Installation Stages - - -## Stage 1 - - -### 1.a. Configure Renovate Bot User Account - -The following configuration instructions are to be performed on Bitbucket Server by a user account with “Admin” or “System admin” global permissions on the Bitbucket Server. - -- Log in to Bitbucket Server with admin user (eg. http://localhost:7990)
-Note: Bitbucket Admin user permissions - Must be at least “Admin” to create a new user account.
-Also, only repo admins can add the Renovate Bot user and webhooks. - -- Navigate to the User settings page in Administration (Settings → Accounts/Users)
-eg. http://localhost:7990/admin/users - -![bb-admin-users.png](images%2Fbb-admin-users.png) - -- Click “Create user” to create an account for the Renovate Bot user. (eg. http://localhost:7990/admin/users?create) - -We recommend calling the account “Renovate Bot”. -- Username: “renovate-bot” -- Full name: “Renovate Bot” - -![bb-create-user.png](images%2Fbb-create-user.png) - -- Note: The Renovate Bot user will be the author of Renovate pull requests. - -![bb-renovate-bot.png](images%2Fbb-renovate-bot.png) - -- Give the Renovate Bot user basic Bitbucket user access (only required so a HTTP Token can be created through the UI) - - Under Global permissions, in the User Access section, click into the table header bar (where it says “Add Users”) and search for the Renovate Bot user. - - Leave the access level at “Bitbucket User”. - - Press “Add” - -![bb-user-access-1.png](images%2Fbb-user-access-1.png) - -- The end results should be a Renovate Bot user with “Bitbucket User” access only. - -![bb-user-access-2.png](images%2Fbb-user-access-2.png) - -
-Note: It is essential that the Renovate Bot user does NOT have Admin or System admin access. Because Bitbucket Admin and System admin users have full access to all projects and repos, there will be no way to control which repos Renovate will run against, and so Renovate will run against all repos. When the Renovate Bot user has only basic user access, administrators can control which repos run with Renovate by adding the Renovate Bot user to specific repos. -
- - -# Stage 1b: Fetch HTTP Access Token for the Renovate Bot user - -Once the Renovate Bot user account is created, log in to Bitbucket with the Renovate User account to fetch an HTTP access token for it. This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. -It will be used by Renovate OSS CLI to connect to repos on Bitbucket that the Renovate User has access to. - -- Log in to Bitbucket as the Renovate User
-http://localhost:7990/login - -**_Don’t use the Admin user account!_** -- If logged in as an Admin user account, log out of Bitbucket first. -- Alternatively, open a new web browser in incognito mode. _(Ctrl+Shift+N from a web browser)_ - -![bb-log-in.png](images%2Fbb-log-in.png) - -- Go to the Account management page (eg. http://localhost:7990/account) - -You can expand the menu on the user profile icon (top right of page) and click “Manage account”. - -![bb-manage-account.png](images%2Fbb-manage-account.png) - -- Navigate to the HTTP access tokens page - -- Press “Create token” to create a new HTTP access token - -![bb-access-token.png](images%2Fbb-access-token.png) - -- Create an HTTP access token (with `Repository Write` permission) - - Token name: Can be anything (eg. “Renovate User PAT”) - - Permissions: - - Project permissions: `Project read` - - Repository permissions: `Repository write` - -![bb-new-token.png](images%2Fbb-new-token.png) - -- Copy the token and store it for later use.
-This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. - -
- - -# Stage 2: Install Renovate CE/EE Application Server - -## Configure the Docker files / Helm charts -Fetch the example docker-compose file or Helm chart configuration files and edit accordingly. -Example files available here: -- Docker files (Renovate CE / Renovate EE) -- Helm charts (Renovate CE / Renovate EE) - -Edit the docker files / helm chart values to provide the required environment variables. -Refer to [Available Configurations section](#available_config) for a full list of Renovate CE/EE server variables. - -You will need the following information to proceed. - -#### Mend Licence Keys -Renovate CE or Renovate EE licence key -Accept Terms of Service (‘Y’) -Merge Confidence API token - only required if using Smart Merge Control with Renovate EE (ie. `matchConfidence` in package rules) - -#### Bitbucket Server Connection details -Bitbucket server URL (eg, http://localhost:7990/) -Bitbucket Renovate Bot User PAT - See instructions above for getting HTTP access token for Renovate Bot user on Bitbucket - -#### Other strongly recommended Renovate Server environment settings -`MEND_RNV_ADMIN_API_ENABLED` - APIs are off by default. Set this to true to enable admin APIs. -Needs `MEND_RNV_SERVER_API_SECRET` to be set. -`MEND_RNV_SQLITE_FILE_PATH` - Mount the DB file to disc. Ensure volume mount is configured below. -`MEND_RNV_LOG_HISTORY_DIR` - Mount the Renovate job logs (Note: This is the Job logs; Not the server/worker machine logs.) -`RENOVATE_REPOSITORY_CACHE` - Faster performance running Renovate on repos on subsequent scans. - -## Run the Server -If using Docker, run the Docker Compose file after all values have been correctly inserted. - -> docker-compose -f docker-compose-bitbucket.yaml up - -If using Kubernetes, install the Helm charts after all values have been correctly inserted in the values.yaml. - -> helm install renovate-ce - -## Test and Troubleshoot - -#### First, look for Licence Key check -When running the Renovate Application Server, the first thing you should notice is the check for Licence and Terms of Service acceptance. -If you see an error for Licence or Terms of Service, it is a good sign - it means the server is running. Go back and check that the licence key is correctly referenced in the yaml files. - -#### Next, check connection with the Bitbucket Server -The Renovate Server will attempt to validate the Bitbucket Server endpoint and the Renovate User PAT. Errors will be thrown if the endpoint or PAT are incorrect. -Check that the Bitbucket Server is up and running and available on the given endpoint. -The endpoint needs “/api/1.0” on the end [Check this] - -#### Renovate will App Sync and run Renovate on new Repos -If connecting to the Bitbucket Server, an App Sync will occur (by default). Watch this in the logs. No repos will be synced at this stage if the Renovate Bot user has not been added to any repos. However, if the Renovate Bot user has Admin global permission, Renovate will run on ALL repositories on the Bitbucket server. -If there are repos with Renovate Bot installed, watch the logs to see it run. Open the installed repos to see Pull Requests created by “Renovate Bot”. - -#### Check the APIs -- Call the health check - GET /health -- Call the status check - GET /api/status -- Call the task queue - GET /api/task/queue -- Call the job queue - GET /api/job/queue -- Force an app sync - POST /api/sync -- Force a Renovate job on a repo - POST /api/job/add { "repository": ”PROJECT/repo” } - - -# Install Renovate Bot and Webhooks on BitBucket project or repository - - -## Stage 3a: Install Renovate Bot on Repositories(/Projects) -### Overview -Add the Renovate Bot user to any repo (or project) you want Renovate to run on. -Needs “Repository Write” permission so that it can create pull requests on the repo. - -### How it works -Renovate will run scans and create PRs on repositories in which the Renovate Bot user has Write access. -So, to install Renovate on a repository, add the Renovate Bot user to the Repository permissions for the repositories or projects you want it installed on. - -### Permissions required to install the Renovate Bot user -This must be done by a user with Repository Admin permission to the specific repository being added. -Note: Any Bitbucket user with global permissions of Admin or System admin has full access to every project and repository. - -### Note: -- Adding the Renovate Bot user to a **project** will install Renovate on **all repositories** in the project (current and future). -- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on the Bitbucket server. - -### How to add Renovate Bot to a Repository - -- Navigate to the Repository Settings page for a specific repository.
-Repo → Repository Settings → Repository permissions - -Repo settings page: http://localhost:7990/projects/PROJ1/repos/repo-1/permissions -![bb-repo-permissions.png](images%2Fbb-repo-permissions.png) - -- Click the “Add user or group” button (Top right corner) - -- Add the Renovate Bot user with permission: Repository Write
- Note: The Renovate Bot user needs write permission so it can create pull requests on the repository. - -![bb-add-user.png](images%2Fbb-add-user.png) - -Now the Renovate Bot is installed on the repo. - -The Renovate server will detect the new repo on the next App Sync. - -### Run App Sync to detect new repositories - -**App Sync on schedule** - -App Sync runs on a schedule, which defaults to every 4 hours. -To update the schedule, set the EnvVar MEND_RNV_CRON_APP_SYNC on the Renovate Server. -Accepts a 5-part cron schedule. Defaults to `0 */4* * * *` (every 4 hours, on the hour). - -**Force App Sync via API call** - -To trigger the sync immediately, call the sync API (/api/sync) using a tool like Postman. -Requires - -Note: To run APIs, ensure Renovate Server has EnvVar `MEND_RNV_ADMIN_API_ENABLED=true` - -``` -[POST] http:///api/sync -Authorization: -``` - -![bb-postman-sync.png](images%2Fbb-postman-sync.png) - -
- - -## Stage 3b: Add Webhooks to Repositories(/Projects) - -Webhooks enable a message to be sent from the Bitbucket repository to the Renovate server to trigger a Renovate job on a repository when important files have changed (ie. package files, Renovate config files). - -Webhooks can be enabled at the project level or at the repository level. - -Note: Only a Bitbucket user with Admin or System Admin global permissions can create web hooks on a project or repository. -Create webhooks via the Bitbucket UI - -**To create a webhook on a repository:** - -- Navigate to the repository in which you want to add a webhook - -- Go to the Repository settings and the Webhooks settings page (under Workflow menu)
- [Repo → Repository Settings → Webhooks]
- http://localhost:7990/projects/PROJ1/repos/repo-1/settings - -![bb-repo-webhooks.png](images%2Fbb-repo-webhooks.png) - -- Click “Create webhook” to open the Create webhook page - -![bb-create-webhook-1.png](images%2Fbb-create-webhook-1.png) - -**Provide the following values for the webhook:** -- Name: Can be anything. Duplicates are allowed. -- URL: The URL of the Renovate Server plus “/webhook”. Must be accessible to receive incoming calls from the Bitbucker server. -- Status: Active (true) -- Secret: Must match the value in `MEND_RNV_WEBHOOK_SECRET`. (Defaults to ‘renovate’) -- Authentication: None -- SSL/TLS: (Do not skip certificate verification) -- Events: - - Project: Modified (Only available when creating Project webhooks) - - Repository: Push, Modified - - Pull request: Modified - -![bb-create-webhook-2.png](images%2Fbb-create-webhook-2.png) - -- Click “Save” to finish creating the webhook - -Webhooks will now be triggered when relevant events occur on the repository. -Renovate jobs will automatically run on the triggering repository as required. - -### Create webhooks via the Bitbucket API - -Run Bitbucket API to create webhooks on repositories and projects. - -**Permissions** - -Only Bitbucket users with Admin or System admin global permissions can create webhooks on projects or repositories. -To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access token as a Bearer Authorization token in the API header. - -#### Fetch the Authorization Bearer token - -- Log in to Bitbucket as a user with Admin or System admin global permissions -- Navigate to the HTTP access tokens page
- http://localhost:7990/plugins/servlet/access-tokens/users/admin/manage - -![bb-admin-token.png](images%2Fbb-admin-token.png) - -- Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. - -Note: -- To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
-- To create **repository** webhooks, the HTTP access token must have `Repository Admin` permissions. (Project Admin not required.) - -![bb-create-admin-token.png](images%2Fbb-create-admin-token.png) - -- Click “Create” to finish creating the access token -- Copy the access token when it is presented. Store it for use when calling Bitbucket Admin APIs. - -### Create Repository webhooks via Bitbucket API - -``` -[POST] - http:///rest/api/latest/projects//repos//webhooks - -Authorization: Bearer -``` - -Body: (raw - JSON) -```json -{ - "name": "renovate", - "url": "https:///webhook", - "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET - "events": [ - "repo:refs_changed", - "repo:modified", - "pr:modified" - ], - "active": true, - "statistics": {}, - "scopeType": "repository", - "sslVerificationRequired": false -} -``` - -### Create Project webhooks via Bitbucket API - -``` -POST http:///rest/api/latest/projects//webhooks - -Authorization: Bearer -``` - -Body: (raw - JSON) -```json -{ - "name": "renovate", - "url": "https:///webhook", - "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET - "events": [ - "pr:modified", ← Optional: Add this if you want ALL repos on the project to trigger - "repo:refs_changed", ← Optional: Add this if you want ALL repos on the project to trigger - "repo:modified", ← Optional: Add this if you want ALL repos on the project to trigger - "project:modified" - ], - "active": true, - "statistics": {}, - "scopeType": "repository", - "sslVerificationRequired": false -} -``` - -**Provide the following values:** -- name: Can be anything. Duplicate names are allowed. -- url: The URL and port of the Renovate Server. - - Note: Ensure ports are open to receiving incoming calls from the Bitbucket server. -- secret: The Webhook secret defined in the MEND_RNV_WEBHOOK_SECRET environment variable on the Renovate Server. - -### Allow Renovate CE/EE to create Repository webhooks via Bitbucket API - -By setting the values of the two environment variables `MEND_RNV_WEBHOOK_URL` and `MEND_RNV_ADMIN_TOKEN` -the server will manage the repositories webhooks automatically - - -Notes: `MEND_RNV_ADMIN_TOKEN` -1. Recommended to use a different token than the token for Renovate bot user -2. This admin token is only used for searching/adding and removing of webhooks on repository level diff --git a/docs/configure-renovate-ce-github.md b/docs/configure-renovate-ce-github.md deleted file mode 100644 index 9ff810c3..00000000 --- a/docs/configure-renovate-ce-github.md +++ /dev/null @@ -1,181 +0,0 @@ -# Configuration - Mend Renovate Community Edition for GitHub - -## Create and Configure the GitHub App (bot) - -Before running Mend Renovate, you need to provision it as an App on GitHub, and retrieve the ID + private key provided. - -If you're running a self-hosted instance of GitHub Enterprise, it is suggested to name the app "Renovate" so that it shows up as easily recognizable as "renovate[bot]" in Pull Requests. -If you're running against `github.com` then the name Renovate is already taken by the hosted Mend Renovate app, so you will need something else like "YourCompany Renovate". - -The App requires the following permissions: - -- Repository permissions - - Administration: Read-only - - Checks: Read & write - - Commit statuses: Read & write - - Contents: Read & write - - Dependabot alerts: Read-only (optional) - - Issues: Read & write - - Metadata: Read-only - - Pull Requests: Read & write - - Workflows: Read & write -- Organization permissions - - Members: Read-only - -The App should also subscribe to the following webhook events: - -- Security Advisory -- Check run -- Check suite -- Issues -- Pull request -- Push -- Repository -- Status - -Description, Homepage, User authorization callback URL, and Setup URL are all unimportant so you may set them to whatever you like. - -The Mend Renovate webhook listener binds to port 8080 by default, however it will bind to `process.env.PORT` instead if that is defined. -Note: The Mend Renovate image takes care of exposing port 8080 of the container, so if you change this port then you will need to take care of any exposing/mapping of ports yourself. -In the [Docker Compose example config](https://github.com/mend/renovate-cc-ee/tree/main/examples/), the default port 8080 is used and then mapped to port 80 on the host. - -For the Webhook URL field, point it to `/webhook` on port 80 (or whatever port you mapped to) of the server that you will run Mend Renovate on, e.g. http://1.2.3.4/webhook -Be sure to enter a webhook secret too. -If you don't care about the value, then enter 'renovate' as that is the default secret that the webhook handler process uses. - -You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. - -## Configure Mend Renovate CE - -### Mend Renovate environment variables - -Mend Renovate requires configuration via environment variables in addition to Renovate OSS's regular configuration: - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: This should be the license key you obtained after registering at [https://www.mend.io/renovate-community/](https://www.mend.io/renovate-community/). - -**`MEND_RNV_PLATFORM`**: Set this to `github`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitHub Enterprise installation. Required for GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - -**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. - -**`MEND_RNV_GITHUB_APP_KEY`**: A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. - -**`RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate CE service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (ubuntu) and gid=0 (root). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not exhaust the available hourly rate limit of the app on GitHub server or cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Note: This is required if you are using a self-hosted GitHub Enterprise or GitLab instance but should not be configured if your `RENOVATE_ENDPOINT` is `https://api.github.com`. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values. (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container. - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -**`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -### Core Renovate Configuration - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. - -**npm Registry** If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate CE on GitHub - -```yaml -version: "3.6" -services: - renovate: - image: ghcr.io/mend/renovate-ce:-full - restart: on-failure - ports: - - "80:8080" # Receive webhooks on port 80 - environment: - # Optional: Define log level. Set to Debug for more verbose output - # - LOG_LEVEL=DEBUG - # Provide Mend License and accept Terms of Service - - MEND_RNV_ACCEPT_TOS # Set to 'y' to accept the Mend Renovate Terms of Service - - MEND_RNV_LICENSE_KEY # Set this to the key you received by email - # Provide connection details for the GitHub App - - MEND_RNV_PLATFORM=github - - MEND_RNV_ENDPOINT # Required for GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - - MEND_RNV_GITHUB_APP_ID # GitHub App ID - - MEND_RNV_GITHUB_APP_KEY # GitHub App Key (PEM file). Alternatively mount as a volume below - - MEND_RNV_WEBHOOK_SECRET # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # - MEND_RNV_ADMIN_API_ENABLED # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # - MEND_RNV_SERVER_API_SECRET # Required if Admin APIs are enabled - # - MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # - MEND_RNV_CRON_JOB_SCHEDULER # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # - MEND_RNV_CRON_APP_SYNC # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # - GITHUB_COM_TOKEN # Personal Access Token for github.com (used for retrieving changelogs) - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db -``` diff --git a/docs/configure-renovate-ce-gitlab.md b/docs/configure-renovate-ce-gitlab.md deleted file mode 100644 index 684532db..00000000 --- a/docs/configure-renovate-ce-gitlab.md +++ /dev/null @@ -1,192 +0,0 @@ -# Configuration - Mend Renovate Community Edition for GitLab - -## Configure Renovate Bot Account on GitLab - -### Renovate Bot Account - -Create a GitLab user account to act as the "Renovate Bot". -If you are running your own instance of GitLab, it's suggested to name the account "Renovate Bot" with username "renovate-bot". - -Note: In GitLab, the "Renovate Bot" is not an App or Plugin; it's a GitLab user account that's been given the right permissions and System Hooks. -You should use a dedicated "bot account" for Renovate, instead of using someone's personal user account. -Apart from reducing the chance of conflicts, it is better for teams if the actions they see from Renovate are clearly marked as coming from a dedicated bot account and not from a teammate's account, which could be confusing at times. -e.g. Did the bot automerge that PR, or did a human do it? - -### Personal Access Token - -Once the account is created, create a Personal Access Token for it with the following permissions: - * `api` - * `read_user` - * `write_repository` - -### System Hook - -To activate Mend Renovate's webhook ability, create a System Hook that points to the Renovate installation. - -Create a System Hook (in Admin area) - -1. Set the webhook URL to point to the Renovate server url followed by `/webhook`. (e.g. `http://renovate.yourcompany.com:8080/webhook` or `https://1.2.3.4/webhook`) -2. Set the webhook secret to the same value configured for `MEND_RNV_WEBHOOK_SECRET` (defaults to `renovate`) -3. Set Hook triggers for: - * `Push events` - * `Merge request events` - -Remember: Renovate's webhook listener binds to port 8080 inside its container, but you can map it (using Docker) to whatever external port you require, including port 80. - -Set the "Secret Token" to the same value configured for `MEND_RNV_WEBHOOK_SECRET`, or set it to `"renovate"` if you left it as default. - -Once your System Hook is added, Renovate's webhook handler will receive events from _all_ repositories. -Therefore, Renovate maintains a list of all repositories it has access to and discards events from all others. - -### Repo Webhooks - -Because Issue events aren't included in System hooks, a webhook must be individually configured for each repository in which you want the Dependency Dashboard issue to be interactive. - -In the Repository settings, create a Webhook with the following settings: -1. Set the webhook URL - same as System Hook URL -2. Set the webhook secret - same as System Hook secret -3. Set Hook triggers for: - * `Issue events` - -This will need to be repeated for every repository that is onboarded to the Renovate Bot account. -It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. - - -## Configure Mend Renovate CE - -### Mend Renovate environment variables - -Mend Renovate requires configuration via environment variables in addition to Renovate OSS's regular configuration: - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: This should be the license key you obtained after registering at [https://www.mend.io/renovate-community/](https://www.mend.io/renovate-community/). - -**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitLab host. e.g. like `https://gitlab.company.com/api/v4/`. Include the trailing slash. - -**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate CE service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (ubuntu) and gid=0 (root). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Note: This is required if you are using a self-hosted GitHub Enterprise or GitLab instance but should not be configured if your `RENOVATE_ENDPOINT` is `https://api.github.com`. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container. - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -**`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -### Core Renovate Configuration - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. - -**npm Registry** If using your own npm registry, you may find it easiest to update your `docker-compose.yml` to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Enabling Renovate on Repositories - -To enable Renovate on a repository, in the project's _Settings -> Members_ section, add the bot user and give it `Developer` permissions. - -Remember to add a webhook with "Issue events" to the repository if you wish to enable interactive dashboard issues. (See _Create Repo Webhooks_ above) - -Adding Renovate as a Developer to a repository cause a system hook to be sent to Renovate which in turn enqueues a job for the Renovate Worker. -The repository should receive an onboarding PR immediately after. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate CE on GitLab - -```yaml -version: "3.6" -services: - renovate: - image: ghcr.io/mend/renovate-ce:-full - restart: on-failure - environment: - # Optional: Define log level. Set to Debug for more verbose output - # - LOG_LEVEL=DEBUG - # Provide Mend License and accept Terms of Service - - MEND_RNV_ACCEPT_TOS # Set to 'y' to accept the Mend Renovate Terms of Service - - MEND_RNV_LICENSE_KEY # Set this to the key you received by email - # Provide connection details for the GitLab Bot - - MEND_RNV_PLATFORM=gitlab - - MEND_RNV_ENDPOINT # GitLab endpoint, include trailing slash - - MEND_RNV_GITLAB_PAT # Personal Access Token for bot account - - MEND_RNV_WEBHOOK_SECRET # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # - MEND_RNV_ADMIN_API_ENABLED # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # - MEND_RNV_SERVER_API_SECRET # Required if Admin APIs are enabled - # - MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # - MEND_RNV_CRON_JOB_SCHEDULER # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # - MEND_RNV_CRON_APP_SYNC # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # - GITHUB_COM_TOKEN # Personal Access Token for github.com (used for retrieving changelogs) - ports: - - "80:8080" # Receive webhooks on port 80 - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db -``` diff --git a/docs/configure-renovate-ee-github.md b/docs/configure-renovate-ee-github.md deleted file mode 100644 index 0d3ff077..00000000 --- a/docs/configure-renovate-ee-github.md +++ /dev/null @@ -1,217 +0,0 @@ -# Configuration - Mend Renovate Enterprise Edition for GitHub - -## Create and Configure the GitHub App (bot) - -Before running Mend Renovate, you need to provision it as an App on GitHub, and retrieve the ID + private key provided. - -If you're running a self-hosted instance of GitHub Enterprise, it is suggested to name the app "Renovate" so that it shows up as easily recognizable as "renovate[bot]" in Pull Requests. -If you're running against `github.com` then the name Renovate is already taken by the hosted Mend Renovate app, so you will need something else like "YourCompany Renovate". - -The App requires the following permissions: - -- Repository permissions - - Administration: Read-only - - Checks: Read & write - - Contents: Read & write - - Issues: Read & write - - Metadata: Read-only - - Pull Requests: Read & write - - Commit statuses: Read & write - - Dependabot alerts: Read-only (optional) - - Workflows: Read & write -- Organization permissions - - Members: Read-only - -The App should also subscribe to the following webhook events: - -- Security Advisory -- Check run -- Check suite -- Issues -- Pull request -- Push -- Repository -- Status - -Description, Homepage, User authorization callback URL, and Setup URL are all unimportant so you may set them to whatever you like. - -The Mend Renovate webhook listener binds to port 8080 by default, however it will bind to `process.env.PORT` instead if that is defined. -Note: The Mend Renovate image takes care of exposing port 8080 of the container, so if you change this port then you will need to take care of any exposing/mapping of ports yourself. -In the [Docker Compose example config](https://github.com/mend/renovate-cc-ee/tree/main/examples/), the default port 8080 is used and then mapped to port 80 on the host. - -For the Webhook URL field, point it to `/webhook` on port 80 (or whatever port you mapped to) of the server that you will run Mend Renovate on, e.g. http://1.2.3.4/webhook -Be sure to enter a webhook secret too. -If you don't care about the value, then enter 'renovate' as that is the default secret that the webhook handler process uses. - -You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. - -## Configure Mend Renovate EE - -Renovate Enterprise runs with one **_Server_** container and one or more **_Worker_** containers. -See below for a list of environment variables that relate to each. - -### Environment variables - Renovate Enterprise Server - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: For a Renovate Enterprise license key, contact Mend via the [Renovate Enterprise webpage](https://www.mend.io/renovate-enterprise/). - -**`MEND_RNV_PLATFORM`**: Set this to `github`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitHub Enterprise installation. Required for GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - -**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. - -**`MEND_RNV_GITHUB_APP_KEY`**: A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. - -**`RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_SERVER_API_SECRET`**: Set an API secret. Must match the Worker instances and Admin APIs for communicating with the Server. - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate EE server service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (node) and gid=1000 (node). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not exhaust the available hourly rate limit of the app on GitHub server or cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Note: This is required if you are using a self-hosted GitHub Enterprise instance but should not be configured if your `RENOVATE_ENDPOINT` is `https://api.github.com`. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_MC_TOKEN`**: The merge confidence token used for Smart-Merge-Control authentication - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history between multiple workers. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container. - -### Environment variables - Renovate Enterprise Worker - -The Worker container needs to define only the following variables: - -* **`MEND_RNV_SERVER_HOSTNAME`**: The hostname of the Renovate Enterprise `server` container (eg. http://renovate-ee-server:8080) -* **`MEND_RNV_SERVER_API_SECRET`**: Set to same as Server -* **`MEND_RNV_ACCEPT_TOS`**: Set to same as Server -* **`MEND_RNV_LICENSE_KEY`**: Set to same as Server -* **`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -## Configure Renovate Core - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. Both settings should be done in the worker. - -**npm Registry** If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate EE on GitHub - -```yaml -version: '3.6' - -x-controller-shared-variables: &variables-controller - MEND_RNV_SERVER_HOSTNAME: http://renovate-ee-server:8080 - MEND_RNV_SERVER_API_SECRET: # This secret will be used by the Worker and by Admin APIs - # Provide Mend License and accept Terms of Service - MEND_RNV_ACCEPT_TOS: # Set to 'y' to accept the Mend Renovate Terms of Service - MEND_RNV_LICENSE_KEY: # Set this to the Renovate Enterprise key obtained from Mend - -services: - renovate-ee-server: - restart: on-failure - image: ghcr.io/mend/renovate-ee-server: - ports: - - "80:8080" # Receive webhooks on port 80 - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug - # Provide connection details for the Renovate Bot/App - MEND_RNV_PLATFORM: # Set to `github` or `gitlab` - MEND_RNV_ENDPOINT: # Required for GitLab or GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - MEND_RNV_GITHUB_APP_ID: # GitHub Only! GitHub App ID - MEND_RNV_GITHUB_APP_KEY: # GitHub Only! GitHub App Key (PEM file). Alternatively mount as a volume below - MEND_RNV_WEBHOOK_SECRET: # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # MEND_RNV_ADMIN_API_ENABLED: # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # MEND_RNV_SQLITE_FILE_PATH: /db/renovate-ee.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # MEND_RNV_CRON_JOB_SCHEDULER: # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # MEND_RNV_CRON_APP_SYNC: # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # GITHUB_COM_TOKEN: # Personal Access Token for github.com (used for retrieving changelogs) - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db - healthcheck: - test: curl --fail http://renovate-ee-server:8080/health || exit 1 - interval: 60s - retries: 5 - start_period: 20s - timeout: 10s - - renovate-ee-worker: - restart: on-failure - deploy: - # Post deploy: - # $ docker-compose -f docker-compose-renovate-ee.yml up --scale renovate-ee-worker=3 -d --no-recreate - replicas: 2 - image: ghcr.io/mend/renovate-ee-worker:-full - depends_on: - - renovate-ee-server - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug -``` diff --git a/docs/configure-renovate-ee-gitlab.md b/docs/configure-renovate-ee-gitlab.md deleted file mode 100644 index 4589192d..00000000 --- a/docs/configure-renovate-ee-gitlab.md +++ /dev/null @@ -1,219 +0,0 @@ -# Configuration - Mend Renovate Enterprise Edition for GitLab - -## Configure Renovate Bot Account on GitLab - -### Renovate Bot Account - -Create a GitLab user account to act as the "Renovate Bot". -If you are running your own instance of GitLab, it's suggested to name the account "Renovate Bot" with username "renovate-bot". - -Note: In GitLab, the "Renovate Bot" is not an App or Plugin; it's a GitLab user account that's been given the right permissions and System Hooks. -You should use a dedicated "bot account" for Renovate, instead of using someone's personal user account. -Apart from reducing the chance of conflicts, it is better for teams if the actions they see from Renovate are clearly marked as coming from a dedicated bot account and not from a teammate's account, which could be confusing at times. -e.g. Did the bot automerge that PR, or did a human do it? - -### Personal Access Token - -Once the account is created, create a Personal Access Token for it with the following permissions: - * `api` - * `read_user` - * `write_repository` - -### System Hook - -To activate Mend Renovate's webhook ability, create a System Hook that points to the Renovate installation. - -Create a System Hook (in Admin area) - -1. Set the webhook URL to point to the Renovate server url followed by `/webhook`. (e.g. `http://renovate.yourcompany.com:8080/webhook` or `https://1.2.3.4/webhook`) -2. Set the webhook secret to the same value configured for `MEND_RNV_WEBHOOK_SECRET` (defaults to `renovate`) -3. Set Hook triggers for: - * `Push events` - * `Merge request events` - -Remember: Renovate's webhook listener binds to port 8080 inside its container, but you can map it (using Docker) to whatever external port you require, including port 80. - -Set the "Secret Token" to the same value configured for `MEND_RNV_WEBHOOK_SECRET`, or set it to `"renovate"` if you left it as default. - -Once your System Hook is added, Renovate's webhook handler will receive events from _all_ repositories. -Therefore, Renovate maintains a list of all repositories it has access to and discards events from all others. - -### Repo Webhooks - -Because Issue events aren't included in System hooks, a webhook must be individually configured for each repository in which you want the Dependency Dashboard issue to be interactive. - -In the Repository settings, create a Webhook with the following settings: -1. Set the webhook URL - same as System Hook URL -2. Set the webhook secret - same as System Hook secret -3. Set Hook triggers for: - * `Issue events` - -This will need to be repeated for every repository that is onboarded to the Renovate Bot account. -It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. - - -## Configure Mend Renovate EE - -Renovate Enterprise runs with one **_Server_** container and one or more **_Worker_** containers. -See below for a list of environment variables that relate to each. - -### Environment variables - Renovate Enterprise Server - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: For a Renovate Enterprise license key, contact Mend via the [Renovate Enterprise webpage](https://www.mend.io/renovate-enterprise/). - -**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your self-hosted GitLab instance installation. Include the trailing slash. (eg. `https://1.2.3.4/api/v4`) - -**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_SERVER_API_SECRET`**: Set an API secret. Must match the Worker instances and Admin APIs for communicating with the Server. - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate EE server service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (node) and gid=1000 (node). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_MC_TOKEN`**: The merge confidence token used for Smart-Merge-Control authentication - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history between multiple workers. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -_> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container._ - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -### Environment variables - Renovate Enterprise Worker - -The Worker container needs to define only the following variables: - -* **`MEND_RNV_SERVER_HOSTNAME`**: The hostname of the Renovate Enterprise `server` container (eg. http://renovate-ee-server:8080) -* **`MEND_RNV_SERVER_API_SECRET`**: Set to same as Server -* **`MEND_RNV_ACCEPT_TOS`**: Set to same as Server -* **`MEND_RNV_LICENSE_KEY`**: Set to same as Server -* **`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -## Configure Renovate Core - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. Both settings should be done in the worker. - -**npm Registry** If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate EE on GitLab - -```yaml -version: '3.6' - -x-controller-shared-variables: &variables-controller - MEND_RNV_SERVER_HOSTNAME: http://renovate-ee-server:8080 - MEND_RNV_SERVER_API_SECRET: # This secret will be used by the Worker and by Admin APIs - # Provide Mend License and accept Terms of Service - MEND_RNV_ACCEPT_TOS: # Set to 'y' to accept the Mend Renovate Terms of Service - MEND_RNV_LICENSE_KEY: # Set this to the Renovate Enterprise key obtained from Mend - -services: - renovate-ee-server: - restart: on-failure - image: ghcr.io/mend/renovate-ee-server: - ports: - - "80:8080" # Receive webhooks on port 80 - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug - # Provide connection details for the Renovate Bot/App - MEND_RNV_PLATFORM: # Set to `github` or `gitlab` - MEND_RNV_ENDPOINT: # Required for GitLab or GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - MEND_RNV_GITLAB_PAT: # Personal Access Token for the GitLab bot account. - MEND_RNV_WEBHOOK_SECRET: # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # MEND_RNV_ADMIN_API_ENABLED: # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # MEND_RNV_SQLITE_FILE_PATH: /db/renovate-ee.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # MEND_RNV_CRON_JOB_SCHEDULER: # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # MEND_RNV_CRON_APP_SYNC: # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # GITHUB_COM_TOKEN: # Personal Access Token for github.com (used for retrieving changelogs) - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db - healthcheck: - test: curl --fail http://renovate-ee-server:8080/health || exit 1 - interval: 60s - retries: 5 - start_period: 20s - timeout: 10s - - renovate-ee-worker: - restart: on-failure - deploy: - # Post deploy: - # $ docker-compose -f docker-compose-renovate-ee.yml up --scale renovate-ee-worker=3 -d --no-recreate - replicas: 2 - image: ghcr.io/mend/renovate-ee-worker:-full - depends_on: - - renovate-ee-server - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug -``` diff --git a/docs/installation-helm.md b/docs/installation-helm.md index aa9e6dd4..ff237c0c 100644 --- a/docs/installation-helm.md +++ b/docs/installation-helm.md @@ -28,5 +28,5 @@ helm repo update helm install --generate-name --set renovate.config='\{\"token\":\"...\"\}' mend-renovate-cc-ee/mend-renovate-ce ``` -See the available [values](../helm-charts/mend-renovate-ce/values.yaml) for full configuration and review configuration guides for [GitHub](./configure-renovate-ce-github.md) and/or [GitLab](./configure-renovate-ce-gitlab.md). +See the available [values](../helm-charts/mend-renovate-ce/values.yaml) for full configuration and review configuration guides for [GitHub](setup-for-github.md), [GitLab](setup-for-gitlab.md) or [Bitbucket](setup-for-bitbucket.md). diff --git a/docs/migrating-to-renovate-ce.md b/docs/migrating-to-renovate-ce.md index 0ba378f3..44b2aaac 100644 --- a/docs/migrating-to-renovate-ce.md +++ b/docs/migrating-to-renovate-ce.md @@ -10,7 +10,7 @@ If you are using a "health check" of the Renovate container then you should poin Some existing environment variables have been renamed, and some new ones have been added. -See the specific configuration instructions ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ee-gitlab.md)) to learn more about the variables mentioned below. +See the specific configuration instructions ([GitHub](setup-for-github.md), [GitLab](setup-for-gitlab.md), [Bitbucket](setup-for-bitbucket.md)) to learn more about the variables mentioned below. ### Environment Variable Key Migration diff --git a/docs/overview.md b/docs/overview.md index 6b2d977e..ffc8368b 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -102,9 +102,21 @@ Naturally, it is recommended that you use Renovate itself for detecting and upda ## Running Mend Renovate Self-hosted -Examples using Docker Compose can be found at the bottom of the configuration documentation for each product. -- Configuration - Renovate Community Edition - ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ce-gitlab.md)) -- Configuration - Renovate Enterprise Edition - ([GitHub](./configure-renovate-ee-github.md), [GitLab](./configure-renovate-ee-gitlab.md)) +See the Setup Guides to get started with Mend Renovate Self-hosted +- [Setup guide for GitHub](setup-for-github.md) +- [Setup guide for GitLab](setup-for-gitlab.md) +- [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) -Request `/status` on your IP address hosting the deployment to check if it is running correctly. -It is recommended not to expose that endpoint to the internet as it could leak information about private repository names. +Examples using Docker Compose can be found at in the [examples directory](../examples). + +## Testing Mend Renovate Self-hosted + +Request `/health` on your IP address hosting the deployment to check if it is running correctly. + +For further testing, use the [Admin APIs](./api.md) to: +- check the status of the server +- see the contents of the Job and Task queues +- perform an App sync +- run a job + +It is recommended not to expose the API endpoint to the internet as it could leak information about private repository names. diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index fabd630b..7ac0fc5a 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -13,7 +13,7 @@ Also, only repo admins can add the Renovate Bot user and webhooks. - Navigate to the User settings page in Administration (Settings → Accounts/Users)
eg. http://localhost:7990/admin/users -![bb-admin-users.png](images%2Fbb-admin-users.png) +![bb-admin-users.png](images/bb-admin-users.png) - Click “Create user” to create an account for the Renovate Bot user. (eg. http://localhost:7990/admin/users?create) @@ -21,22 +21,22 @@ We recommend calling the account “Renovate Bot”. - Username: “renovate-bot” - Full name: “Renovate Bot” -![bb-create-user.png](images%2Fbb-create-user.png) +![bb-create-user.png](images/bb-create-user.png) - Note: The Renovate Bot user will be the author of Renovate pull requests. -![bb-renovate-bot.png](images%2Fbb-renovate-bot.png) +![bb-renovate-bot.png](images/bb-renovate-bot.png) - Give the Renovate Bot user basic Bitbucket user access (only required so a HTTP Token can be created through the UI) - Under Global permissions, in the User Access section, click into the table header bar (where it says “Add Users”) and search for the Renovate Bot user. - Leave the access level at “Bitbucket User”. - Press “Add” -![bb-user-access-1.png](images%2Fbb-user-access-1.png) +![bb-user-access-1.png](images/bb-user-access-1.png) - The end results should be a Renovate Bot user with “Bitbucket User” access only. -![bb-user-access-2.png](images%2Fbb-user-access-2.png) +![bb-user-access-2.png](images/bb-user-access-2.png)
Note: It is essential that the Renovate Bot user does NOT have Admin or System admin access. Because Bitbucket Admin and System admin users have full access to all projects and repos, there will be no way to control which repos Renovate will run against, and so Renovate will run against all repos. When the Renovate Bot user has only basic user access, administrators can control which repos run with Renovate by adding the Renovate Bot user to specific repos. @@ -54,19 +54,19 @@ http://localhost:7990/login - If logged in as an Admin user account, log out of Bitbucket first. - Alternatively, open a new web browser in incognito mode. _(Ctrl+Shift+N from a web browser)_ -![bb-log-in.png](images%2Fbb-log-in.png) +![bb-log-in.png](images/bb-log-in.png) - Go to the Account management page (eg. http://localhost:7990/account) You can expand the menu on the user profile icon (top right of page) and click “Manage account”. -![bb-manage-account.png](images%2Fbb-manage-account.png) +![bb-manage-account.png](images/bb-manage-account.png) - Navigate to the HTTP access tokens page - Press “Create token” to create a new HTTP access token -![bb-access-token.png](images%2Fbb-access-token.png) +![bb-access-token.png](images/bb-access-token.png) - Create an HTTP access token (with `Repository Write` permission) - Token name: Can be anything (eg. “Renovate User PAT”) @@ -74,7 +74,7 @@ You can expand the menu on the user profile icon (top right of page) and click - Project permissions: `Project read` - Repository permissions: `Repository write` -![bb-new-token.png](images%2Fbb-new-token.png) +![bb-new-token.png](images/bb-new-token.png) - Copy the token and store it for later use.
This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. @@ -120,14 +120,14 @@ Note: Any Bitbucket user with global permissions of Admin or System admin has fu Repo → Repository Settings → Repository permissions Repo settings page: http://localhost:7990/projects/PROJ1/repos/repo-1/permissions -![bb-repo-permissions.png](images%2Fbb-repo-permissions.png) +![bb-repo-permissions.png](images/bb-repo-permissions.png) - Click the “Add user or group” button (Top right corner) - Add the Renovate Bot user with permission: Repository Write
Note: The Renovate Bot user needs write permission so it can create pull requests on the repository. -![bb-add-user.png](images%2Fbb-add-user.png) +![bb-add-user.png](images/bb-add-user.png) Now the Renovate Bot is installed on the repo. @@ -153,7 +153,7 @@ Note: To run APIs, ensure Renovate Server has EnvVar `MEND_RNV_ADMIN_API_ENABLED Authorization: ``` -![bb-postman-sync.png](images%2Fbb-postman-sync.png) +![bb-postman-sync.png](images/bb-postman-sync.png)
@@ -174,11 +174,11 @@ Create webhooks via the Bitbucket UI [Repo → Repository Settings → Webhooks]
http://localhost:7990/projects/PROJ1/repos/repo-1/settings -![bb-repo-webhooks.png](images%2Fbb-repo-webhooks.png) +![bb-repo-webhooks.png](images/bb-repo-webhooks.png) - Click “Create webhook” to open the Create webhook page -![bb-create-webhook-1.png](images%2Fbb-create-webhook-1.png) +![bb-create-webhook-1.png](images/bb-create-webhook-1.png) **Provide the following values for the webhook:** - Name: Can be anything. Duplicates are allowed. @@ -192,7 +192,7 @@ Create webhooks via the Bitbucket UI - Repository: Push, Modified - Pull request: Modified -![bb-create-webhook-2.png](images%2Fbb-create-webhook-2.png) +![bb-create-webhook-2.png](images/bb-create-webhook-2.png) - Click “Save” to finish creating the webhook @@ -214,7 +214,7 @@ To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access - Navigate to the HTTP access tokens page
http://localhost:7990/plugins/servlet/access-tokens/users/admin/manage -![bb-admin-token.png](images%2Fbb-admin-token.png) +![bb-admin-token.png](images/bb-admin-token.png) - Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. @@ -222,7 +222,7 @@ Note: - To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
- To create **repository** webhooks, the HTTP access token must have `Repository Admin` permissions. (Project Admin not required.) -![bb-create-admin-token.png](images%2Fbb-create-admin-token.png) +![bb-create-admin-token.png](images/bb-create-admin-token.png) - Click “Create” to finish creating the access token - Copy the access token when it is presented. Store it for use when calling Bitbucket Admin APIs. @@ -302,8 +302,8 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **Example Docker Compose files:** -- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce-github.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee-simple.yml) > [!NOTE] > @@ -317,7 +317,17 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index bd23e61e..0b6dd4f7 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -51,8 +51,8 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **Example Docker Compose files:** -- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce-github.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee-simple.yml) > [!NOTE] > @@ -66,7 +66,17 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index b54d5721..e44736bd 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -57,8 +57,8 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **Example Docker Compose files:** -- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce-github.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee-simple.yml) > [!NOTE] > @@ -72,7 +72,17 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `gitlab`. diff --git a/examples/docker-compose/renovate-ce-github.yml b/examples/docker-compose/renovate-ce-github.yml index fa76090c..35c060ce 100644 --- a/examples/docker-compose/renovate-ce-github.yml +++ b/examples/docker-compose/renovate-ce-github.yml @@ -17,7 +17,8 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ + MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ + # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ diff --git a/examples/docker-compose/renovate-ce-postgres.yml b/examples/docker-compose/renovate-ce-postgres.yml index fe453125..1861d3f0 100644 --- a/examples/docker-compose/renovate-ce-postgres.yml +++ b/examples/docker-compose/renovate-ce-postgres.yml @@ -19,7 +19,8 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ + MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ + # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ From 8aba01fb5319032b03dca15590d1e675f9f3b320 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Fri, 27 Sep 2024 15:05:18 +0200 Subject: [PATCH 12/38] Updated configuration docs with Setup Guides. Provided information about the 10-repo license key. --- docs/setup-for-bitbucket.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index 7ac0fc5a..17c6d2fe 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -90,7 +90,7 @@ Example files available here: - Helm charts (Renovate CE / Renovate EE) Edit the docker files / helm chart values to provide the required environment variables. -Refer to [Available Configurations section](#available_config) for a full list of Renovate CE/EE server variables. +Refer to [Configurations Options](configuration-options.md) for a full list of Renovate CE/EE server variables. #### Bitbucket Server Connection details From 2792b0b3380ed1b69266fdff837e68850327a286 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 09:11:41 +0200 Subject: [PATCH 13/38] Removed 10-repo licence key information --- docs/configuration-options.md | 12 +----------- docs/setup-for-bitbucket.md | 12 +----------- docs/setup-for-github.md | 12 +----------- docs/setup-for-gitlab.md | 12 +----------- examples/docker-compose/renovate-ce-github.yml | 3 +-- examples/docker-compose/renovate-ce-postgres.yml | 3 +-- 6 files changed, 6 insertions(+), 48 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 37b2c736..7318c948 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -15,17 +15,7 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Contact Mend to request a license key at [mend.io/renovate-community](https://www.mend.io/renovate-community/) **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index 17c6d2fe..083a660a 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -317,17 +317,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 0b6dd4f7..ce638b1e 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -66,17 +66,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index e44736bd..2149a47e 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -72,17 +72,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `gitlab`. diff --git a/examples/docker-compose/renovate-ce-github.yml b/examples/docker-compose/renovate-ce-github.yml index 35c060ce..fa76090c 100644 --- a/examples/docker-compose/renovate-ce-github.yml +++ b/examples/docker-compose/renovate-ce-github.yml @@ -17,8 +17,7 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ - # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 + MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ diff --git a/examples/docker-compose/renovate-ce-postgres.yml b/examples/docker-compose/renovate-ce-postgres.yml index 1861d3f0..fe453125 100644 --- a/examples/docker-compose/renovate-ce-postgres.yml +++ b/examples/docker-compose/renovate-ce-postgres.yml @@ -19,8 +19,7 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ - # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 + MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ From 5ce2ac6a32c7e35796566702ca660cba489c936d Mon Sep 17 00:00:00 2001 From: Justin Clareburt <122523970+justo-mend@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:52:23 +0200 Subject: [PATCH 14/38] Apply suggestions from code review Co-authored-by: Rhys Arkins --- docs/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview.md b/docs/overview.md index ffc8368b..19ec1141 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -2,7 +2,7 @@ ## Overview -Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket. +Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket Server/Data Center. Essentially, it is an alternative to running the `renovate` CLI tool, with the following additions: From d50cd82bf37588b5c85d60cac1e61f1770fcd343 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:37:35 +0200 Subject: [PATCH 15/38] Updated all product references to "Mend Renovate Self-hosted App". Updated all references to Bitbucket to "Bitbucket Data Center" --- docs/README.md | 8 +++--- docs/configuration-options.md | 2 +- docs/overview.md | 26 +++++++++---------- ....md => setup-for-bitbucket-data-center.md} | 24 ++++++++--------- docs/setup-for-github.md | 6 ++--- docs/setup-for-gitlab.md | 6 ++--- helm-charts/mend-renovate-ce/values.yaml | 2 +- helm-charts/mend-renovate-ee/values.yaml | 2 +- 8 files changed, 38 insertions(+), 38 deletions(-) rename docs/{setup-for-bitbucket.md => setup-for-bitbucket-data-center.md} (94%) diff --git a/docs/README.md b/docs/README.md index 4f8275f3..927790c5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# Mend Renovate Self-hosted Documentation +# Mend Renovate Self-hosted App Documentation -This repository provides documentation specific to Mend Renovate Self-hosted - Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). +This repository provides documentation specific to the Mend Renovate Self-hosted Apps - Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). Mend Renovate Community Edition was formerly known as "Mend Renovate On-Premises". @@ -10,7 +10,7 @@ The following platforms are supported by Mend Renovate Community Edition and Ent - GitHub.com - GitHub Enterprise Server - GitLab Enterprise Edition -- Bitbucket Server/Datacenter (in beta) +- Bitbucket Data Center (in beta) ## Documentation contents @@ -19,7 +19,7 @@ The following platforms are supported by Mend Renovate Community Edition and Ent 1. Getting Started - [Setup guide for GitHub](setup-for-github.md) - [Setup guide for GitLab](setup-for-gitlab.md) - - [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) + - [Setup guide for Bitbucket Data Center](setup-for-bitbucket-data-center.md) 1. Configuration - [Self-hosted configuration options](configuration-options.md) - [Configure PostgreSQL DB](configure-postgres-db.md) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 7318c948..e0d008a1 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -1,4 +1,4 @@ -# Mend Renovate Self-hosted Configuration Options +# Mend Renovate Self-hosted App Configuration Options Mend Renovate Enterprise Edition runs with one or more **_Server_** containers and one or more **_Worker_** containers. Mend Renovate Community Edition runs on a single Server container that also performs the Worker actions. diff --git a/docs/overview.md b/docs/overview.md index 19ec1141..2e037366 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,8 +1,8 @@ -# Mend Renovate Self-hosted - Community Edition and Enterprise Edition +# Mend Renovate Self-hosted Apps - Community Edition and Enterprise Edition ## Overview -Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket Server/Data Center. +Mend Renovate Self-hosted Apps (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket Data Center. Essentially, it is an alternative to running the `renovate` CLI tool, with the following additions: @@ -11,16 +11,16 @@ Essentially, it is an alternative to running the `renovate` CLI tool, with the f - Webhook listener to enable dynamic reactions to repository events - Administration APIs for probing the system state or triggering jobs -## Mend Renovate Self-hosted features +## Features of Mend Renovate Self-hosted App #### Job scheduler -The Docker containers for Mend Renovate Self-hosted contain a built-in job scheduler that defaults to enqueing all repositories once per hour. +The Docker containers for Mend Renovate Self-hosted App contain a built-in job scheduler that defaults to enqueing all repositories once per hour. This saves the need for configuring and monitoring any external `cron` process. #### Webhook handler -Mend Renovate Self-hosted also supports a webserver to listen for system webhooks received from the SCM (GitHub, GitLab, Bitbucket). +Mend Renovate Self-hosted App also supports a webserver to listen for system webhooks received from the SCM (GitHub, GitLab, Bitbucket). In particular, it checks webhooks for: @@ -61,7 +61,7 @@ As with Renovate CLI, it can also be configured to interact with an external Red ## Downloading -The Docker images for Mend Renovate Self-hosted are available via GitHub Container Registry (ghcr.io) +The Docker images for Mend Renovate Self-hosted App are available via GitHub Container Registry (ghcr.io) Use of the images are in accordance with the [Mend Terms of Service](https://www.mend.io/terms-of-service/). @@ -74,11 +74,11 @@ Enterprise Edition uses two separate Docker images: The Server image, and the Wo ## Versioning -Mend Renovate Self-hosted products have their own versioning and release schedule, independent of Renovate CLI versioning. +Mend Renovate Self-hosted Apps have their own versioning and release schedule, independent of Renovate CLI versioning. -Additionally, it is intended that Mend Renovate will have a slower release cadence than Renovate CLI in order to provide greater stability for Enterprise use. +Additionally, it is intended that Mend Renovate Self-hosted Apps will have a slower release cadence than Renovate CLI in order to provide greater stability for Enterprise use. -Specifically, use of SemVer for Mend Renovate Self-hosted: +Specifically, use of SemVer for Mend Renovate Self-hosted Apps: **Major**: Used only for breaking changes @@ -100,16 +100,16 @@ When a new version of Mend Renovate is pushed to GHCR, Release Notes will be add Naturally, it is recommended that you use Renovate itself for detecting and updating Mend Renovate versions if you are using a Docker Compose file internally for running Mend Renovate. -## Running Mend Renovate Self-hosted +## Running Mend Renovate Self-hosted App -See the Setup Guides to get started with Mend Renovate Self-hosted +See the Setup Guides to get started with Mend Renovate Self-hosted App - [Setup guide for GitHub](setup-for-github.md) - [Setup guide for GitLab](setup-for-gitlab.md) -- [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) +- [Setup guide for Bitbucket Data Center](setup-for-bitbucket-data-center.md) Examples using Docker Compose can be found at in the [examples directory](../examples). -## Testing Mend Renovate Self-hosted +## Testing Mend Renovate Self-hosted App Request `/health` on your IP address hosting the deployment to check if it is running correctly. diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket-data-center.md similarity index 94% rename from docs/setup-for-bitbucket.md rename to docs/setup-for-bitbucket-data-center.md index 083a660a..3cd9dae8 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket-data-center.md @@ -1,12 +1,12 @@ -# Set up Mend Renovate Self-hosted for Bitbucket +# Set up Mend Renovate Self-hosted App for Bitbucket Data Center -## Configure Renovate Bot Account on Bitbucket +## Configure Renovate Bot Account on Bitbucket Data Center ### 1.a. Configure Renovate Bot User Account -The following configuration instructions are to be performed on Bitbucket Server by a user account with “Admin” or “System admin” global permissions on the Bitbucket Server. +The following configuration instructions are to be performed on Bitbucket Data Center by a user account with “Admin” or “System admin” global permissions on Bitbucket Data Center. -- Log in to Bitbucket Server with admin user (eg. http://localhost:7990)
+- Log in to Bitbucket Data Center with admin user (eg. http://localhost:7990)
Note: Bitbucket Admin user permissions - Must be at least “Admin” to create a new user account.
Also, only repo admins can add the Renovate Bot user and webhooks. @@ -92,7 +92,7 @@ Example files available here: Edit the docker files / helm chart values to provide the required environment variables. Refer to [Configurations Options](configuration-options.md) for a full list of Renovate CE/EE server variables. -#### Bitbucket Server Connection details +#### Bitbucket Data Center Connection details # Install Renovate Bot and Webhooks on BitBucket project or repository @@ -112,7 +112,7 @@ Note: Any Bitbucket user with global permissions of Admin or System admin has fu ### Note: - Adding the Renovate Bot user to a **project** will install Renovate on **all repositories** in the project (current and future). -- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on the Bitbucket server. +- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on Bitbucket Data Center. ### How to add Renovate Bot to a Repository @@ -216,7 +216,7 @@ To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access ![bb-admin-token.png](images/bb-admin-token.png) -- Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. +- Press “Create token” to create the Bearer token required for calling Bitbucket Data Center webhook APIs. Note: - To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
@@ -283,7 +283,7 @@ Body: (raw - JSON) **Provide the following values:** - name: Can be anything. Duplicate names are allowed. - url: The URL and port of the Renovate Server. - - Note: Ensure ports are open to receiving incoming calls from the Bitbucket server. + - Note: Ensure ports are open to receiving incoming calls from Bitbucket Data Center. - secret: The Webhook secret defined in the MEND_RNV_WEBHOOK_SECRET environment variable on the Renovate Server. ### Allow Renovate CE/EE to create Repository webhooks via Bitbucket API @@ -296,9 +296,9 @@ Notes: `MEND_RNV_ADMIN_TOKEN` 1. Recommended to use a different token than the token for Renovate bot user 2. This admin token is only used for searching/adding and removing of webhooks on repository level -## Run Mend Renovate Self-hosted +## Run Mend Renovate Self-hosted App -You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted App from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** @@ -321,7 +321,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Server installation. Include the trailing slash. +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Data Center installation. Include the trailing slash. **`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. @@ -329,7 +329,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` -**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus '/webhook'. Must be accessible to receive incoming calls from the BitBucket server. +**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus '/webhook'. Must be accessible to receive incoming calls from the BitBucket Data Center. **`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. Required if `MEND_RNV_WEBHOOK_URL` is set. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index ce638b1e..b2a1a442 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -1,4 +1,4 @@ -# Set up Mend Renovate Self-hosted for GitHub +# Set up Mend Renovate Self-hosted App for GitHub ## Create and Configure the GitHub App (bot) @@ -45,9 +45,9 @@ If you don't care about the value, then enter 'renovate' as that is the default You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. -## Run Mend Renovate Self-hosted +## Run Mend Renovate Self-hosted App -You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted App from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index 2149a47e..e74f00e4 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -1,4 +1,4 @@ -# Set up Mend Renovate Self-hosted for GitLab +# Set up Mend Renovate Self-hosted App for GitLab ## Configure Renovate Bot Account on GitLab @@ -51,9 +51,9 @@ In the Repository settings, create a Webhook with the following settings: This will need to be repeated for every repository that is onboarded to the Renovate Bot account. It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. -## Run Mend Renovate Self-hosted +## Run Mend Renovate Self-hosted App -You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted App from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** diff --git a/helm-charts/mend-renovate-ce/values.yaml b/helm-charts/mend-renovate-ce/values.yaml index b8cbad16..f43da551 100644 --- a/helm-charts/mend-renovate-ce/values.yaml +++ b/helm-charts/mend-renovate-ce/values.yaml @@ -47,7 +47,7 @@ renovate: mendRnvBitbucketPat: # Optional: The URL of the Renovate Server plus '/webhook' suffix. - # Must be accessible to receive incoming calls from the BitBucket server. + # Must be accessible to receive incoming calls from BitBucket Data Center. mendRnvWebhookURL: # Optional: A token used for searching/adding/removing repository webhooks. diff --git a/helm-charts/mend-renovate-ee/values.yaml b/helm-charts/mend-renovate-ee/values.yaml index 706f6cf4..5834a997 100644 --- a/helm-charts/mend-renovate-ee/values.yaml +++ b/helm-charts/mend-renovate-ee/values.yaml @@ -64,7 +64,7 @@ renovateServer: mendRnvBitbucketPat: # Optional: The URL of the Renovate Server plus '/webhook' suffix. - # Must be accessible to receive incoming calls from the BitBucket server. + # Must be accessible to receive incoming calls from BitBucket Data Center. mendRnvWebhookURL: # Optional: A token used for searching/adding/removing repository webhooks. From eae1148e0f1349806c3b74b0ba3f7be2dd03f401 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:42:30 +0200 Subject: [PATCH 16/38] Restored info about the 10-repo license key for Renovate CE --- docs/configuration-options.md | 12 +++++++++++- docs/setup-for-bitbucket-data-center.md | 12 +++++++++++- docs/setup-for-github.md | 12 +++++++++++- docs/setup-for-gitlab.md | 12 +++++++++++- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index e0d008a1..a6a0be02 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -15,7 +15,17 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Contact Mend to request a license key at [mend.io/renovate-community](https://www.mend.io/renovate-community/) +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. diff --git a/docs/setup-for-bitbucket-data-center.md b/docs/setup-for-bitbucket-data-center.md index 3cd9dae8..812d343c 100644 --- a/docs/setup-for-bitbucket-data-center.md +++ b/docs/setup-for-bitbucket-data-center.md @@ -317,7 +317,17 @@ You can run Mend Renovate Self-hosted App from a Docker command line prompt, or **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index b2a1a442..74fcd01a 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -66,7 +66,17 @@ You can run Mend Renovate Self-hosted App from a Docker command line prompt, or **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index e74f00e4..e9d4e1e6 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -72,7 +72,17 @@ You can run Mend Renovate Self-hosted App from a Docker command line prompt, or **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `gitlab`. From 0f1180a08c9e00449429e7b3d68b6ade172efaee Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:47:51 +0200 Subject: [PATCH 17/38] Added "App" to text for link to configuration options page --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 927790c5..64aaac41 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,7 +21,7 @@ The following platforms are supported by Mend Renovate Community Edition and Ent - [Setup guide for GitLab](setup-for-gitlab.md) - [Setup guide for Bitbucket Data Center](setup-for-bitbucket-data-center.md) 1. Configuration - - [Self-hosted configuration options](configuration-options.md) + - [Self-hosted App configuration options](configuration-options.md) - [Configure PostgreSQL DB](configure-postgres-db.md) - [Configure High Server Availability](high-server-availability.md) 1. Migration ([Renovate On-Premises to Renovate Community](./migrating-to-renovate-ce.md)) From a273de85774803591b85439d6d790a8aabc85c5c Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:50:39 +0200 Subject: [PATCH 18/38] Use headings instead of bolding --- docs/configuration-options.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index a6a0be02..845b59b7 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -38,7 +38,7 @@ Use the appropriate settings to define connection details to your specific SCM. **`MEND_RNV_ENDPOINT`**: This is the API endpoint for your SCM. Not required for GitHub.com. Include the trailing slash. -**GitHub connection variables** +#### GitHub connection variables **`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. @@ -49,11 +49,11 @@ Use the appropriate settings to define connection details to your specific SCM. **`MEND_RNV_GITHUB_BOT_USER_ID`**: Optional: The bot user ID that will be used in `gitAuthor` (example author `myBotName[bot] <123456+myBotName[bot]@users.noreply.github.com` and the user id is `123456`). The value can be found by calling `https://api.github.com/users/{appName}[bot]` under the `id` key (replace the `{appName}` with the actual app name). Note: By default Renovate server will attempt to call this endpoint once during startup (both CE and EE server) and it does not require authentication. If you wish to skip this call for any reason you will need to provide the value in `MEND_RNV_GITHUB_BOT_USER_ID=` -**GitLab connection variables** +#### GitLab connection variables **`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. -**Bitbucket connection variables** +#### Bitbucket connection variables **`MEND_RNV_BITBUCKET_USER`**: Renovate Bot user account (“Bitbucket User” access only) @@ -244,7 +244,6 @@ Escalation is reset when no mismatching versions are found during the version ch Note: You can inspect the `Renovate-EE-Version` in the response header of any Renovate API call to see the current version of the responding Server. - **`MEND_RENOVATE_FORKS_PROCESSING`**: controls the value of Renovate `forkProcessing` in the worker. valid values - `disabled`: sets Renovate `forkProcessing=disabled` for all jobs @@ -256,14 +255,12 @@ Note: You can inspect the `Renovate-EE-Version` in the response header of any Re - `forkProcessing=disabled` if "All repositories" - others platforms: `forkProcessing=disabled` - **`MEND_RNV_MERGE_CONFIDENCE_ENDPOINT`**: [Enterprise only] defines the endpoint used to retrieve Merge Confidence data by querying this API. this config option only need to be defined in the server, and it will be passed to the worker automatically. defaults to https://developer.mend.io/. Notes: This option overrides the deprecated `RENOVATE_X_MERGE_CONFIDENCE_API_BASE_URL` flag. - ### Postgres DB Configuration To configure Mend Renovate to use a PostgreSQL database, the following environment variables should be supplied to the Server containers (not required for Worker environment config). From 87405e9093c8fb4b70bfd8926806c4e9ff5ba177 Mon Sep 17 00:00:00 2001 From: Justin Clareburt <122523970+justo-mend@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:03:55 +0200 Subject: [PATCH 19/38] Added the 10-repo licence key for Community Edition (#582) --- docs/configuration-options.md | 12 +++++++++++- docs/configure-renovate-bitbucket-server.md | 12 +++++++++++- docs/configure-renovate-ce-github.md | 10 +++++++++- docs/configure-renovate-ce-gitlab.md | 10 +++++++++- examples/docker-compose/renovate-ce-github.yml | 3 ++- examples/docker-compose/renovate-ce-postgres.yml | 3 ++- examples/env/mend-renovate.env | 5 ++++- helm-charts/mend-renovate-ce/values.yaml | 6 +++--- 8 files changed, 51 insertions(+), 10 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 96c1f1d3..1d3ef4fa 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -15,7 +15,17 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Contact Mend to request a license key at [mend.io/renovate-community](https://www.mend.io/renovate-community/) +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. diff --git a/docs/configure-renovate-bitbucket-server.md b/docs/configure-renovate-bitbucket-server.md index 74fea153..2591bff4 100644 --- a/docs/configure-renovate-bitbucket-server.md +++ b/docs/configure-renovate-bitbucket-server.md @@ -17,7 +17,17 @@ `MEND_RNV_ACCEPT_TOS`: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -`MEND_RNV_LICENSE_KEY`: This should be the license key you obtained after registering at [https://www.mend.io/renovate-community/](https://www.mend.io/renovate-community/). +`MEND_RNV_LICENSE_KEY`: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. `MEND_RNV_PLATFORM`: Set this to `bitbucket-server`. diff --git a/docs/configure-renovate-ce-github.md b/docs/configure-renovate-ce-github.md index 9ff810c3..4be0a283 100644 --- a/docs/configure-renovate-ce-github.md +++ b/docs/configure-renovate-ce-github.md @@ -53,7 +53,15 @@ Mend Renovate requires configuration via environment variables in addition to Re **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: This should be the license key you obtained after registering at [https://www.mend.io/renovate-community/](https://www.mend.io/renovate-community/). +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition. + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). **`MEND_RNV_PLATFORM`**: Set this to `github`. diff --git a/docs/configure-renovate-ce-gitlab.md b/docs/configure-renovate-ce-gitlab.md index 684532db..798489dc 100644 --- a/docs/configure-renovate-ce-gitlab.md +++ b/docs/configure-renovate-ce-gitlab.md @@ -60,7 +60,15 @@ Mend Renovate requires configuration via environment variables in addition to Re **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: This should be the license key you obtained after registering at [https://www.mend.io/renovate-community/](https://www.mend.io/renovate-community/). +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition. + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). **`MEND_RNV_PLATFORM`**: Set this to `gitlab`. diff --git a/examples/docker-compose/renovate-ce-github.yml b/examples/docker-compose/renovate-ce-github.yml index fa76090c..35c060ce 100644 --- a/examples/docker-compose/renovate-ce-github.yml +++ b/examples/docker-compose/renovate-ce-github.yml @@ -17,7 +17,8 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ + MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ + # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ diff --git a/examples/docker-compose/renovate-ce-postgres.yml b/examples/docker-compose/renovate-ce-postgres.yml index fe453125..1861d3f0 100644 --- a/examples/docker-compose/renovate-ce-postgres.yml +++ b/examples/docker-compose/renovate-ce-postgres.yml @@ -19,7 +19,8 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ + MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ + # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ diff --git a/examples/env/mend-renovate.env b/examples/env/mend-renovate.env index 0a7a61eb..6641a7fe 100644 --- a/examples/env/mend-renovate.env +++ b/examples/env/mend-renovate.env @@ -1,5 +1,8 @@ # Essential environment variables for Server and Worker instances -MEND_RNV_LICENSE_KEY= # Enterprise license key. Get License key from Mend.io +MEND_RNV_LICENSE_KEY: Provide a valid license key for Renovate Community Edition or Enterprise Edition +# Use this key for up to 10 repos on Community Edition: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 +# For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ +# For an Enterprise license key. Get License key from Mend.io MEND_RNV_ACCEPT_TOS= # Set to 'Y' to accept Terms of Service MEND_RNV_MC_TOKEN= # Provide token or set to 'auto' to enable Merge Confidence package rules MEND_RNV_SERVER_API_SECRET=abc123 # Required on Server and Worker for internal communication diff --git a/helm-charts/mend-renovate-ce/values.yaml b/helm-charts/mend-renovate-ce/values.yaml index b8cbad16..d6628134 100644 --- a/helm-charts/mend-renovate-ce/values.yaml +++ b/helm-charts/mend-renovate-ce/values.yaml @@ -15,9 +15,9 @@ renovate: # Set this value to 'y' to consent. mendRnvAcceptTos: - # Set this to the key you received by email. - # You can request a license key by submitting the form at https://www.mend.io/renovate-community/. - # Please allow up to 24 hours to receive your license key by email. + # Provide a valid license key for Renovate Community Edition. + # Use this key for up to 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 + # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ mendRnvLicenseKey: # Which platform Mend Renovate will connect to. From 519f73831849ad7768b1257df73ad0a0435c15ea Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:14:24 +0200 Subject: [PATCH 20/38] Added new page for GitHub setup instructions --- docs/configuration-options.md | 4 ++ docs/setup-for-github.md | 101 ++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 docs/setup-for-github.md diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 1d3ef4fa..c6aa6261 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -49,6 +49,10 @@ Note: By default Renovate server will attempt to call this endpoint once during **`MEND_RNV_GITLAB_PAT`**: [GitLab only] Personal Access Token for the GitLab bot account. +**`MEND_RNV_BITBUCKET_USER`**: [Bitbucket only] Renovate Bot user account (“Bitbucket User” access only) + +**`MEND_RNV_BITBUCKET_PAT`**: [Bitbucket only] BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` + **`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` ### Optional Mend Renovate configuration diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md new file mode 100644 index 00000000..1c3a11e3 --- /dev/null +++ b/docs/setup-for-github.md @@ -0,0 +1,101 @@ +# Configuration - Mend Renovate Community Edition for GitHub + +## Create and Configure the GitHub App (bot) + +Before running Mend Renovate, you need to provision it as an App on GitHub, and retrieve the ID + private key provided. + +If you're running a self-hosted instance of GitHub Enterprise, it is suggested to name the app "Renovate" so that it shows up as easily recognizable as "renovate[bot]" in Pull Requests. +If you're running against `github.com` then the name Renovate is already taken by the hosted Mend Renovate app, so you will need something else like "YourCompany Renovate". + +The App requires the following permissions: + +- Repository permissions + - Administration: Read-only + - Checks: Read & write + - Commit statuses: Read & write + - Contents: Read & write + - Dependabot alerts: Read-only (optional) + - Issues: Read & write + - Metadata: Read-only + - Pull Requests: Read & write + - Workflows: Read & write +- Organization permissions + - Members: Read-only + +The App should also subscribe to the following webhook events: + +- Security Advisory +- Check run +- Check suite +- Issues +- Pull request +- Push +- Repository +- Status + +Description, Homepage, User authorization callback URL, and Setup URL are all unimportant so you may set them to whatever you like. + +The Mend Renovate webhook listener binds to port 8080 by default, however it will bind to `process.env.PORT` instead if that is defined. +Note: The Mend Renovate image takes care of exposing port 8080 of the container, so if you change this port then you will need to take care of any exposing/mapping of ports yourself. +In the [Docker Compose example config](https://github.com/mend/renovate-cc-ee/tree/main/examples/), the default port 8080 is used and then mapped to port 80 on the host. + +For the Webhook URL field, point it to `/webhook` on port 80 (or whatever port you mapped to) of the server that you will run Mend Renovate on, e.g. http://1.2.3.4/webhook +Be sure to enter a webhook secret too. +If you don't care about the value, then enter 'renovate' as that is the default secret that the webhook handler process uses. + +You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. + +## Run Mend Renovate + +You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. + +**Example Docker Compose files:** + +- [Mend Renovate Community Edition (GitHub)](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition (GitHub)](../examples/docker-compose/renovate-ee.yml) + +> [!NOTE] +> +> Some configuration of environment variables will be required inside the Docker Compose files. +> +> Essential configuration options are shown below. For a full list of configurable variables, see [Configuration Options](configuration-options.md). + +## Configure Environment Variables + +### Essential Configuration for Mend Renovate + +**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). + +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at [https://www.mend.io/renovate-community/]. For an Enterprise License key, contact Mend at [http://mend.io]. + +**`MEND_RNV_PLATFORM`**: Set this to `github`. + +**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. + +**`MEND_RNV_GITHUB_APP_KEY`**: The private key of the Renovate app on GitHub. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. + +**`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + +**`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. + +**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. + +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to `renovate`. + +**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. + +**`GITHUB_COM_TOKEN`**: [GitHub Enterprise Server only] A Personal Access Token for a user account on github.com (note: _not_ an account on your GitHub Enterprise instance). + +**Additional Configuration options** + +For further details and a list of all available options, see the [Configuration Options](configuration-options.md) page. + +### Renovate CLI Configuration + +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` mounted inside the Mend Renovate container to `/usr/src/app/config.js`. + +**npm Registry** + +If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. From d0009c251a885510d17c7d66b15a3d81e851cf95 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:23:30 +0200 Subject: [PATCH 21/38] Updates to the Config Options page --- docs/configuration-options.md | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index c6aa6261..4e7e3786 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -11,7 +11,7 @@ Separately, you can provide configuration for the Renovate Core. See the end of The following environment variables apply to **Mend Renovate Community Edition** and the **Mend Renovate Enterprise Edition Server**. Environment variables for the **Mend Renovate Enterprise Worker** are in the next section. -### Mend licensing config +### Mend Licensing Config **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). @@ -29,38 +29,44 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. -### Source code management (SCM) connection details +### Connection to the Source Code Management (SCM) This section contains configuration variables for connecting to your source code repository. Use the appropriate settings to define connection details to your specific SCM. **`MEND_RNV_PLATFORM`**: The type of SCM. Options: `github`, `gitlab`, `bitbucket-server`. -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your SCM. Required for self-hosted SCMs; not for GitHub.com. Include the trailing slash. +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your SCM. Not required for GitHub.com. Include the trailing slash. -**`MEND_RNV_GITHUB_APP_ID`**: [GitHub only] The GitHub App ID of the provisioned Renovate app on GitHub. +**GitHub connection variables** -**`MEND_RNV_GITHUB_APP_KEY`**: [GitHub only] A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. +**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. -**`RNV_GITHUB_PEM_FILE_PATH`**: [GitHub only] The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. +**`MEND_RNV_GITHUB_APP_KEY`**: A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. -**`MEND_RNV_GITHUB_BOT_USER_ID`**: [GitHub only] Optional: The bot user ID that will be used in `gitAuthor` (example author `myBotName[bot] <123456+myBotName[bot]@users.noreply.github.com` and the user id is `123456`). The value can be found by calling `https://api.github.com/users/{appName}[bot]` under the `id` key (replace the `{appName}` with the actual app name). +**`RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. + +**`MEND_RNV_GITHUB_BOT_USER_ID`**: Optional: The bot user ID that will be used in `gitAuthor` (example author `myBotName[bot] <123456+myBotName[bot]@users.noreply.github.com` and the user id is `123456`). The value can be found by calling `https://api.github.com/users/{appName}[bot]` under the `id` key (replace the `{appName}` with the actual app name). Note: By default Renovate server will attempt to call this endpoint once during startup (both CE and EE server) and it does not require authentication. If you wish to skip this call for any reason you will need to provide the value in `MEND_RNV_GITHUB_BOT_USER_ID=` -**`MEND_RNV_GITLAB_PAT`**: [GitLab only] Personal Access Token for the GitLab bot account. +**GitLab connection variables** -**`MEND_RNV_BITBUCKET_USER`**: [Bitbucket only] Renovate Bot user account (“Bitbucket User” access only) +**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. -**`MEND_RNV_BITBUCKET_PAT`**: [Bitbucket only] BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` +**Bitbucket connection variables** -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` +**`MEND_RNV_BITBUCKET_USER`**: Renovate Bot user account (“Bitbucket User” access only) + +**`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` -### Optional Mend Renovate configuration +### Server Config Options **`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Not required if SCM is GitHub.com. +**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` + **`MEND_RNV_SERVER_API_SECRET`**: [Required if APIs enabled. Required on Renovate Enterprise Server] Set an API secret. Must match the Worker instances and Admin APIs for communicating with the Server. **`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. From fd21f6a65d2fc71fc6628a3ba0fbbb75e1e0c275 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:29:12 +0200 Subject: [PATCH 22/38] Updates to the GitHub setup page --- docs/setup-for-github.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 1c3a11e3..82b2bcf0 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -66,7 +66,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at [https://www.mend.io/renovate-community/]. For an Enterprise License key, contact Mend at [http://mend.io]. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. @@ -74,7 +74,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_GITHUB_APP_KEY`**: The private key of the Renovate app on GitHub. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. -**`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. +**`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for a GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_APP_KEY`. **`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. @@ -82,7 +82,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. -**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to `renovate`. +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. **`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. @@ -94,7 +94,7 @@ For further details and a list of all available options, see the [Configuration ### Renovate CLI Configuration -Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` mounted inside the Mend Renovate container to `/usr/src/app/config.js`. +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file mounted to `/usr/src/app/config.js` inside the Mend Renovate container. **npm Registry** From 776d83c72724606625c4c21ff8bbf0bbf75b4690 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Sun, 25 Aug 2024 23:30:55 +0200 Subject: [PATCH 23/38] Updates to the GitHub setup page --- docs/setup-for-github.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 82b2bcf0..400f2ebf 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -76,6 +76,8 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for a GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_APP_KEY`. +**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. + **`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. **`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. @@ -84,8 +86,6 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. -**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. - **`GITHUB_COM_TOKEN`**: [GitHub Enterprise Server only] A Personal Access Token for a user account on github.com (note: _not_ an account on your GitHub Enterprise instance). **Additional Configuration options** From 4b26742bdd6df1f1abe109f2a72f4896abf6c72c Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:02:12 +0200 Subject: [PATCH 24/38] Added setup doc for GitLab --- docs/setup-for-github.md | 20 ++++---- docs/setup-for-gitlab.md | 103 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 10 deletions(-) create mode 100644 docs/setup-for-gitlab.md diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 400f2ebf..bd23e61e 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -1,4 +1,4 @@ -# Configuration - Mend Renovate Community Edition for GitHub +# Set up Mend Renovate Self-hosted for GitHub ## Create and Configure the GitHub App (bot) @@ -45,14 +45,14 @@ If you don't care about the value, then enter 'renovate' as that is the default You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. -## Run Mend Renovate +## Run Mend Renovate Self-hosted -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** -- [Mend Renovate Community Edition (GitHub)](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition (GitHub)](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) > [!NOTE] > @@ -62,7 +62,7 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke ## Configure Environment Variables -### Essential Configuration for Mend Renovate +### Essential Configuration for Mend Renovate Server **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). @@ -70,16 +70,16 @@ You can run Mend Renovate from a Docker command line prompt, or by using a Docke **`MEND_RNV_PLATFORM`**: Set this to `github`. +**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + **`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. **`MEND_RNV_GITHUB_APP_KEY`**: The private key of the Renovate app on GitHub. Alternatively, use `MEND_RNV_GITHUB_PEM_FILE_PATH`. **`MEND_RNV_GITHUB_PEM_FILE_PATH`**: The file path for a GitHub app key PEM file. Defaults to `/usr/src/app/renovate.private-key.pem`. Alternatively, use `MEND_RNV_GITHUB_APP_KEY`. -**`MEND_RNV_ENDPOINT`**: [GitHub Enterprise Server only] This is the API endpoint for your GitHub Enterprise installation. Include the trailing slash. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - **`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md new file mode 100644 index 00000000..f7d1c442 --- /dev/null +++ b/docs/setup-for-gitlab.md @@ -0,0 +1,103 @@ +# Set up Mend Renovate Self-hosted for GitLab + +## Configure Renovate Bot Account on GitLab + +### Renovate Bot Account + +Create a GitLab user account to act as the "Renovate Bot". +If you are running your own instance of GitLab, it's suggested to name the account "Renovate Bot" with username "renovate-bot". + +Note: In GitLab, the "Renovate Bot" is not an App or Plugin; it's a GitLab user account that's been given the right permissions and System Hooks. +You should use a dedicated "bot account" for Renovate, instead of using someone's personal user account. +Apart from reducing the chance of conflicts, it is better for teams if the actions they see from Renovate are clearly marked as coming from a dedicated bot account and not from a teammate's account, which could be confusing at times. +e.g. Did the bot automerge that PR, or did a human do it? + +### Personal Access Token + +Once the account is created, create a Personal Access Token for it with the following permissions: + * `api` + * `read_user` + * `write_repository` + +### System Hook + +To activate Mend Renovate's webhook ability, create a System Hook that points to the Renovate installation. + +Create a System Hook (in Admin area) + +1. Set the webhook URL to point to the Renovate server url followed by `/webhook`. (e.g. `http://renovate.yourcompany.com:8080/webhook` or `https://1.2.3.4/webhook`) +2. Set the webhook secret to the same value configured for `MEND_RNV_WEBHOOK_SECRET` (defaults to `renovate`) +3. Set Hook triggers for: + * `Push events` + * `Merge request events` + +Remember: Renovate's webhook listener binds to port 8080 inside its container, but you can map it (using Docker) to whatever external port you require, including port 80. + +Set the "Secret Token" to the same value configured for `MEND_RNV_WEBHOOK_SECRET`, or set it to `"renovate"` if you left it as default. + +Once your System Hook is added, Renovate's webhook handler will receive events from _all_ repositories. +Therefore, Renovate maintains a list of all repositories it has access to and discards events from all others. + +### Repo Webhooks + +Because Issue events aren't included in System hooks, a webhook must be individually configured for each repository in which you want the Dependency Dashboard issue to be interactive. + +In the Repository settings, create a Webhook with the following settings: +1. Set the webhook URL - same as System Hook URL +2. Set the webhook secret - same as System Hook secret +3. Set Hook triggers for: + * `Issue events` + +This will need to be repeated for every repository that is onboarded to the Renovate Bot account. +It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. + +## Run Mend Renovate Self-hosted + +You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. + +**Example Docker Compose files:** + +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) + +> [!NOTE] +> +> Some configuration of environment variables will be required inside the Docker Compose files. +> +> Essential configuration options are shown below. For a full list of configurable variables, see [Configuration Options](configuration-options.md). + +## Configure Environment Variables + +### Essential Configuration for Mend Renovate Sever + +**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). + +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. + +**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. + +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitLab host. e.g. like `https://gitlab.company.com/api/v4/`. Include the trailing slash. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + +**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. + +**`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. + +**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. + +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. + +**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com + +**Additional Configuration options** + +For further details and a list of all available options, see the [Configuration Options](configuration-options.md) page. + +### Renovate CLI Configuration + +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file mounted to `/usr/src/app/config.js` inside the Mend Renovate container. + +**npm Registry** + +If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. From 0aba6186b7d8ef91dfeb46092785c5a69d804f4d Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:03:56 +0200 Subject: [PATCH 25/38] Update to GitLab setup doc --- docs/setup-for-gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index f7d1c442..b54d5721 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -86,7 +86,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. -**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitHub webhooks. Defaults to 'renovate'. +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitLab webhooks. Defaults to 'renovate'. **`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com From 9683d69ccfee4332ae9ae78de2791b4ade5c621c Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:12:37 +0200 Subject: [PATCH 26/38] Added setup doc for Bitbucket --- docs/setup-for-bitbucket.md | 354 ++++++++++++++++++++++++++++++++++++ 1 file changed, 354 insertions(+) create mode 100644 docs/setup-for-bitbucket.md diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md new file mode 100644 index 00000000..e017360b --- /dev/null +++ b/docs/setup-for-bitbucket.md @@ -0,0 +1,354 @@ +# Set up Mend Renovate Self-hosted for Bitbucket + +## Configure Renovate Bot Account on Bitbucket + +### 1.a. Configure Renovate Bot User Account + +The following configuration instructions are to be performed on Bitbucket Server by a user account with “Admin” or “System admin” global permissions on the Bitbucket Server. + +- Log in to Bitbucket Server with admin user (eg. http://localhost:7990)
+Note: Bitbucket Admin user permissions - Must be at least “Admin” to create a new user account.
+Also, only repo admins can add the Renovate Bot user and webhooks. + +- Navigate to the User settings page in Administration (Settings → Accounts/Users)
+eg. http://localhost:7990/admin/users + +![bb-admin-users.png](images%2Fbb-admin-users.png) + +- Click “Create user” to create an account for the Renovate Bot user. (eg. http://localhost:7990/admin/users?create) + +We recommend calling the account “Renovate Bot”. +- Username: “renovate-bot” +- Full name: “Renovate Bot” + +![bb-create-user.png](images%2Fbb-create-user.png) + +- Note: The Renovate Bot user will be the author of Renovate pull requests. + +![bb-renovate-bot.png](images%2Fbb-renovate-bot.png) + +- Give the Renovate Bot user basic Bitbucket user access (only required so a HTTP Token can be created through the UI) + - Under Global permissions, in the User Access section, click into the table header bar (where it says “Add Users”) and search for the Renovate Bot user. + - Leave the access level at “Bitbucket User”. + - Press “Add” + +![bb-user-access-1.png](images%2Fbb-user-access-1.png) + +- The end results should be a Renovate Bot user with “Bitbucket User” access only. + +![bb-user-access-2.png](images%2Fbb-user-access-2.png) + +
+Note: It is essential that the Renovate Bot user does NOT have Admin or System admin access. Because Bitbucket Admin and System admin users have full access to all projects and repos, there will be no way to control which repos Renovate will run against, and so Renovate will run against all repos. When the Renovate Bot user has only basic user access, administrators can control which repos run with Renovate by adding the Renovate Bot user to specific repos. +
+ +# Stage 1b: Fetch HTTP Access Token for the Renovate Bot user + +Once the Renovate Bot user account is created, log in to Bitbucket with the Renovate User account to fetch an HTTP access token for it. This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. +It will be used by Renovate OSS CLI to connect to repos on Bitbucket that the Renovate User has access to. + +- Log in to Bitbucket as the Renovate User
+http://localhost:7990/login + +**_Don’t use the Admin user account!_** +- If logged in as an Admin user account, log out of Bitbucket first. +- Alternatively, open a new web browser in incognito mode. _(Ctrl+Shift+N from a web browser)_ + +![bb-log-in.png](images%2Fbb-log-in.png) + +- Go to the Account management page (eg. http://localhost:7990/account) + +You can expand the menu on the user profile icon (top right of page) and click “Manage account”. + +![bb-manage-account.png](images%2Fbb-manage-account.png) + +- Navigate to the HTTP access tokens page + +- Press “Create token” to create a new HTTP access token + +![bb-access-token.png](images%2Fbb-access-token.png) + +- Create an HTTP access token (with `Repository Write` permission) + - Token name: Can be anything (eg. “Renovate User PAT”) + - Permissions: + - Project permissions: `Project read` + - Repository permissions: `Repository write` + +![bb-new-token.png](images%2Fbb-new-token.png) + +- Copy the token and store it for later use.
+This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. + +
+ +# Stage 2: Install Renovate CE/EE Application Server + +## Configure the Docker files / Helm charts +Fetch the example docker-compose file or Helm chart configuration files and edit accordingly. +Example files available here: +- Docker files (Renovate CE / Renovate EE) +- Helm charts (Renovate CE / Renovate EE) + +Edit the docker files / helm chart values to provide the required environment variables. +Refer to [Available Configurations section](#available_config) for a full list of Renovate CE/EE server variables. + +#### Bitbucket Server Connection details + +# Install Renovate Bot and Webhooks on BitBucket project or repository + +## Stage 3a: Install Renovate Bot on Repositories(/Projects) + +### Overview +Add the Renovate Bot user to any repo (or project) you want Renovate to run on. +Needs “Repository Write” permission so that it can create pull requests on the repo. + +### How it works +Renovate will run scans and create PRs on repositories in which the Renovate Bot user has Write access. +So, to install Renovate on a repository, add the Renovate Bot user to the Repository permissions for the repositories or projects you want it installed on. + +### Permissions required to install the Renovate Bot user +This must be done by a user with Repository Admin permission to the specific repository being added. +Note: Any Bitbucket user with global permissions of Admin or System admin has full access to every project and repository. + +### Note: +- Adding the Renovate Bot user to a **project** will install Renovate on **all repositories** in the project (current and future). +- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on the Bitbucket server. + +### How to add Renovate Bot to a Repository + +- Navigate to the Repository Settings page for a specific repository.
+Repo → Repository Settings → Repository permissions + +Repo settings page: http://localhost:7990/projects/PROJ1/repos/repo-1/permissions +![bb-repo-permissions.png](images%2Fbb-repo-permissions.png) + +- Click the “Add user or group” button (Top right corner) + +- Add the Renovate Bot user with permission: Repository Write
+ Note: The Renovate Bot user needs write permission so it can create pull requests on the repository. + +![bb-add-user.png](images%2Fbb-add-user.png) + +Now the Renovate Bot is installed on the repo. + +The Renovate server will detect the new repo on the next App Sync. + +### Run App Sync to detect new repositories + +**App Sync on schedule** + +App Sync runs on a schedule, which defaults to every 4 hours. +To update the schedule, set the EnvVar MEND_RNV_CRON_APP_SYNC on the Renovate Server. +Accepts a 5-part cron schedule. Defaults to `0 */4* * * *` (every 4 hours, on the hour). + +**Force App Sync via API call** + +To trigger the sync immediately, call the sync API (/api/sync) using a tool like Postman. +Requires + +Note: To run APIs, ensure Renovate Server has EnvVar `MEND_RNV_ADMIN_API_ENABLED=true` + +``` +[POST] http:///api/sync +Authorization: +``` + +![bb-postman-sync.png](images%2Fbb-postman-sync.png) + +
+ +## Stage 3b: Add Webhooks to Repositories(/Projects) + +Webhooks enable a message to be sent from the Bitbucket repository to the Renovate server to trigger a Renovate job on a repository when important files have changed (ie. package files, Renovate config files). + +Webhooks can be enabled at the project level or at the repository level. + +Note: Only a Bitbucket user with Admin or System Admin global permissions can create web hooks on a project or repository. +Create webhooks via the Bitbucket UI + +**To create a webhook on a repository:** + +- Navigate to the repository in which you want to add a webhook + +- Go to the Repository settings and the Webhooks settings page (under Workflow menu)
+ [Repo → Repository Settings → Webhooks]
+ http://localhost:7990/projects/PROJ1/repos/repo-1/settings + +![bb-repo-webhooks.png](images%2Fbb-repo-webhooks.png) + +- Click “Create webhook” to open the Create webhook page + +![bb-create-webhook-1.png](images%2Fbb-create-webhook-1.png) + +**Provide the following values for the webhook:** +- Name: Can be anything. Duplicates are allowed. +- URL: The URL of the Renovate Server plus “/webhook”. Must be accessible to receive incoming calls from the Bitbucker server. +- Status: Active (true) +- Secret: Must match the value in `MEND_RNV_WEBHOOK_SECRET`. (Defaults to ‘renovate’) +- Authentication: None +- SSL/TLS: (Do not skip certificate verification) +- Events: + - Project: Modified (Only available when creating Project webhooks) + - Repository: Push, Modified + - Pull request: Modified + +![bb-create-webhook-2.png](images%2Fbb-create-webhook-2.png) + +- Click “Save” to finish creating the webhook + +Webhooks will now be triggered when relevant events occur on the repository. +Renovate jobs will automatically run on the triggering repository as required. + +### Create webhooks via the Bitbucket API + +Run Bitbucket API to create webhooks on repositories and projects. + +**Permissions** + +Only Bitbucket users with Admin or System admin global permissions can create webhooks on projects or repositories. +To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access token as a Bearer Authorization token in the API header. + +#### Fetch the Authorization Bearer token + +- Log in to Bitbucket as a user with Admin or System admin global permissions +- Navigate to the HTTP access tokens page
+ http://localhost:7990/plugins/servlet/access-tokens/users/admin/manage + +![bb-admin-token.png](images%2Fbb-admin-token.png) + +- Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. + +Note: +- To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
+- To create **repository** webhooks, the HTTP access token must have `Repository Admin` permissions. (Project Admin not required.) + +![bb-create-admin-token.png](images%2Fbb-create-admin-token.png) + +- Click “Create” to finish creating the access token +- Copy the access token when it is presented. Store it for use when calling Bitbucket Admin APIs. + +### Create Repository webhooks via Bitbucket API + +``` +[POST] - http:///rest/api/latest/projects//repos//webhooks + +Authorization: Bearer +``` + +Body: (raw - JSON) +```json +{ + "name": "renovate", + "url": "https:///webhook", + "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET + "events": [ + "repo:refs_changed", + "repo:modified", + "pr:modified" + ], + "active": true, + "statistics": {}, + "scopeType": "repository", + "sslVerificationRequired": false +} +``` + +### Create Project webhooks via Bitbucket API + +``` +POST http:///rest/api/latest/projects//webhooks + +Authorization: Bearer +``` + +Body: (raw - JSON) +```json +{ + "name": "renovate", + "url": "https:///webhook", + "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET + "events": [ + "pr:modified", ← Optional: Add this if you want ALL repos on the project to trigger + "repo:refs_changed", ← Optional: Add this if you want ALL repos on the project to trigger + "repo:modified", ← Optional: Add this if you want ALL repos on the project to trigger + "project:modified" + ], + "active": true, + "statistics": {}, + "scopeType": "repository", + "sslVerificationRequired": false +} +``` + +**Provide the following values:** +- name: Can be anything. Duplicate names are allowed. +- url: The URL and port of the Renovate Server. + - Note: Ensure ports are open to receiving incoming calls from the Bitbucket server. +- secret: The Webhook secret defined in the MEND_RNV_WEBHOOK_SECRET environment variable on the Renovate Server. + +### Allow Renovate CE/EE to create Repository webhooks via Bitbucket API + +By setting the values of the two environment variables `MEND_RNV_WEBHOOK_URL` and `MEND_RNV_ADMIN_TOKEN` +the server will manage the repositories webhooks automatically + + +Notes: `MEND_RNV_ADMIN_TOKEN` +1. Recommended to use a different token than the token for Renovate bot user +2. This admin token is only used for searching/adding and removing of webhooks on repository level + +## Run Mend Renovate Self-hosted + +You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. + +**Example Docker Compose files:** + +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) + +> [!NOTE] +> +> Some configuration of environment variables will be required inside the Docker Compose files. +> +> Essential configuration options are shown below. For a full list of configurable variables, see [Configuration Options](configuration-options.md). + +## Configure Environment Variables + +### Essential Configuration for Mend Renovate Sever + +**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). + +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. + +**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. + +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Server installation. Include the trailing slash. + +**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. + +**`MEND_RNV_BITBUCKET_USER`**: Renovate Bot user account (“Bitbucket User” access only) + +**`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` + +**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus `/webhook`. Must be accessible to receive incoming calls from the BitBucket server. + +**`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. required if `MEND_RNV_WEBHOOK_URL` is set. + +**`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. + +**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. + +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitLab webhooks. Defaults to 'renovate'. + +**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com + +**Additional Configuration options** + +For further details and a list of all available options, see the [Configuration Options](configuration-options.md) page. + +### Renovate CLI Configuration + +Renovate CLI functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file mounted to `/usr/src/app/config.js` inside the Mend Renovate container. + +**npm Registry** + +If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. From 48183e17ef137618fba3d9e31fbb42c168e24e22 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:16:00 +0200 Subject: [PATCH 27/38] Updates to Bitbucket setup doc --- docs/setup-for-bitbucket.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index e017360b..fabd630b 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -319,7 +319,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. -**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. +**`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. **`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Server installation. Include the trailing slash. @@ -329,15 +329,15 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` -**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus `/webhook`. Must be accessible to receive incoming calls from the BitBucket server. +**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus '/webhook'. Must be accessible to receive incoming calls from the BitBucket server. -**`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. required if `MEND_RNV_WEBHOOK_URL` is set. +**`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. Required if `MEND_RNV_WEBHOOK_URL` is set. **`MEND_RNV_ADMIN_API_ENABLED`**: Set to 'true' to enable Admin APIs. Defaults to 'false'. **`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled, or if running Enterprise Edition. -**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the GitLab webhooks. Defaults to 'renovate'. +**`MEND_RNV_WEBHOOK_SECRET`**: Must match the secret sent by the Bitbucket webhooks. Defaults to 'renovate'. **`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com From 48d04ecc99daa5cf39f6b0d398e3d3bbd739f1b9 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:22:17 +0200 Subject: [PATCH 28/38] Update product name to "Mend Renovate Self-hosted" --- docs/README.md | 6 +++--- docs/configuration-options.md | 2 +- docs/overview.md | 30 +++++++++++++++--------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/README.md b/docs/README.md index f947d100..df4a1406 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,8 +1,8 @@ -# Mend Renovate Community Edition and Enterprise Edition Documentation +# Mend Renovate Self-hosted Documentation -This repository provides documentation specific to Mend Renovate Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). +This repository provides documentation specific to Mend Renovate Self-hosted - Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). -Mend Renovate CE was formerly known as "Mend Renovate On-Premises". +Mend Renovate Community Edition was formerly known as "Mend Renovate On-Premises". ## Supported platforms diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 4e7e3786..37b2c736 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -1,4 +1,4 @@ -# Mend Renovate Configuration Options +# Mend Renovate Self-hosted Configuration Options Mend Renovate Enterprise Edition runs with one or more **_Server_** containers and one or more **_Worker_** containers. Mend Renovate Community Edition runs on a single Server container that also performs the Worker actions. diff --git a/docs/overview.md b/docs/overview.md index 04623f6c..26418d92 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,8 +1,8 @@ -# Mend Renovate Community Edition and Enterprise Edition +# Mend Renovate Self-hosted - Community Edition and Enterprise Edition ## Overview -Mend Renovate Community Edition (Renovate CE) and Enterprise Edition (Renovate EE) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub or GitLab. +Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket. Essentially, it is an alternative to running the `renovate` CLI tool, with the following additions: @@ -11,18 +11,18 @@ Essentially, it is an alternative to running the `renovate` CLI tool, with the f - Webhook listener to enable dynamic reactions to repository events - Administration APIs for probing the system state or triggering jobs -## Mend Renovate features +## Mend Renovate Self-hosted features #### Job scheduler -The Mend Renovate's Docker container contains a built-in job scheduler that defaults to enqueing all repositories once per hour. +The Docker containers for Mend Renovate Self-hosted contain a built-in job scheduler that defaults to enqueing all repositories once per hour. This saves the need for configuring and monitoring any external `cron` process. #### Webhook handler -Mend Renovate also supports a webserver to listen for system webhooks received from GitLab. +Mend Renovate Self-hosted also supports a webserver to listen for system webhooks received from the SCM (GitHub, GitLab, Bitbucket). -In particular, Renovate checks webhooks for: +In particular, it checks webhooks for: - Projects it has just been added to - Commits to `main` branch for "important" files such as `package.json` and `renovate.json` @@ -54,10 +54,10 @@ Logically, Mend Renovate consists of four components: - Listens for webhook events from GitHub/GitLab, on path `/webhook` - Adds high priority jobs to the job queue if event conditions are met (e.g. a merged or closed Renovate PR, an update to an existing Renovate PR, a commit to `renovate.json` in `main` branch, etc) 4. Worker - - A wrapper on Renovate OSS, it runs non-stop, retrieving the highest priority job (repository) from the queue one at a time + - A wrapper on Renovate CLI, it runs non-stop, retrieving the highest priority job (repository) from the queue one at a time All four components run within a shared container. -As with Renovate OSS, it can also be configured to interact with an external Redis server as an alternative to the default disk-based cache. +As with Renovate CLI, it can also be configured to interact with an external Redis server as an alternative to the default disk-based cache. ## Downloading @@ -66,11 +66,11 @@ Use of the image is in accordance with the [Mend Terms of Service](https://www.m ## Versioning -Mend Renovate products have their own versioning and release schedule, independent of Renovate OSS versioning. +Mend Renovate Self-hosted products have their own versioning and release schedule, independent of Renovate CLI versioning. -Additionally, it is intended that Mend Renovate will have a slower release cadence than Renovate OSS in order to provide greater stability for Enterprise use. +Additionally, it is intended that Mend Renovate will have a slower release cadence than Renovate CLI in order to provide greater stability for Enterprise use. -Specifically for Mend Renovate's use of SemVer: +Specifically, use of SemVer for Mend Renovate Self-hosted: **Major**: Used only for breaking changes @@ -80,19 +80,19 @@ Specifically for Mend Renovate's use of SemVer: i.e. we do not want to ever "break" anyone with a patch release, or have behavior change. -Renovate OSS feature releases (i.e. minor version bumps in Renovate OSS) will therefore only be incorporated into minor releases of Mend Renovate. +Renovate CLI feature releases (i.e. minor version bumps in Renovate CLI) will therefore only be incorporated into minor releases of Mend Renovate. -Typically, multiple Renovate OSS feature releases will be rolled up into a single Mend Renovate release, and release notes will be embedded so that you do not need to look them up separately. +Typically, multiple Renovate CLI feature releases will be rolled up into a single Mend Renovate release, and release notes will be embedded so that you do not need to look them up separately. ## Releasing and Upgrading -The release cadence of Mend Renovate is not fixed, as it will be determined largely by the importance and stability of new Renovate OSS features, which will typically be tested using the hosted Renovate GitHub App first. +The release cadence of Mend Renovate is not fixed, as it will be determined largely by the importance and stability of new Renovate CLI features, which will typically be tested using the hosted Renovate GitHub App first. When a new version of Mend Renovate is pushed to GHCR, Release Notes will be added to this [github.com/mend/renovate-ce-ee](https://github.com/mend/renovate-ce-ee) repository. Naturally, it is recommended that you use Renovate itself for detecting and updating Mend Renovate versions if you are using a Docker Compose file internally for running Mend Renovate. -## Running Mend Renovate +## Running Mend Renovate Self-hosted Examples using Docker Compose can be found at the bottom of the configuration documentation for each product. - Configuration - Renovate Community Edition - ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ce-gitlab.md)) From 3ba8d5d8d3296716ea64bd8f13d1771065e90a6f Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 26 Aug 2024 11:27:24 +0200 Subject: [PATCH 29/38] Add link to Enterprise Edition Docker images on ghcr.io --- docs/overview.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/overview.md b/docs/overview.md index 26418d92..6b2d977e 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -61,8 +61,16 @@ As with Renovate CLI, it can also be configured to interact with an external Red ## Downloading -The Mend Renovate CE image is available via GitHub Container Registry (ghcr.io) using the namespace [mend/renovate-ce](https://ghcr.io/mend/renovate-ce). -Use of the image is in accordance with the [Mend Terms of Service](https://www.mend.io/terms-of-service/). +The Docker images for Mend Renovate Self-hosted are available via GitHub Container Registry (ghcr.io) + +Use of the images are in accordance with the [Mend Terms of Service](https://www.mend.io/terms-of-service/). + +- Community Edition: [mend/renovate-ce](https://ghcr.io/mend/renovate-ce). + +- Enterprise Edition: +Enterprise Edition uses two separate Docker images: The Server image, and the Worker image. + - Server image: [mend/renovate-ee-server](https://ghcr.io/mend/renovate-ee-server) + - Worker image: [mend/renovate-ee-worker](https://ghcr.io/mend/renovate-ee-worker) ## Versioning From 0b0ceb1ed4166345a6da6719c2e99a46b644575c Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Fri, 27 Sep 2024 15:03:55 +0200 Subject: [PATCH 30/38] Updated configuration docs with Setup Guides. Provided information about the 10-repo license key. --- docs/README.md | 10 +- docs/configure-renovate-bitbucket-server.md | 464 -------------------- docs/configure-renovate-ce-github.md | 189 -------- docs/configure-renovate-ce-gitlab.md | 200 --------- docs/configure-renovate-ee-github.md | 217 --------- docs/configure-renovate-ee-gitlab.md | 219 --------- docs/installation-helm.md | 2 +- docs/migrating-to-renovate-ce.md | 2 +- docs/overview.md | 22 +- docs/setup-for-bitbucket.md | 50 ++- docs/setup-for-github.md | 16 +- docs/setup-for-gitlab.md | 16 +- 12 files changed, 82 insertions(+), 1325 deletions(-) delete mode 100644 docs/configure-renovate-ce-gitlab.md delete mode 100644 docs/configure-renovate-ee-github.md delete mode 100644 docs/configure-renovate-ee-gitlab.md diff --git a/docs/README.md b/docs/README.md index df4a1406..4f8275f3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -16,10 +16,14 @@ The following platforms are supported by Mend Renovate Community Edition and Ent 1. [Overview](./overview.md) 1. Installation ([Helm](./installation-helm.md)) +1. Getting Started + - [Setup guide for GitHub](setup-for-github.md) + - [Setup guide for GitLab](setup-for-gitlab.md) + - [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) 1. Configuration - - Renovate Community Edition - ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ce-gitlab.md)) - - Renovate Enterprise Edition - ([GitHub](./configure-renovate-ee-github.md), [GitLab](./configure-renovate-ee-gitlab.md)) - - Configuration - [Environment variables](configuration-options.md) + - [Self-hosted configuration options](configuration-options.md) + - [Configure PostgreSQL DB](configure-postgres-db.md) + - [Configure High Server Availability](high-server-availability.md) 1. Migration ([Renovate On-Premises to Renovate Community](./migrating-to-renovate-ce.md)) 1. API Documentation - [Admin APIs](./api.md) diff --git a/docs/configure-renovate-bitbucket-server.md b/docs/configure-renovate-bitbucket-server.md index 2591bff4..e69de29b 100644 --- a/docs/configure-renovate-bitbucket-server.md +++ b/docs/configure-renovate-bitbucket-server.md @@ -1,464 +0,0 @@ -# Configuration - Mend Renovate CE/EE for Bitbucket Server - - -# Table of Content -* [Available Renovate CE/EE Configurations](#available_config) -* [Installation Stages](#stages) - * [Stage 1: Configure Renovate Bot account on Bitbucket Server](#stg_1) - * [1a: Create a Renovate Bot user account (“Bitbucket User” access only)](#stg_1a) - * [1b: Fetch an HTTP Access Token for the Renovate Bot user (Project Read, Repo Write)](#stg_1b) - * [Stage 2: Install Renovate CE/EE application server (Docker-compose or Kubernetes)](#stg_2) - * [Stage 3: Install Renovate Bot and Webhooks on BitBucket project or repository](#stg_3) - * [3a: Install the Renovate Bot on Repositories](#stg_3a) - * [3b: Add Webhooks to Repositories(/Projects)](#stg_3b) - - -# Available Configurations for CE/EE - -`MEND_RNV_ACCEPT_TOS`: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -`MEND_RNV_LICENSE_KEY`: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. - -`MEND_RNV_PLATFORM`: Set this to `bitbucket-server`. - -`MEND_RNV_ENDPOINT`: This is the API endpoint for your BitBucket Server installation. - -`MEND_RNV_BITBUCKET_USER`: Renovate Bot user account (“Bitbucket User” access only) - -`MEND_RNV_BITBUCKET_PAT`: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` - -`MEND_RNV_WEBHOOK_SECRET`: Optional: Defaults to `renovate` - -`MEND_RNV_WEBHOOK_URL`: Optional: The URL of the Renovate Server plus `/webhook`. Must be accessible to receive incoming calls from the BitBucket server. - -`MEND_RNV_ADMIN_TOKEN`: Optional: A token used for searching/add/removing repository webhooks. required if `MEND_RNV_WEBHOOK_URL` is set. - -`MEND_RNV_ADMIN_API_ENABLED`: Optional: Set to `true` to enable Admin APIs. Defaults to `false`. - -`MEND_RNV_SERVER_API_SECRET`: Required if Admin APIs are enabled. - -`MEND_RNV_SERVER_PORT`: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -`MEND_RNV_CRON_JOB_SCHEDULER`: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not exhaust the available hourly rate limit of the app on GitHub server or cause too much load. - -`MEND_RNV_CRON_APP_SYNC`: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -`MEND_RNV_WORKER_EXECUTION_TIMEOUT`: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -`MEND_RNV_AUTODISCOVER_FILTER`: a string of a comma separated values. (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -`MEND_RNV_SQLITE_FILE_PATH`: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate CE service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (ubuntu) and gid=0 (root). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -`MEND_RNV_LOG_HISTORY_DIR`: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -> [!IMPORTANT] -> Note for EE: Logs are saved by the workers but clean is done by the server, so the corresponding folder must be shared between the Worker and Server containers. - -`MEND_RNV_LOG_HISTORY_TTL_DAYS`: Optional: The number of days to save log files. Defaults to 30. - -`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -`MEND_RNV_MC_TOKEN` _(EE only)_: The merge confidence token used for Smart-Merge-Control authentication - - -# Installation Stages - - -## Stage 1 - - -### 1.a. Configure Renovate Bot User Account - -The following configuration instructions are to be performed on Bitbucket Server by a user account with “Admin” or “System admin” global permissions on the Bitbucket Server. - -- Log in to Bitbucket Server with admin user (eg. http://localhost:7990)
-Note: Bitbucket Admin user permissions - Must be at least “Admin” to create a new user account.
-Also, only repo admins can add the Renovate Bot user and webhooks. - -- Navigate to the User settings page in Administration (Settings → Accounts/Users)
-eg. http://localhost:7990/admin/users - -![bb-admin-users.png](images%2Fbb-admin-users.png) - -- Click “Create user” to create an account for the Renovate Bot user. (eg. http://localhost:7990/admin/users?create) - -We recommend calling the account “Renovate Bot”. -- Username: “renovate-bot” -- Full name: “Renovate Bot” - -![bb-create-user.png](images%2Fbb-create-user.png) - -- Note: The Renovate Bot user will be the author of Renovate pull requests. - -![bb-renovate-bot.png](images%2Fbb-renovate-bot.png) - -- Give the Renovate Bot user basic Bitbucket user access (only required so a HTTP Token can be created through the UI) - - Under Global permissions, in the User Access section, click into the table header bar (where it says “Add Users”) and search for the Renovate Bot user. - - Leave the access level at “Bitbucket User”. - - Press “Add” - -![bb-user-access-1.png](images%2Fbb-user-access-1.png) - -- The end results should be a Renovate Bot user with “Bitbucket User” access only. - -![bb-user-access-2.png](images%2Fbb-user-access-2.png) - -
-Note: It is essential that the Renovate Bot user does NOT have Admin or System admin access. Because Bitbucket Admin and System admin users have full access to all projects and repos, there will be no way to control which repos Renovate will run against, and so Renovate will run against all repos. When the Renovate Bot user has only basic user access, administrators can control which repos run with Renovate by adding the Renovate Bot user to specific repos. -
- - -# Stage 1b: Fetch HTTP Access Token for the Renovate Bot user - -Once the Renovate Bot user account is created, log in to Bitbucket with the Renovate User account to fetch an HTTP access token for it. This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. -It will be used by Renovate OSS CLI to connect to repos on Bitbucket that the Renovate User has access to. - -- Log in to Bitbucket as the Renovate User
-http://localhost:7990/login - -**_Don’t use the Admin user account!_** -- If logged in as an Admin user account, log out of Bitbucket first. -- Alternatively, open a new web browser in incognito mode. _(Ctrl+Shift+N from a web browser)_ - -![bb-log-in.png](images%2Fbb-log-in.png) - -- Go to the Account management page (eg. http://localhost:7990/account) - -You can expand the menu on the user profile icon (top right of page) and click “Manage account”. - -![bb-manage-account.png](images%2Fbb-manage-account.png) - -- Navigate to the HTTP access tokens page - -- Press “Create token” to create a new HTTP access token - -![bb-access-token.png](images%2Fbb-access-token.png) - -- Create an HTTP access token (with `Repository Write` permission) - - Token name: Can be anything (eg. “Renovate User PAT”) - - Permissions: - - Project permissions: `Project read` - - Repository permissions: `Repository write` - -![bb-new-token.png](images%2Fbb-new-token.png) - -- Copy the token and store it for later use.
-This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. - -
- - -# Stage 2: Install Renovate CE/EE Application Server - -## Configure the Docker files / Helm charts -Fetch the example docker-compose file or Helm chart configuration files and edit accordingly. -Example files available here: -- Docker files (Renovate CE / Renovate EE) -- Helm charts (Renovate CE / Renovate EE) - -Edit the docker files / helm chart values to provide the required environment variables. -Refer to [Available Configurations section](#available_config) for a full list of Renovate CE/EE server variables. - -You will need the following information to proceed. - -#### Mend Licence Keys -Renovate CE or Renovate EE licence key -Accept Terms of Service (‘Y’) -Merge Confidence API token - only required if using Smart Merge Control with Renovate EE (ie. `matchConfidence` in package rules) - -#### Bitbucket Server Connection details -Bitbucket server URL (eg, http://localhost:7990/) -Bitbucket Renovate Bot User PAT - See instructions above for getting HTTP access token for Renovate Bot user on Bitbucket - -#### Other strongly recommended Renovate Server environment settings -`MEND_RNV_ADMIN_API_ENABLED` - APIs are off by default. Set this to true to enable admin APIs. -Needs `MEND_RNV_SERVER_API_SECRET` to be set. -`MEND_RNV_SQLITE_FILE_PATH` - Mount the DB file to disc. Ensure volume mount is configured below. -`MEND_RNV_LOG_HISTORY_DIR` - Mount the Renovate job logs (Note: This is the Job logs; Not the server/worker machine logs.) -`RENOVATE_REPOSITORY_CACHE` - Faster performance running Renovate on repos on subsequent scans. - -## Run the Server -If using Docker, run the Docker Compose file after all values have been correctly inserted. - -> docker-compose -f docker-compose-bitbucket.yaml up - -If using Kubernetes, install the Helm charts after all values have been correctly inserted in the values.yaml. - -> helm install renovate-ce - -## Test and Troubleshoot - -#### First, look for Licence Key check -When running the Renovate Application Server, the first thing you should notice is the check for Licence and Terms of Service acceptance. -If you see an error for Licence or Terms of Service, it is a good sign - it means the server is running. Go back and check that the licence key is correctly referenced in the yaml files. - -#### Next, check connection with the Bitbucket Server -The Renovate Server will attempt to validate the Bitbucket Server endpoint and the Renovate User PAT. Errors will be thrown if the endpoint or PAT are incorrect. -Check that the Bitbucket Server is up and running and available on the given endpoint. -The endpoint needs “/api/1.0” on the end [Check this] - -#### Renovate will App Sync and run Renovate on new Repos -If connecting to the Bitbucket Server, an App Sync will occur (by default). Watch this in the logs. No repos will be synced at this stage if the Renovate Bot user has not been added to any repos. However, if the Renovate Bot user has Admin global permission, Renovate will run on ALL repositories on the Bitbucket server. -If there are repos with Renovate Bot installed, watch the logs to see it run. Open the installed repos to see Pull Requests created by “Renovate Bot”. - -#### Check the APIs -- Call the health check - GET /health -- Call the status check - GET /api/status -- Call the task queue - GET /api/task/queue -- Call the job queue - GET /api/job/queue -- Force an app sync - POST /api/sync -- Force a Renovate job on a repo - POST /api/job/add { "repository": ”PROJECT/repo” } - - -# Install Renovate Bot and Webhooks on BitBucket project or repository - - -## Stage 3a: Install Renovate Bot on Repositories(/Projects) -### Overview -Add the Renovate Bot user to any repo (or project) you want Renovate to run on. -Needs “Repository Write” permission so that it can create pull requests on the repo. - -### How it works -Renovate will run scans and create PRs on repositories in which the Renovate Bot user has Write access. -So, to install Renovate on a repository, add the Renovate Bot user to the Repository permissions for the repositories or projects you want it installed on. - -### Permissions required to install the Renovate Bot user -This must be done by a user with Repository Admin permission to the specific repository being added. -Note: Any Bitbucket user with global permissions of Admin or System admin has full access to every project and repository. - -### Note: -- Adding the Renovate Bot user to a **project** will install Renovate on **all repositories** in the project (current and future). -- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on the Bitbucket server. - -### How to add Renovate Bot to a Repository - -- Navigate to the Repository Settings page for a specific repository.
-Repo → Repository Settings → Repository permissions - -Repo settings page: http://localhost:7990/projects/PROJ1/repos/repo-1/permissions -![bb-repo-permissions.png](images%2Fbb-repo-permissions.png) - -- Click the “Add user or group” button (Top right corner) - -- Add the Renovate Bot user with permission: Repository Write
- Note: The Renovate Bot user needs write permission so it can create pull requests on the repository. - -![bb-add-user.png](images%2Fbb-add-user.png) - -Now the Renovate Bot is installed on the repo. - -The Renovate server will detect the new repo on the next App Sync. - -### Run App Sync to detect new repositories - -**App Sync on schedule** - -App Sync runs on a schedule, which defaults to every 4 hours. -To update the schedule, set the EnvVar MEND_RNV_CRON_APP_SYNC on the Renovate Server. -Accepts a 5-part cron schedule. Defaults to `0 */4* * * *` (every 4 hours, on the hour). - -**Force App Sync via API call** - -To trigger the sync immediately, call the sync API (/api/sync) using a tool like Postman. -Requires - -Note: To run APIs, ensure Renovate Server has EnvVar `MEND_RNV_ADMIN_API_ENABLED=true` - -``` -[POST] http:///api/sync -Authorization: -``` - -![bb-postman-sync.png](images%2Fbb-postman-sync.png) - -
- - -## Stage 3b: Add Webhooks to Repositories(/Projects) - -Webhooks enable a message to be sent from the Bitbucket repository to the Renovate server to trigger a Renovate job on a repository when important files have changed (ie. package files, Renovate config files). - -Webhooks can be enabled at the project level or at the repository level. - -Note: Only a Bitbucket user with Admin or System Admin global permissions can create web hooks on a project or repository. -Create webhooks via the Bitbucket UI - -**To create a webhook on a repository:** - -- Navigate to the repository in which you want to add a webhook - -- Go to the Repository settings and the Webhooks settings page (under Workflow menu)
- [Repo → Repository Settings → Webhooks]
- http://localhost:7990/projects/PROJ1/repos/repo-1/settings - -![bb-repo-webhooks.png](images%2Fbb-repo-webhooks.png) - -- Click “Create webhook” to open the Create webhook page - -![bb-create-webhook-1.png](images%2Fbb-create-webhook-1.png) - -**Provide the following values for the webhook:** -- Name: Can be anything. Duplicates are allowed. -- URL: The URL of the Renovate Server plus “/webhook”. Must be accessible to receive incoming calls from the Bitbucker server. -- Status: Active (true) -- Secret: Must match the value in `MEND_RNV_WEBHOOK_SECRET`. (Defaults to ‘renovate’) -- Authentication: None -- SSL/TLS: (Do not skip certificate verification) -- Events: - - Project: Modified (Only available when creating Project webhooks) - - Repository: Push, Modified - - Pull request: Modified - -![bb-create-webhook-2.png](images%2Fbb-create-webhook-2.png) - -- Click “Save” to finish creating the webhook - -Webhooks will now be triggered when relevant events occur on the repository. -Renovate jobs will automatically run on the triggering repository as required. - -### Create webhooks via the Bitbucket API - -Run Bitbucket API to create webhooks on repositories and projects. - -**Permissions** - -Only Bitbucket users with Admin or System admin global permissions can create webhooks on projects or repositories. -To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access token as a Bearer Authorization token in the API header. - -#### Fetch the Authorization Bearer token - -- Log in to Bitbucket as a user with Admin or System admin global permissions -- Navigate to the HTTP access tokens page
- http://localhost:7990/plugins/servlet/access-tokens/users/admin/manage - -![bb-admin-token.png](images%2Fbb-admin-token.png) - -- Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. - -Note: -- To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
-- To create **repository** webhooks, the HTTP access token must have `Repository Admin` permissions. (Project Admin not required.) - -![bb-create-admin-token.png](images%2Fbb-create-admin-token.png) - -- Click “Create” to finish creating the access token -- Copy the access token when it is presented. Store it for use when calling Bitbucket Admin APIs. - -### Create Repository webhooks via Bitbucket API - -``` -[POST] - http:///rest/api/latest/projects//repos//webhooks - -Authorization: Bearer -``` - -Body: (raw - JSON) -```json -{ - "name": "renovate", - "url": "https:///webhook", - "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET - "events": [ - "repo:refs_changed", - "repo:modified", - "pr:modified" - ], - "active": true, - "statistics": {}, - "scopeType": "repository", - "sslVerificationRequired": false -} -``` - -### Create Project webhooks via Bitbucket API - -``` -POST http:///rest/api/latest/projects//webhooks - -Authorization: Bearer -``` - -Body: (raw - JSON) -```json -{ - "name": "renovate", - "url": "https:///webhook", - "configuration": { "secret": "renovate" }, ← Must match MEND_RNV_WEBHOOK_SECRET - "events": [ - "pr:modified", ← Optional: Add this if you want ALL repos on the project to trigger - "repo:refs_changed", ← Optional: Add this if you want ALL repos on the project to trigger - "repo:modified", ← Optional: Add this if you want ALL repos on the project to trigger - "project:modified" - ], - "active": true, - "statistics": {}, - "scopeType": "repository", - "sslVerificationRequired": false -} -``` - -**Provide the following values:** -- name: Can be anything. Duplicate names are allowed. -- url: The URL and port of the Renovate Server. - - Note: Ensure ports are open to receiving incoming calls from the Bitbucket server. -- secret: The Webhook secret defined in the MEND_RNV_WEBHOOK_SECRET environment variable on the Renovate Server. - -### Allow Renovate CE/EE to create Repository webhooks via Bitbucket API - -By setting the values of the two environment variables `MEND_RNV_WEBHOOK_URL` and `MEND_RNV_ADMIN_TOKEN` -the server will manage the repositories webhooks automatically - - -Notes: `MEND_RNV_ADMIN_TOKEN` -1. Recommended to use a different token than the token for Renovate bot user -2. This admin token is only used for searching/adding and removing of webhooks on repository level diff --git a/docs/configure-renovate-ce-github.md b/docs/configure-renovate-ce-github.md index 4be0a283..e69de29b 100644 --- a/docs/configure-renovate-ce-github.md +++ b/docs/configure-renovate-ce-github.md @@ -1,189 +0,0 @@ -# Configuration - Mend Renovate Community Edition for GitHub - -## Create and Configure the GitHub App (bot) - -Before running Mend Renovate, you need to provision it as an App on GitHub, and retrieve the ID + private key provided. - -If you're running a self-hosted instance of GitHub Enterprise, it is suggested to name the app "Renovate" so that it shows up as easily recognizable as "renovate[bot]" in Pull Requests. -If you're running against `github.com` then the name Renovate is already taken by the hosted Mend Renovate app, so you will need something else like "YourCompany Renovate". - -The App requires the following permissions: - -- Repository permissions - - Administration: Read-only - - Checks: Read & write - - Commit statuses: Read & write - - Contents: Read & write - - Dependabot alerts: Read-only (optional) - - Issues: Read & write - - Metadata: Read-only - - Pull Requests: Read & write - - Workflows: Read & write -- Organization permissions - - Members: Read-only - -The App should also subscribe to the following webhook events: - -- Security Advisory -- Check run -- Check suite -- Issues -- Pull request -- Push -- Repository -- Status - -Description, Homepage, User authorization callback URL, and Setup URL are all unimportant so you may set them to whatever you like. - -The Mend Renovate webhook listener binds to port 8080 by default, however it will bind to `process.env.PORT` instead if that is defined. -Note: The Mend Renovate image takes care of exposing port 8080 of the container, so if you change this port then you will need to take care of any exposing/mapping of ports yourself. -In the [Docker Compose example config](https://github.com/mend/renovate-cc-ee/tree/main/examples/), the default port 8080 is used and then mapped to port 80 on the host. - -For the Webhook URL field, point it to `/webhook` on port 80 (or whatever port you mapped to) of the server that you will run Mend Renovate on, e.g. http://1.2.3.4/webhook -Be sure to enter a webhook secret too. -If you don't care about the value, then enter 'renovate' as that is the default secret that the webhook handler process uses. - -You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. - -## Configure Mend Renovate CE - -### Mend Renovate environment variables - -Mend Renovate requires configuration via environment variables in addition to Renovate OSS's regular configuration: - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition. - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). - -**`MEND_RNV_PLATFORM`**: Set this to `github`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitHub Enterprise installation. Required for GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - -**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. - -**`MEND_RNV_GITHUB_APP_KEY`**: A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. - -**`RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate CE service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (ubuntu) and gid=0 (root). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not exhaust the available hourly rate limit of the app on GitHub server or cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Note: This is required if you are using a self-hosted GitHub Enterprise or GitLab instance but should not be configured if your `RENOVATE_ENDPOINT` is `https://api.github.com`. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values. (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container. - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -**`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -### Core Renovate Configuration - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. - -**npm Registry** If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate CE on GitHub - -```yaml -version: "3.6" -services: - renovate: - image: ghcr.io/mend/renovate-ce:-full - restart: on-failure - ports: - - "80:8080" # Receive webhooks on port 80 - environment: - # Optional: Define log level. Set to Debug for more verbose output - # - LOG_LEVEL=DEBUG - # Provide Mend License and accept Terms of Service - - MEND_RNV_ACCEPT_TOS # Set to 'y' to accept the Mend Renovate Terms of Service - - MEND_RNV_LICENSE_KEY # Set this to the key you received by email - # Provide connection details for the GitHub App - - MEND_RNV_PLATFORM=github - - MEND_RNV_ENDPOINT # Required for GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - - MEND_RNV_GITHUB_APP_ID # GitHub App ID - - MEND_RNV_GITHUB_APP_KEY # GitHub App Key (PEM file). Alternatively mount as a volume below - - MEND_RNV_WEBHOOK_SECRET # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # - MEND_RNV_ADMIN_API_ENABLED # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # - MEND_RNV_SERVER_API_SECRET # Required if Admin APIs are enabled - # - MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # - MEND_RNV_CRON_JOB_SCHEDULER # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # - MEND_RNV_CRON_APP_SYNC # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # - GITHUB_COM_TOKEN # Personal Access Token for github.com (used for retrieving changelogs) - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db -``` diff --git a/docs/configure-renovate-ce-gitlab.md b/docs/configure-renovate-ce-gitlab.md deleted file mode 100644 index 798489dc..00000000 --- a/docs/configure-renovate-ce-gitlab.md +++ /dev/null @@ -1,200 +0,0 @@ -# Configuration - Mend Renovate Community Edition for GitLab - -## Configure Renovate Bot Account on GitLab - -### Renovate Bot Account - -Create a GitLab user account to act as the "Renovate Bot". -If you are running your own instance of GitLab, it's suggested to name the account "Renovate Bot" with username "renovate-bot". - -Note: In GitLab, the "Renovate Bot" is not an App or Plugin; it's a GitLab user account that's been given the right permissions and System Hooks. -You should use a dedicated "bot account" for Renovate, instead of using someone's personal user account. -Apart from reducing the chance of conflicts, it is better for teams if the actions they see from Renovate are clearly marked as coming from a dedicated bot account and not from a teammate's account, which could be confusing at times. -e.g. Did the bot automerge that PR, or did a human do it? - -### Personal Access Token - -Once the account is created, create a Personal Access Token for it with the following permissions: - * `api` - * `read_user` - * `write_repository` - -### System Hook - -To activate Mend Renovate's webhook ability, create a System Hook that points to the Renovate installation. - -Create a System Hook (in Admin area) - -1. Set the webhook URL to point to the Renovate server url followed by `/webhook`. (e.g. `http://renovate.yourcompany.com:8080/webhook` or `https://1.2.3.4/webhook`) -2. Set the webhook secret to the same value configured for `MEND_RNV_WEBHOOK_SECRET` (defaults to `renovate`) -3. Set Hook triggers for: - * `Push events` - * `Merge request events` - -Remember: Renovate's webhook listener binds to port 8080 inside its container, but you can map it (using Docker) to whatever external port you require, including port 80. - -Set the "Secret Token" to the same value configured for `MEND_RNV_WEBHOOK_SECRET`, or set it to `"renovate"` if you left it as default. - -Once your System Hook is added, Renovate's webhook handler will receive events from _all_ repositories. -Therefore, Renovate maintains a list of all repositories it has access to and discards events from all others. - -### Repo Webhooks - -Because Issue events aren't included in System hooks, a webhook must be individually configured for each repository in which you want the Dependency Dashboard issue to be interactive. - -In the Repository settings, create a Webhook with the following settings: -1. Set the webhook URL - same as System Hook URL -2. Set the webhook secret - same as System Hook secret -3. Set Hook triggers for: - * `Issue events` - -This will need to be repeated for every repository that is onboarded to the Renovate Bot account. -It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. - - -## Configure Mend Renovate CE - -### Mend Renovate environment variables - -Mend Renovate requires configuration via environment variables in addition to Renovate OSS's regular configuration: - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition. - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). - -**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitLab host. e.g. like `https://gitlab.company.com/api/v4/`. Include the trailing slash. - -**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_API_SECRET`**: Required if Admin APIs are enabled. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate CE service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (ubuntu) and gid=0 (root). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Note: This is required if you are using a self-hosted GitHub Enterprise or GitLab instance but should not be configured if your `RENOVATE_ENDPOINT` is `https://api.github.com`. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container. - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -**`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -### Core Renovate Configuration - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. - -**npm Registry** If using your own npm registry, you may find it easiest to update your `docker-compose.yml` to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Enabling Renovate on Repositories - -To enable Renovate on a repository, in the project's _Settings -> Members_ section, add the bot user and give it `Developer` permissions. - -Remember to add a webhook with "Issue events" to the repository if you wish to enable interactive dashboard issues. (See _Create Repo Webhooks_ above) - -Adding Renovate as a Developer to a repository cause a system hook to be sent to Renovate which in turn enqueues a job for the Renovate Worker. -The repository should receive an onboarding PR immediately after. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate CE on GitLab - -```yaml -version: "3.6" -services: - renovate: - image: ghcr.io/mend/renovate-ce:-full - restart: on-failure - environment: - # Optional: Define log level. Set to Debug for more verbose output - # - LOG_LEVEL=DEBUG - # Provide Mend License and accept Terms of Service - - MEND_RNV_ACCEPT_TOS # Set to 'y' to accept the Mend Renovate Terms of Service - - MEND_RNV_LICENSE_KEY # Set this to the key you received by email - # Provide connection details for the GitLab Bot - - MEND_RNV_PLATFORM=gitlab - - MEND_RNV_ENDPOINT # GitLab endpoint, include trailing slash - - MEND_RNV_GITLAB_PAT # Personal Access Token for bot account - - MEND_RNV_WEBHOOK_SECRET # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # - MEND_RNV_ADMIN_API_ENABLED # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # - MEND_RNV_SERVER_API_SECRET # Required if Admin APIs are enabled - # - MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # - MEND_RNV_CRON_JOB_SCHEDULER # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # - MEND_RNV_CRON_APP_SYNC # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # - GITHUB_COM_TOKEN # Personal Access Token for github.com (used for retrieving changelogs) - ports: - - "80:8080" # Receive webhooks on port 80 - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db -``` diff --git a/docs/configure-renovate-ee-github.md b/docs/configure-renovate-ee-github.md deleted file mode 100644 index 0d3ff077..00000000 --- a/docs/configure-renovate-ee-github.md +++ /dev/null @@ -1,217 +0,0 @@ -# Configuration - Mend Renovate Enterprise Edition for GitHub - -## Create and Configure the GitHub App (bot) - -Before running Mend Renovate, you need to provision it as an App on GitHub, and retrieve the ID + private key provided. - -If you're running a self-hosted instance of GitHub Enterprise, it is suggested to name the app "Renovate" so that it shows up as easily recognizable as "renovate[bot]" in Pull Requests. -If you're running against `github.com` then the name Renovate is already taken by the hosted Mend Renovate app, so you will need something else like "YourCompany Renovate". - -The App requires the following permissions: - -- Repository permissions - - Administration: Read-only - - Checks: Read & write - - Contents: Read & write - - Issues: Read & write - - Metadata: Read-only - - Pull Requests: Read & write - - Commit statuses: Read & write - - Dependabot alerts: Read-only (optional) - - Workflows: Read & write -- Organization permissions - - Members: Read-only - -The App should also subscribe to the following webhook events: - -- Security Advisory -- Check run -- Check suite -- Issues -- Pull request -- Push -- Repository -- Status - -Description, Homepage, User authorization callback URL, and Setup URL are all unimportant so you may set them to whatever you like. - -The Mend Renovate webhook listener binds to port 8080 by default, however it will bind to `process.env.PORT` instead if that is defined. -Note: The Mend Renovate image takes care of exposing port 8080 of the container, so if you change this port then you will need to take care of any exposing/mapping of ports yourself. -In the [Docker Compose example config](https://github.com/mend/renovate-cc-ee/tree/main/examples/), the default port 8080 is used and then mapped to port 80 on the host. - -For the Webhook URL field, point it to `/webhook` on port 80 (or whatever port you mapped to) of the server that you will run Mend Renovate on, e.g. http://1.2.3.4/webhook -Be sure to enter a webhook secret too. -If you don't care about the value, then enter 'renovate' as that is the default secret that the webhook handler process uses. - -You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. - -## Configure Mend Renovate EE - -Renovate Enterprise runs with one **_Server_** container and one or more **_Worker_** containers. -See below for a list of environment variables that relate to each. - -### Environment variables - Renovate Enterprise Server - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: For a Renovate Enterprise license key, contact Mend via the [Renovate Enterprise webpage](https://www.mend.io/renovate-enterprise/). - -**`MEND_RNV_PLATFORM`**: Set this to `github`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your GitHub Enterprise installation. Required for GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - -**`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. - -**`MEND_RNV_GITHUB_APP_KEY`**: A string representation of the private key of the provisioned Renovate app on GitHub. To insert the value directly into a Docker Compose environment variable, open the PEM file in a text editor and replace all new lines with "\n" so that the entire key is on one line. Alternatively, you can skip setting this key as an environment variable and instead mount it as a file to the path specified by `RNV_GITHUB_PEM_FILE_PATH`, as shown in the example Docker Compose file. - -**`RNV_GITHUB_PEM_FILE_PATH`**: The file path for GitHub app key. Defaults to `/usr/src/app/renovate.private-key.pem`. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_SERVER_API_SECRET`**: Set an API secret. Must match the Worker instances and Admin APIs for communicating with the Server. - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate EE server service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (node) and gid=1000 (node). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not exhaust the available hourly rate limit of the app on GitHub server or cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. Note: This is required if you are using a self-hosted GitHub Enterprise instance but should not be configured if your `RENOVATE_ENDPOINT` is `https://api.github.com`. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_MC_TOKEN`**: The merge confidence token used for Smart-Merge-Control authentication - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history between multiple workers. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container. - -### Environment variables - Renovate Enterprise Worker - -The Worker container needs to define only the following variables: - -* **`MEND_RNV_SERVER_HOSTNAME`**: The hostname of the Renovate Enterprise `server` container (eg. http://renovate-ee-server:8080) -* **`MEND_RNV_SERVER_API_SECRET`**: Set to same as Server -* **`MEND_RNV_ACCEPT_TOS`**: Set to same as Server -* **`MEND_RNV_LICENSE_KEY`**: Set to same as Server -* **`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -## Configure Renovate Core - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. Both settings should be done in the worker. - -**npm Registry** If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate EE on GitHub - -```yaml -version: '3.6' - -x-controller-shared-variables: &variables-controller - MEND_RNV_SERVER_HOSTNAME: http://renovate-ee-server:8080 - MEND_RNV_SERVER_API_SECRET: # This secret will be used by the Worker and by Admin APIs - # Provide Mend License and accept Terms of Service - MEND_RNV_ACCEPT_TOS: # Set to 'y' to accept the Mend Renovate Terms of Service - MEND_RNV_LICENSE_KEY: # Set this to the Renovate Enterprise key obtained from Mend - -services: - renovate-ee-server: - restart: on-failure - image: ghcr.io/mend/renovate-ee-server: - ports: - - "80:8080" # Receive webhooks on port 80 - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug - # Provide connection details for the Renovate Bot/App - MEND_RNV_PLATFORM: # Set to `github` or `gitlab` - MEND_RNV_ENDPOINT: # Required for GitLab or GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - MEND_RNV_GITHUB_APP_ID: # GitHub Only! GitHub App ID - MEND_RNV_GITHUB_APP_KEY: # GitHub Only! GitHub App Key (PEM file). Alternatively mount as a volume below - MEND_RNV_WEBHOOK_SECRET: # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # MEND_RNV_ADMIN_API_ENABLED: # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # MEND_RNV_SQLITE_FILE_PATH: /db/renovate-ee.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # MEND_RNV_CRON_JOB_SCHEDULER: # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # MEND_RNV_CRON_APP_SYNC: # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # GITHUB_COM_TOKEN: # Personal Access Token for github.com (used for retrieving changelogs) - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db - healthcheck: - test: curl --fail http://renovate-ee-server:8080/health || exit 1 - interval: 60s - retries: 5 - start_period: 20s - timeout: 10s - - renovate-ee-worker: - restart: on-failure - deploy: - # Post deploy: - # $ docker-compose -f docker-compose-renovate-ee.yml up --scale renovate-ee-worker=3 -d --no-recreate - replicas: 2 - image: ghcr.io/mend/renovate-ee-worker:-full - depends_on: - - renovate-ee-server - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug -``` diff --git a/docs/configure-renovate-ee-gitlab.md b/docs/configure-renovate-ee-gitlab.md deleted file mode 100644 index 4589192d..00000000 --- a/docs/configure-renovate-ee-gitlab.md +++ /dev/null @@ -1,219 +0,0 @@ -# Configuration - Mend Renovate Enterprise Edition for GitLab - -## Configure Renovate Bot Account on GitLab - -### Renovate Bot Account - -Create a GitLab user account to act as the "Renovate Bot". -If you are running your own instance of GitLab, it's suggested to name the account "Renovate Bot" with username "renovate-bot". - -Note: In GitLab, the "Renovate Bot" is not an App or Plugin; it's a GitLab user account that's been given the right permissions and System Hooks. -You should use a dedicated "bot account" for Renovate, instead of using someone's personal user account. -Apart from reducing the chance of conflicts, it is better for teams if the actions they see from Renovate are clearly marked as coming from a dedicated bot account and not from a teammate's account, which could be confusing at times. -e.g. Did the bot automerge that PR, or did a human do it? - -### Personal Access Token - -Once the account is created, create a Personal Access Token for it with the following permissions: - * `api` - * `read_user` - * `write_repository` - -### System Hook - -To activate Mend Renovate's webhook ability, create a System Hook that points to the Renovate installation. - -Create a System Hook (in Admin area) - -1. Set the webhook URL to point to the Renovate server url followed by `/webhook`. (e.g. `http://renovate.yourcompany.com:8080/webhook` or `https://1.2.3.4/webhook`) -2. Set the webhook secret to the same value configured for `MEND_RNV_WEBHOOK_SECRET` (defaults to `renovate`) -3. Set Hook triggers for: - * `Push events` - * `Merge request events` - -Remember: Renovate's webhook listener binds to port 8080 inside its container, but you can map it (using Docker) to whatever external port you require, including port 80. - -Set the "Secret Token" to the same value configured for `MEND_RNV_WEBHOOK_SECRET`, or set it to `"renovate"` if you left it as default. - -Once your System Hook is added, Renovate's webhook handler will receive events from _all_ repositories. -Therefore, Renovate maintains a list of all repositories it has access to and discards events from all others. - -### Repo Webhooks - -Because Issue events aren't included in System hooks, a webhook must be individually configured for each repository in which you want the Dependency Dashboard issue to be interactive. - -In the Repository settings, create a Webhook with the following settings: -1. Set the webhook URL - same as System Hook URL -2. Set the webhook secret - same as System Hook secret -3. Set Hook triggers for: - * `Issue events` - -This will need to be repeated for every repository that is onboarded to the Renovate Bot account. -It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. - - -## Configure Mend Renovate EE - -Renovate Enterprise runs with one **_Server_** container and one or more **_Worker_** containers. -See below for a list of environment variables that relate to each. - -### Environment variables - Renovate Enterprise Server - -**`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). - -**`MEND_RNV_LICENSE_KEY`**: For a Renovate Enterprise license key, contact Mend via the [Renovate Enterprise webpage](https://www.mend.io/renovate-enterprise/). - -**`MEND_RNV_PLATFORM`**: Set this to `gitlab`. - -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your self-hosted GitLab instance installation. Include the trailing slash. (eg. `https://1.2.3.4/api/v4`) - -**`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. - -**`MEND_RNV_WEBHOOK_SECRET`**: Optional: Defaults to `renovate` - -**`MEND_RNV_SERVER_API_SECRET`**: Set an API secret. Must match the Worker instances and Admin APIs for communicating with the Server. - -**`MEND_RNV_ADMIN_API_ENABLED`**: Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - -**`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. - -**`MEND_RNV_SQLITE_FILE_PATH`**: Optional: Provide a path to persist the database. (eg. '/db/renovate-ce.sqlite', where 'db' is defined as a volume) - -> [!IMPORTANT] -> The container running the Renovate EE server service requires read, write, and execute (rwx) permissions for the parent folder of the SQLite file. Additionally, the process inside the container executes with uid=1000 (node) and gid=1000 (node). - -The [sqlite3](https://sqlite.org/cli.html) CLI tool is preinstalled in the Renovate CE/EE(server) images, allowing direct interaction with the underlying SQLite database. - -For example, Let `MEND_RNV_SQLITE_FILE_PATH=/db/renovate-ce.sqlite`: -```shell -ubuntu@23cf5aaa72ed:/usr/src/app$ sqlite3 -SQLite version 3.31.1 2020-01-27 19:55:54 -Enter ".help" for usage hints. -Connected to a transient in-memory database. -Use ".open FILENAME" to reopen on a persistent database. -sqlite> .open -readonly /db/renovate-ce.sqlite -sqlite> .tables -job_queue migrations org repo task_queue -sqlite> -``` - -**`MEND_RNV_CRON_JOB_SCHEDULER`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 * * * *` (i.e. once per hour exactly on the hour). This cron job triggers the Renovate bot against the projects in the SQLite database. If decreasing the interval then be careful that you do not cause too much load. - -**`MEND_RNV_CRON_APP_SYNC`**: Optional: Accepts a 5-part cron schedule. Defaults to `0 0,4,8,12,16,20 * * *` (every 4 hours, on the hour). This cron job performs autodiscovery against the platform and fills the SQLite database with projects. - -**`GITHUB_COM_TOKEN`**: A Personal Access Token for a user account on github.com (i.e. _not_ an account on your GitHub Enterprise instance). This is used for retrieving changelogs and release notes from repositories hosted on github.com and it does not matter who it belongs to. It needs only read-only access privileges. - -**`MEND_RNV_AUTODISCOVER_FILTER`**: a string of a comma separated values (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate [autodiscoverFilter](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) - -> [!WARNING] -> The Renovate CLI [autodiscover](https://docs.renovatebot.com/self-hosted-configuration/#autodiscover) configuration option is disabled at the client level. Repository filtering should solely rely on server-side filtering using `MEND_RNV_AUTODISCOVER_FILTER`. - -**`MEND_RNV_ENQUEUE_JOBS_ON_STARTUP`**: The job enqueue behavior on start (or restart). Defaults to `discovered`. (Note that the behavior can be different if the database is persisted or not) -- `enabled`: enqueue a job for all available repositories -- `discovered`: enqueue a job only for newly discovered repositories -- `disabled`: No jobs are enqueued - -**`MEND_RNV_MC_TOKEN`**: The merge confidence token used for Smart-Merge-Control authentication - -**`MEND_RNV_LOG_HISTORY_DIR`**: Optional: Specify a directory path to save Renovate job log files, recommended to be an external volume to preserve history between multiple workers. Log files will be saved in a `./ORG_NAME/REPO_NAME/` hierarchy under the specified folder. Log file name structure is as follows: `(_.log)`. - -Where: -- ``: timestamp in the format `YYYYMMDD_HHmmss` local time -- ``: random 10 character alphanumeric string used as - [Renovate log context](https://docs.renovatebot.com/self-hosted-configuration/#logcontext) for cross referencing logs. - -For Example: -Let `MEND_RNV_LOG_HISTORY_DIR=/home/renovate/logs`, repository=`org/repo` - -The corresponding Renovate job log file will be saved as: - -``` -/home/renovate/logs/org/repo/20231025_104229_6e4ecdc343.log -``` - -_> [!IMPORTANT] -> Logs are saved by the Renovate OSS cli, so the corresponding folder must exist in the CE/EE-Worker container._ - -**`MEND_RNV_LOG_HISTORY_TTL_DAYS`**: Optional: The number of days to save log files. Defaults to 30. - -**`MEND_RNV_LOG_HISTORY_CLEANUP_CRON`**: Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). This cron job cleans up log history in the directory defined by `MEND_RNV_LOG_HISTORY_DIR`. It deletes any log file that exceeds the `MEND_RNV_LOG_HISTORY_TTL_DAYS` value. - -### Environment variables - Renovate Enterprise Worker - -The Worker container needs to define only the following variables: - -* **`MEND_RNV_SERVER_HOSTNAME`**: The hostname of the Renovate Enterprise `server` container (eg. http://renovate-ee-server:8080) -* **`MEND_RNV_SERVER_API_SECRET`**: Set to same as Server -* **`MEND_RNV_ACCEPT_TOS`**: Set to same as Server -* **`MEND_RNV_LICENSE_KEY`**: Set to same as Server -* **`MEND_RNV_WORKER_EXECUTION_TIMEOUT`**: Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. - -## Configure Renovate Core - -The core Renovate OSS functionality can be configured using environment variables (e.g. `RENOVATE_XXXXXX`) or via a `config.js` file that you mount inside the Mend Renovate container to `/usr/src/app/config.js`. Both settings should be done in the worker. - -**npm Registry** If using your own npm registry, you may find it easiest to update your Docker Compose file to include a volume that maps an `.npmrc` file to `/home/ubuntu/.npmrc`. The RC file should contain `registry=...` with the registry URL your company uses internally. This will allow Renovate to find shared configs and other internally published packages. - -## Run Mend Renovate - -You can run Mend Renovate from a Docker command line prompt, or by using a Docker Compose file. An example is provided below. - -**Docker Compose File**: Renovate EE on GitLab - -```yaml -version: '3.6' - -x-controller-shared-variables: &variables-controller - MEND_RNV_SERVER_HOSTNAME: http://renovate-ee-server:8080 - MEND_RNV_SERVER_API_SECRET: # This secret will be used by the Worker and by Admin APIs - # Provide Mend License and accept Terms of Service - MEND_RNV_ACCEPT_TOS: # Set to 'y' to accept the Mend Renovate Terms of Service - MEND_RNV_LICENSE_KEY: # Set this to the Renovate Enterprise key obtained from Mend - -services: - renovate-ee-server: - restart: on-failure - image: ghcr.io/mend/renovate-ee-server: - ports: - - "80:8080" # Receive webhooks on port 80 - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug - # Provide connection details for the Renovate Bot/App - MEND_RNV_PLATFORM: # Set to `github` or `gitlab` - MEND_RNV_ENDPOINT: # Required for GitLab or GitHub Enterprise Server; not for GitHub.com. Include the trailing slash. - MEND_RNV_GITLAB_PAT: # Personal Access Token for the GitLab bot account. - MEND_RNV_WEBHOOK_SECRET: # Optional: defaults to 'renovate' - # Optional settings for Mend Renovate - # MEND_RNV_ADMIN_API_ENABLED: # Optional: Set to 'true' to enable Admin APIs. Defaults to 'false'. - # MEND_RNV_SQLITE_FILE_PATH: /db/renovate-ee.sqlite # Optional: Provide a path to persist the database. Needs 'db' volume defined (below). - # MEND_RNV_CRON_JOB_SCHEDULER: # Optional Job enqueue schedule: defaults to '0 * * * *' (hourly, on the hour) - # MEND_RNV_CRON_APP_SYNC: # Optional AppSync schedule: defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours, on the hour) - # Core Renovate settings - # GITHUB_COM_TOKEN: # Personal Access Token for github.com (used for retrieving changelogs) - # volumes: - # Optional: You can use a file mount to persist the database between sessions - # - "/tmp/db/:/db/" # Unix-style file mounting for the db - # - "C:\\tmp/db/:/db/" # Windows-style file mounting for the db - healthcheck: - test: curl --fail http://renovate-ee-server:8080/health || exit 1 - interval: 60s - retries: 5 - start_period: 20s - timeout: 10s - - renovate-ee-worker: - restart: on-failure - deploy: - # Post deploy: - # $ docker-compose -f docker-compose-renovate-ee.yml up --scale renovate-ee-worker=3 -d --no-recreate - replicas: 2 - image: ghcr.io/mend/renovate-ee-worker:-full - depends_on: - - renovate-ee-server - environment: - <<: *variables-controller - # Optional: Define log level. Set to Debug for more verbose output - # LOG_LEVEL: debug -``` diff --git a/docs/installation-helm.md b/docs/installation-helm.md index aa9e6dd4..ff237c0c 100644 --- a/docs/installation-helm.md +++ b/docs/installation-helm.md @@ -28,5 +28,5 @@ helm repo update helm install --generate-name --set renovate.config='\{\"token\":\"...\"\}' mend-renovate-cc-ee/mend-renovate-ce ``` -See the available [values](../helm-charts/mend-renovate-ce/values.yaml) for full configuration and review configuration guides for [GitHub](./configure-renovate-ce-github.md) and/or [GitLab](./configure-renovate-ce-gitlab.md). +See the available [values](../helm-charts/mend-renovate-ce/values.yaml) for full configuration and review configuration guides for [GitHub](setup-for-github.md), [GitLab](setup-for-gitlab.md) or [Bitbucket](setup-for-bitbucket.md). diff --git a/docs/migrating-to-renovate-ce.md b/docs/migrating-to-renovate-ce.md index 0ba378f3..44b2aaac 100644 --- a/docs/migrating-to-renovate-ce.md +++ b/docs/migrating-to-renovate-ce.md @@ -10,7 +10,7 @@ If you are using a "health check" of the Renovate container then you should poin Some existing environment variables have been renamed, and some new ones have been added. -See the specific configuration instructions ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ee-gitlab.md)) to learn more about the variables mentioned below. +See the specific configuration instructions ([GitHub](setup-for-github.md), [GitLab](setup-for-gitlab.md), [Bitbucket](setup-for-bitbucket.md)) to learn more about the variables mentioned below. ### Environment Variable Key Migration diff --git a/docs/overview.md b/docs/overview.md index 6b2d977e..ffc8368b 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -102,9 +102,21 @@ Naturally, it is recommended that you use Renovate itself for detecting and upda ## Running Mend Renovate Self-hosted -Examples using Docker Compose can be found at the bottom of the configuration documentation for each product. -- Configuration - Renovate Community Edition - ([GitHub](./configure-renovate-ce-github.md), [GitLab](./configure-renovate-ce-gitlab.md)) -- Configuration - Renovate Enterprise Edition - ([GitHub](./configure-renovate-ee-github.md), [GitLab](./configure-renovate-ee-gitlab.md)) +See the Setup Guides to get started with Mend Renovate Self-hosted +- [Setup guide for GitHub](setup-for-github.md) +- [Setup guide for GitLab](setup-for-gitlab.md) +- [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) -Request `/status` on your IP address hosting the deployment to check if it is running correctly. -It is recommended not to expose that endpoint to the internet as it could leak information about private repository names. +Examples using Docker Compose can be found at in the [examples directory](../examples). + +## Testing Mend Renovate Self-hosted + +Request `/health` on your IP address hosting the deployment to check if it is running correctly. + +For further testing, use the [Admin APIs](./api.md) to: +- check the status of the server +- see the contents of the Job and Task queues +- perform an App sync +- run a job + +It is recommended not to expose the API endpoint to the internet as it could leak information about private repository names. diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index fabd630b..7ac0fc5a 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -13,7 +13,7 @@ Also, only repo admins can add the Renovate Bot user and webhooks. - Navigate to the User settings page in Administration (Settings → Accounts/Users)
eg. http://localhost:7990/admin/users -![bb-admin-users.png](images%2Fbb-admin-users.png) +![bb-admin-users.png](images/bb-admin-users.png) - Click “Create user” to create an account for the Renovate Bot user. (eg. http://localhost:7990/admin/users?create) @@ -21,22 +21,22 @@ We recommend calling the account “Renovate Bot”. - Username: “renovate-bot” - Full name: “Renovate Bot” -![bb-create-user.png](images%2Fbb-create-user.png) +![bb-create-user.png](images/bb-create-user.png) - Note: The Renovate Bot user will be the author of Renovate pull requests. -![bb-renovate-bot.png](images%2Fbb-renovate-bot.png) +![bb-renovate-bot.png](images/bb-renovate-bot.png) - Give the Renovate Bot user basic Bitbucket user access (only required so a HTTP Token can be created through the UI) - Under Global permissions, in the User Access section, click into the table header bar (where it says “Add Users”) and search for the Renovate Bot user. - Leave the access level at “Bitbucket User”. - Press “Add” -![bb-user-access-1.png](images%2Fbb-user-access-1.png) +![bb-user-access-1.png](images/bb-user-access-1.png) - The end results should be a Renovate Bot user with “Bitbucket User” access only. -![bb-user-access-2.png](images%2Fbb-user-access-2.png) +![bb-user-access-2.png](images/bb-user-access-2.png)
Note: It is essential that the Renovate Bot user does NOT have Admin or System admin access. Because Bitbucket Admin and System admin users have full access to all projects and repos, there will be no way to control which repos Renovate will run against, and so Renovate will run against all repos. When the Renovate Bot user has only basic user access, administrators can control which repos run with Renovate by adding the Renovate Bot user to specific repos. @@ -54,19 +54,19 @@ http://localhost:7990/login - If logged in as an Admin user account, log out of Bitbucket first. - Alternatively, open a new web browser in incognito mode. _(Ctrl+Shift+N from a web browser)_ -![bb-log-in.png](images%2Fbb-log-in.png) +![bb-log-in.png](images/bb-log-in.png) - Go to the Account management page (eg. http://localhost:7990/account) You can expand the menu on the user profile icon (top right of page) and click “Manage account”. -![bb-manage-account.png](images%2Fbb-manage-account.png) +![bb-manage-account.png](images/bb-manage-account.png) - Navigate to the HTTP access tokens page - Press “Create token” to create a new HTTP access token -![bb-access-token.png](images%2Fbb-access-token.png) +![bb-access-token.png](images/bb-access-token.png) - Create an HTTP access token (with `Repository Write` permission) - Token name: Can be anything (eg. “Renovate User PAT”) @@ -74,7 +74,7 @@ You can expand the menu on the user profile icon (top right of page) and click - Project permissions: `Project read` - Repository permissions: `Repository write` -![bb-new-token.png](images%2Fbb-new-token.png) +![bb-new-token.png](images/bb-new-token.png) - Copy the token and store it for later use.
This will be used as the `MEND_RNV_BITBUCKET_PAT` in the Renovate CE/EE configuration. @@ -120,14 +120,14 @@ Note: Any Bitbucket user with global permissions of Admin or System admin has fu Repo → Repository Settings → Repository permissions Repo settings page: http://localhost:7990/projects/PROJ1/repos/repo-1/permissions -![bb-repo-permissions.png](images%2Fbb-repo-permissions.png) +![bb-repo-permissions.png](images/bb-repo-permissions.png) - Click the “Add user or group” button (Top right corner) - Add the Renovate Bot user with permission: Repository Write
Note: The Renovate Bot user needs write permission so it can create pull requests on the repository. -![bb-add-user.png](images%2Fbb-add-user.png) +![bb-add-user.png](images/bb-add-user.png) Now the Renovate Bot is installed on the repo. @@ -153,7 +153,7 @@ Note: To run APIs, ensure Renovate Server has EnvVar `MEND_RNV_ADMIN_API_ENABLED Authorization: ``` -![bb-postman-sync.png](images%2Fbb-postman-sync.png) +![bb-postman-sync.png](images/bb-postman-sync.png)
@@ -174,11 +174,11 @@ Create webhooks via the Bitbucket UI [Repo → Repository Settings → Webhooks]
http://localhost:7990/projects/PROJ1/repos/repo-1/settings -![bb-repo-webhooks.png](images%2Fbb-repo-webhooks.png) +![bb-repo-webhooks.png](images/bb-repo-webhooks.png) - Click “Create webhook” to open the Create webhook page -![bb-create-webhook-1.png](images%2Fbb-create-webhook-1.png) +![bb-create-webhook-1.png](images/bb-create-webhook-1.png) **Provide the following values for the webhook:** - Name: Can be anything. Duplicates are allowed. @@ -192,7 +192,7 @@ Create webhooks via the Bitbucket UI - Repository: Push, Modified - Pull request: Modified -![bb-create-webhook-2.png](images%2Fbb-create-webhook-2.png) +![bb-create-webhook-2.png](images/bb-create-webhook-2.png) - Click “Save” to finish creating the webhook @@ -214,7 +214,7 @@ To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access - Navigate to the HTTP access tokens page
http://localhost:7990/plugins/servlet/access-tokens/users/admin/manage -![bb-admin-token.png](images%2Fbb-admin-token.png) +![bb-admin-token.png](images/bb-admin-token.png) - Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. @@ -222,7 +222,7 @@ Note: - To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
- To create **repository** webhooks, the HTTP access token must have `Repository Admin` permissions. (Project Admin not required.) -![bb-create-admin-token.png](images%2Fbb-create-admin-token.png) +![bb-create-admin-token.png](images/bb-create-admin-token.png) - Click “Create” to finish creating the access token - Copy the access token when it is presented. Store it for use when calling Bitbucket Admin APIs. @@ -302,8 +302,8 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **Example Docker Compose files:** -- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce-github.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee-simple.yml) > [!NOTE] > @@ -317,7 +317,17 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index bd23e61e..0b6dd4f7 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -51,8 +51,8 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **Example Docker Compose files:** -- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce-github.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee-simple.yml) > [!NOTE] > @@ -66,7 +66,17 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index b54d5721..e44736bd 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -57,8 +57,8 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **Example Docker Compose files:** -- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce.yml) -- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee.yml) +- [Mend Renovate Community Edition](../examples/docker-compose/renovate-ce-github.yml) +- [Mend Renovate Enterprise Edition](../examples/docker-compose/renovate-ee-simple.yml) > [!NOTE] > @@ -72,7 +72,17 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `gitlab`. From 034cbcd31b0c828bab4d3d8dec4b35fc08fa774e Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Fri, 27 Sep 2024 15:05:18 +0200 Subject: [PATCH 31/38] Updated configuration docs with Setup Guides. Provided information about the 10-repo license key. --- docs/setup-for-bitbucket.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index 7ac0fc5a..17c6d2fe 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -90,7 +90,7 @@ Example files available here: - Helm charts (Renovate CE / Renovate EE) Edit the docker files / helm chart values to provide the required environment variables. -Refer to [Available Configurations section](#available_config) for a full list of Renovate CE/EE server variables. +Refer to [Configurations Options](configuration-options.md) for a full list of Renovate CE/EE server variables. #### Bitbucket Server Connection details From bb75e050a717315291697726785dcb783781f7ce Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 09:11:41 +0200 Subject: [PATCH 32/38] Removed 10-repo licence key information --- docs/configuration-options.md | 12 +----------- docs/setup-for-bitbucket.md | 12 +----------- docs/setup-for-github.md | 12 +----------- docs/setup-for-gitlab.md | 12 +----------- examples/docker-compose/renovate-ce-github.yml | 3 +-- examples/docker-compose/renovate-ce-postgres.yml | 3 +-- 6 files changed, 6 insertions(+), 48 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 37b2c736..7318c948 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -15,17 +15,7 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Contact Mend to request a license key at [mend.io/renovate-community](https://www.mend.io/renovate-community/) **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket.md index 17c6d2fe..083a660a 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket.md @@ -317,17 +317,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index 0b6dd4f7..ce638b1e 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -66,17 +66,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index e44736bd..2149a47e 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -72,17 +72,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition - -> [!Note] -> -> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: -> -> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` -> -> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). -> -> For an Enterprise license key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `gitlab`. diff --git a/examples/docker-compose/renovate-ce-github.yml b/examples/docker-compose/renovate-ce-github.yml index 35c060ce..fa76090c 100644 --- a/examples/docker-compose/renovate-ce-github.yml +++ b/examples/docker-compose/renovate-ce-github.yml @@ -17,8 +17,7 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ - # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 + MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ diff --git a/examples/docker-compose/renovate-ce-postgres.yml b/examples/docker-compose/renovate-ce-postgres.yml index 1861d3f0..fe453125 100644 --- a/examples/docker-compose/renovate-ce-postgres.yml +++ b/examples/docker-compose/renovate-ce-postgres.yml @@ -19,8 +19,7 @@ services: # LOG_FORMAT: json # Defaults to 'pretty'. Useful when importing logs to reporting tool (eg. Splunk). # Provide a license key and accept the Terms of Service - MEND_RNV_LICENSE_KEY: # For a free unrestricted repo Community Edition license key register at https://www.mend.io/renovate-community/ - # Use this key for 10 repos: eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1 + MEND_RNV_LICENSE_KEY: # Get Community Edition license key from https://www.mend.io/renovate-community/ MEND_RNV_ACCEPT_TOS: # Set to 'Y' to accept Terms of Service # Provide connection details for the GitHub App # Available at: https://github.com/settings/apps/ From fe45d0fe8634fdb4a4cb00a87fdc3f49973a9969 Mon Sep 17 00:00:00 2001 From: Justin Clareburt <122523970+justo-mend@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:52:23 +0200 Subject: [PATCH 33/38] Apply suggestions from code review Co-authored-by: Rhys Arkins --- docs/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview.md b/docs/overview.md index ffc8368b..19ec1141 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -2,7 +2,7 @@ ## Overview -Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket. +Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket Server/Data Center. Essentially, it is an alternative to running the `renovate` CLI tool, with the following additions: From 32766480ac4b8ffd1ed8c2d5616b132b7d9d4134 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:37:35 +0200 Subject: [PATCH 34/38] Updated all product references to "Mend Renovate Self-hosted App". Updated all references to Bitbucket to "Bitbucket Data Center" --- docs/README.md | 8 +++--- docs/configuration-options.md | 2 +- docs/overview.md | 26 +++++++++---------- ....md => setup-for-bitbucket-data-center.md} | 24 ++++++++--------- docs/setup-for-github.md | 6 ++--- docs/setup-for-gitlab.md | 6 ++--- helm-charts/mend-renovate-ce/values.yaml | 2 +- helm-charts/mend-renovate-ee/values.yaml | 2 +- 8 files changed, 38 insertions(+), 38 deletions(-) rename docs/{setup-for-bitbucket.md => setup-for-bitbucket-data-center.md} (94%) diff --git a/docs/README.md b/docs/README.md index 4f8275f3..927790c5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# Mend Renovate Self-hosted Documentation +# Mend Renovate Self-hosted App Documentation -This repository provides documentation specific to Mend Renovate Self-hosted - Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). +This repository provides documentation specific to the Mend Renovate Self-hosted Apps - Community Edition (Renovate CE) and Enterprise Edition (Renovate EE), and does not duplicate anything that is relevant and can be found in the [Renovate OSS repository](https://github.com/renovatebot/renovate). Mend Renovate Community Edition was formerly known as "Mend Renovate On-Premises". @@ -10,7 +10,7 @@ The following platforms are supported by Mend Renovate Community Edition and Ent - GitHub.com - GitHub Enterprise Server - GitLab Enterprise Edition -- Bitbucket Server/Datacenter (in beta) +- Bitbucket Data Center (in beta) ## Documentation contents @@ -19,7 +19,7 @@ The following platforms are supported by Mend Renovate Community Edition and Ent 1. Getting Started - [Setup guide for GitHub](setup-for-github.md) - [Setup guide for GitLab](setup-for-gitlab.md) - - [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) + - [Setup guide for Bitbucket Data Center](setup-for-bitbucket-data-center.md) 1. Configuration - [Self-hosted configuration options](configuration-options.md) - [Configure PostgreSQL DB](configure-postgres-db.md) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index 7318c948..e0d008a1 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -1,4 +1,4 @@ -# Mend Renovate Self-hosted Configuration Options +# Mend Renovate Self-hosted App Configuration Options Mend Renovate Enterprise Edition runs with one or more **_Server_** containers and one or more **_Worker_** containers. Mend Renovate Community Edition runs on a single Server container that also performs the Worker actions. diff --git a/docs/overview.md b/docs/overview.md index 19ec1141..2e037366 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -1,8 +1,8 @@ -# Mend Renovate Self-hosted - Community Edition and Enterprise Edition +# Mend Renovate Self-hosted Apps - Community Edition and Enterprise Edition ## Overview -Mend Renovate Self-hosted (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket Server/Data Center. +Mend Renovate Self-hosted Apps (Community Edition and Enterprise Edition) are commercial offerings of Renovate for self-hosted users, such as those running on GitHub, GitLab or Bitbucket Data Center. Essentially, it is an alternative to running the `renovate` CLI tool, with the following additions: @@ -11,16 +11,16 @@ Essentially, it is an alternative to running the `renovate` CLI tool, with the f - Webhook listener to enable dynamic reactions to repository events - Administration APIs for probing the system state or triggering jobs -## Mend Renovate Self-hosted features +## Features of Mend Renovate Self-hosted App #### Job scheduler -The Docker containers for Mend Renovate Self-hosted contain a built-in job scheduler that defaults to enqueing all repositories once per hour. +The Docker containers for Mend Renovate Self-hosted App contain a built-in job scheduler that defaults to enqueing all repositories once per hour. This saves the need for configuring and monitoring any external `cron` process. #### Webhook handler -Mend Renovate Self-hosted also supports a webserver to listen for system webhooks received from the SCM (GitHub, GitLab, Bitbucket). +Mend Renovate Self-hosted App also supports a webserver to listen for system webhooks received from the SCM (GitHub, GitLab, Bitbucket). In particular, it checks webhooks for: @@ -61,7 +61,7 @@ As with Renovate CLI, it can also be configured to interact with an external Red ## Downloading -The Docker images for Mend Renovate Self-hosted are available via GitHub Container Registry (ghcr.io) +The Docker images for Mend Renovate Self-hosted App are available via GitHub Container Registry (ghcr.io) Use of the images are in accordance with the [Mend Terms of Service](https://www.mend.io/terms-of-service/). @@ -74,11 +74,11 @@ Enterprise Edition uses two separate Docker images: The Server image, and the Wo ## Versioning -Mend Renovate Self-hosted products have their own versioning and release schedule, independent of Renovate CLI versioning. +Mend Renovate Self-hosted Apps have their own versioning and release schedule, independent of Renovate CLI versioning. -Additionally, it is intended that Mend Renovate will have a slower release cadence than Renovate CLI in order to provide greater stability for Enterprise use. +Additionally, it is intended that Mend Renovate Self-hosted Apps will have a slower release cadence than Renovate CLI in order to provide greater stability for Enterprise use. -Specifically, use of SemVer for Mend Renovate Self-hosted: +Specifically, use of SemVer for Mend Renovate Self-hosted Apps: **Major**: Used only for breaking changes @@ -100,16 +100,16 @@ When a new version of Mend Renovate is pushed to GHCR, Release Notes will be add Naturally, it is recommended that you use Renovate itself for detecting and updating Mend Renovate versions if you are using a Docker Compose file internally for running Mend Renovate. -## Running Mend Renovate Self-hosted +## Running Mend Renovate Self-hosted App -See the Setup Guides to get started with Mend Renovate Self-hosted +See the Setup Guides to get started with Mend Renovate Self-hosted App - [Setup guide for GitHub](setup-for-github.md) - [Setup guide for GitLab](setup-for-gitlab.md) -- [Setup guide for Bitbucket Data Center](setup-for-bitbucket.md) +- [Setup guide for Bitbucket Data Center](setup-for-bitbucket-data-center.md) Examples using Docker Compose can be found at in the [examples directory](../examples). -## Testing Mend Renovate Self-hosted +## Testing Mend Renovate Self-hosted App Request `/health` on your IP address hosting the deployment to check if it is running correctly. diff --git a/docs/setup-for-bitbucket.md b/docs/setup-for-bitbucket-data-center.md similarity index 94% rename from docs/setup-for-bitbucket.md rename to docs/setup-for-bitbucket-data-center.md index 083a660a..3cd9dae8 100644 --- a/docs/setup-for-bitbucket.md +++ b/docs/setup-for-bitbucket-data-center.md @@ -1,12 +1,12 @@ -# Set up Mend Renovate Self-hosted for Bitbucket +# Set up Mend Renovate Self-hosted App for Bitbucket Data Center -## Configure Renovate Bot Account on Bitbucket +## Configure Renovate Bot Account on Bitbucket Data Center ### 1.a. Configure Renovate Bot User Account -The following configuration instructions are to be performed on Bitbucket Server by a user account with “Admin” or “System admin” global permissions on the Bitbucket Server. +The following configuration instructions are to be performed on Bitbucket Data Center by a user account with “Admin” or “System admin” global permissions on Bitbucket Data Center. -- Log in to Bitbucket Server with admin user (eg. http://localhost:7990)
+- Log in to Bitbucket Data Center with admin user (eg. http://localhost:7990)
Note: Bitbucket Admin user permissions - Must be at least “Admin” to create a new user account.
Also, only repo admins can add the Renovate Bot user and webhooks. @@ -92,7 +92,7 @@ Example files available here: Edit the docker files / helm chart values to provide the required environment variables. Refer to [Configurations Options](configuration-options.md) for a full list of Renovate CE/EE server variables. -#### Bitbucket Server Connection details +#### Bitbucket Data Center Connection details # Install Renovate Bot and Webhooks on BitBucket project or repository @@ -112,7 +112,7 @@ Note: Any Bitbucket user with global permissions of Admin or System admin has fu ### Note: - Adding the Renovate Bot user to a **project** will install Renovate on **all repositories** in the project (current and future). -- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on the Bitbucket server. +- Giving the Renovate Bot user `global Admin` user access will install Renovate on **all repositories** on Bitbucket Data Center. ### How to add Renovate Bot to a Repository @@ -216,7 +216,7 @@ To create a webhook using the Bitbucket APIs, the APIs must pass an HTTP access ![bb-admin-token.png](images/bb-admin-token.png) -- Press “Create token” to create the Bearer token required for calling the Bitbucket Server webhook APIs. +- Press “Create token” to create the Bearer token required for calling Bitbucket Data Center webhook APIs. Note: - To create **project** webhooks, the HTTP access token must have `Project Admin` permissions.
@@ -283,7 +283,7 @@ Body: (raw - JSON) **Provide the following values:** - name: Can be anything. Duplicate names are allowed. - url: The URL and port of the Renovate Server. - - Note: Ensure ports are open to receiving incoming calls from the Bitbucket server. + - Note: Ensure ports are open to receiving incoming calls from Bitbucket Data Center. - secret: The Webhook secret defined in the MEND_RNV_WEBHOOK_SECRET environment variable on the Renovate Server. ### Allow Renovate CE/EE to create Repository webhooks via Bitbucket API @@ -296,9 +296,9 @@ Notes: `MEND_RNV_ADMIN_TOKEN` 1. Recommended to use a different token than the token for Renovate bot user 2. This admin token is only used for searching/adding and removing of webhooks on repository level -## Run Mend Renovate Self-hosted +## Run Mend Renovate Self-hosted App -You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted App from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** @@ -321,7 +321,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. -**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Server installation. Include the trailing slash. +**`MEND_RNV_ENDPOINT`**: This is the API endpoint for your BitBucket Data Center installation. Include the trailing slash. **`MEND_RNV_SERVER_PORT`**: The port on which the server listens for webhooks and api requests. Defaults to 8080. @@ -329,7 +329,7 @@ You can run Mend Renovate Self-hosted from a Docker command line prompt, or by u **`MEND_RNV_BITBUCKET_PAT`**: BitBucket access token for the bot user `MEND_RNV_BITBUCKET_USER` -**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus '/webhook'. Must be accessible to receive incoming calls from the BitBucket server. +**`MEND_RNV_WEBHOOK_URL`**: Optional: The URL of the Renovate Server plus '/webhook'. Must be accessible to receive incoming calls from the BitBucket Data Center. **`MEND_RNV_ADMIN_TOKEN`**: Optional: A token used for searching/add/removing repository webhooks. Required if `MEND_RNV_WEBHOOK_URL` is set. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index ce638b1e..b2a1a442 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -1,4 +1,4 @@ -# Set up Mend Renovate Self-hosted for GitHub +# Set up Mend Renovate Self-hosted App for GitHub ## Create and Configure the GitHub App (bot) @@ -45,9 +45,9 @@ If you don't care about the value, then enter 'renovate' as that is the default You can use the [Renovate icon](https://docs.renovatebot.com/assets/images/logo.png) for the app/bot if you desire. -## Run Mend Renovate Self-hosted +## Run Mend Renovate Self-hosted App -You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted App from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index 2149a47e..e74f00e4 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -1,4 +1,4 @@ -# Set up Mend Renovate Self-hosted for GitLab +# Set up Mend Renovate Self-hosted App for GitLab ## Configure Renovate Bot Account on GitLab @@ -51,9 +51,9 @@ In the Repository settings, create a Webhook with the following settings: This will need to be repeated for every repository that is onboarded to the Renovate Bot account. It is usually easiest to create the repo webhook while adding the Renovate Bot account to a repo. -## Run Mend Renovate Self-hosted +## Run Mend Renovate Self-hosted App -You can run Mend Renovate Self-hosted from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. +You can run Mend Renovate Self-hosted App from a Docker command line prompt, or by using a Docker Compose file. Examples are provided in the links below. **Example Docker Compose files:** diff --git a/helm-charts/mend-renovate-ce/values.yaml b/helm-charts/mend-renovate-ce/values.yaml index d6628134..6c9190b1 100644 --- a/helm-charts/mend-renovate-ce/values.yaml +++ b/helm-charts/mend-renovate-ce/values.yaml @@ -47,7 +47,7 @@ renovate: mendRnvBitbucketPat: # Optional: The URL of the Renovate Server plus '/webhook' suffix. - # Must be accessible to receive incoming calls from the BitBucket server. + # Must be accessible to receive incoming calls from BitBucket Data Center. mendRnvWebhookURL: # Optional: A token used for searching/adding/removing repository webhooks. diff --git a/helm-charts/mend-renovate-ee/values.yaml b/helm-charts/mend-renovate-ee/values.yaml index 706f6cf4..5834a997 100644 --- a/helm-charts/mend-renovate-ee/values.yaml +++ b/helm-charts/mend-renovate-ee/values.yaml @@ -64,7 +64,7 @@ renovateServer: mendRnvBitbucketPat: # Optional: The URL of the Renovate Server plus '/webhook' suffix. - # Must be accessible to receive incoming calls from the BitBucket server. + # Must be accessible to receive incoming calls from BitBucket Data Center. mendRnvWebhookURL: # Optional: A token used for searching/adding/removing repository webhooks. From 4dca106879c82cd8c7047a8f70cf5de883d1eb15 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:42:30 +0200 Subject: [PATCH 35/38] Restored info about the 10-repo license key for Renovate CE --- docs/configuration-options.md | 12 +++++++++++- docs/setup-for-bitbucket-data-center.md | 12 +++++++++++- docs/setup-for-github.md | 12 +++++++++++- docs/setup-for-gitlab.md | 12 +++++++++++- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index e0d008a1..a6a0be02 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -15,7 +15,17 @@ Environment variables for the **Mend Renovate Enterprise Worker** are in the nex **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Contact Mend to request a license key at [mend.io/renovate-community](https://www.mend.io/renovate-community/) +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_MC_TOKEN`**: [Enterprise only] The authentication token required when using Merge Confidence Workflows. Set this to 'auto' (default), or provide the value of a merge confidence API token. diff --git a/docs/setup-for-bitbucket-data-center.md b/docs/setup-for-bitbucket-data-center.md index 3cd9dae8..812d343c 100644 --- a/docs/setup-for-bitbucket-data-center.md +++ b/docs/setup-for-bitbucket-data-center.md @@ -317,7 +317,17 @@ You can run Mend Renovate Self-hosted App from a Docker command line prompt, or **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `bitbucket-server`. diff --git a/docs/setup-for-github.md b/docs/setup-for-github.md index b2a1a442..74fcd01a 100644 --- a/docs/setup-for-github.md +++ b/docs/setup-for-github.md @@ -66,7 +66,17 @@ You can run Mend Renovate Self-hosted App from a Docker command line prompt, or **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `github`. diff --git a/docs/setup-for-gitlab.md b/docs/setup-for-gitlab.md index e74f00e4..e9d4e1e6 100644 --- a/docs/setup-for-gitlab.md +++ b/docs/setup-for-gitlab.md @@ -72,7 +72,17 @@ You can run Mend Renovate Self-hosted App from a Docker command line prompt, or **`MEND_RNV_ACCEPT_TOS`**: Set this environment variable to `y` to consent to [Mend's Terms of Service](https://www.mend.io/terms-of-service/). -**`MEND_RNV_LICENSE_KEY`**: Register for a free Community Edition license key at https://www.mend.io/renovate-community/. For an Enterprise License key, contact Mend at http://mend.io. +**`MEND_RNV_LICENSE_KEY`**: Provide a valid license key for Renovate Community Edition or Enterprise Edition + +> [!Note] +> +> To run Renovate Community Edition with **up to 10 repositories**, you can use this unregistered license key: +> +> `eyJsaW1pdCI6IjEwIn0=.30440220457941b71ea8eb345c729031718b692169f0ce2cf020095fd328812f4d7d5bc1022022648d1a29e71d486f89f27bdc8754dfd6df0ddda64a23155000a61a105da2a1` +> +> For a free license key for an **unrestricted number of repositories** on Renovate Community Edition, register with the form on the [Renovate Community Edition web page](https://www.mend.io/mend-renovate-community/). +> +> For an Enterprise license key, contact Mend at http://mend.io. **`MEND_RNV_PLATFORM`**: Set this to `gitlab`. From 6690b12d3246d511e14457d6e087450dd4020c63 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:47:51 +0200 Subject: [PATCH 36/38] Added "App" to text for link to configuration options page --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 927790c5..64aaac41 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,7 +21,7 @@ The following platforms are supported by Mend Renovate Community Edition and Ent - [Setup guide for GitLab](setup-for-gitlab.md) - [Setup guide for Bitbucket Data Center](setup-for-bitbucket-data-center.md) 1. Configuration - - [Self-hosted configuration options](configuration-options.md) + - [Self-hosted App configuration options](configuration-options.md) - [Configure PostgreSQL DB](configure-postgres-db.md) - [Configure High Server Availability](high-server-availability.md) 1. Migration ([Renovate On-Premises to Renovate Community](./migrating-to-renovate-ce.md)) From e4c0b37368b57549dc694d6438d3d37d367c3eb6 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 16:50:39 +0200 Subject: [PATCH 37/38] Use headings instead of bolding --- docs/configuration-options.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/configuration-options.md b/docs/configuration-options.md index a6a0be02..845b59b7 100644 --- a/docs/configuration-options.md +++ b/docs/configuration-options.md @@ -38,7 +38,7 @@ Use the appropriate settings to define connection details to your specific SCM. **`MEND_RNV_ENDPOINT`**: This is the API endpoint for your SCM. Not required for GitHub.com. Include the trailing slash. -**GitHub connection variables** +#### GitHub connection variables **`MEND_RNV_GITHUB_APP_ID`**: The GitHub App ID of the provisioned Renovate app on GitHub. @@ -49,11 +49,11 @@ Use the appropriate settings to define connection details to your specific SCM. **`MEND_RNV_GITHUB_BOT_USER_ID`**: Optional: The bot user ID that will be used in `gitAuthor` (example author `myBotName[bot] <123456+myBotName[bot]@users.noreply.github.com` and the user id is `123456`). The value can be found by calling `https://api.github.com/users/{appName}[bot]` under the `id` key (replace the `{appName}` with the actual app name). Note: By default Renovate server will attempt to call this endpoint once during startup (both CE and EE server) and it does not require authentication. If you wish to skip this call for any reason you will need to provide the value in `MEND_RNV_GITHUB_BOT_USER_ID=` -**GitLab connection variables** +#### GitLab connection variables **`MEND_RNV_GITLAB_PAT`**: Personal Access Token for the GitLab bot account. -**Bitbucket connection variables** +#### Bitbucket connection variables **`MEND_RNV_BITBUCKET_USER`**: Renovate Bot user account (“Bitbucket User” access only) @@ -244,7 +244,6 @@ Escalation is reset when no mismatching versions are found during the version ch Note: You can inspect the `Renovate-EE-Version` in the response header of any Renovate API call to see the current version of the responding Server. - **`MEND_RENOVATE_FORKS_PROCESSING`**: controls the value of Renovate `forkProcessing` in the worker. valid values - `disabled`: sets Renovate `forkProcessing=disabled` for all jobs @@ -256,14 +255,12 @@ Note: You can inspect the `Renovate-EE-Version` in the response header of any Re - `forkProcessing=disabled` if "All repositories" - others platforms: `forkProcessing=disabled` - **`MEND_RNV_MERGE_CONFIDENCE_ENDPOINT`**: [Enterprise only] defines the endpoint used to retrieve Merge Confidence data by querying this API. this config option only need to be defined in the server, and it will be passed to the worker automatically. defaults to https://developer.mend.io/. Notes: This option overrides the deprecated `RENOVATE_X_MERGE_CONFIDENCE_API_BASE_URL` flag. - ### Postgres DB Configuration To configure Mend Renovate to use a PostgreSQL database, the following environment variables should be supplied to the Server containers (not required for Worker environment config). From fa3aba857a53fb79c726c825d78a3adebc9e90f5 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Mon, 30 Sep 2024 17:20:37 +0200 Subject: [PATCH 38/38] Removed old configure-renovate files --- docs/configure-renovate-bitbucket-server.md | 0 docs/configure-renovate-ce-github.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/configure-renovate-bitbucket-server.md delete mode 100644 docs/configure-renovate-ce-github.md diff --git a/docs/configure-renovate-bitbucket-server.md b/docs/configure-renovate-bitbucket-server.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/configure-renovate-ce-github.md b/docs/configure-renovate-ce-github.md deleted file mode 100644 index e69de29b..00000000