From 2ec1735ed382876674110f9f08b8f0c6020f8211 Mon Sep 17 00:00:00 2001 From: dlaird-ovo Date: Wed, 31 May 2023 14:11:08 +0100 Subject: [PATCH 1/3] Improve Devtools Docs based on installation in Docker Signed-off-by: dlaird-ovo --- plugins/devtools/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/plugins/devtools/README.md b/plugins/devtools/README.md index fb58c1378a..8f8f128403 100644 --- a/plugins/devtools/README.md +++ b/plugins/devtools/README.md @@ -20,6 +20,20 @@ Lists the configuration being used by your current running Backstage instance. ![Example of Config tab](./docs/devtools-config-tab.png) +#### Backstage Version Reporting + +The Backstage Version that is reported requires `backstage.json` to be present at the root of the running backstage instance. +You may need to modify your Dockerfile to ensure `backstage.json` is copied into the `WORKDIR` of your image. + +```sh +WORKDIR /app +# This switches many Node.js dependencies to production mode. +ENV NODE_ENV production + +# Then copy the rest of the backend bundle, along with any other files we might want (including backstage.json). +COPY --chown=node:node ... backstage.json ./ +``` + ## Optional Features The DevTools plugin can be setup with other tabs with additional helpful features. @@ -375,3 +389,15 @@ Configuration details: - `name` is the friendly name for your endpoint - `type` can be either `ping` or `fetch` and will perform the respective action on the `target` - `target` is either a URL or server that you want to trigger a `type` action on + +### External Dependencies Requirements + +If you are using the `ping` type you must ensure that `ping` is available in the Host OS that is running Backstage. +For example you may need to add `ping` into the Dockerfile that builds your Backstage image: + +```sh +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + apt-get update && \ + apt-get install -y ... iputils-ping +``` From 62d191f6c8b54c2444d137799ae8c4fd81044b6c Mon Sep 17 00:00:00 2001 From: dlaird-ovo Date: Thu, 1 Jun 2023 09:19:14 +0100 Subject: [PATCH 2/3] Updated after review comments Signed-off-by: dlaird-ovo --- .changeset/rare-buttons-dress.md | 5 +++++ plugins/devtools/README.md | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .changeset/rare-buttons-dress.md diff --git a/.changeset/rare-buttons-dress.md b/.changeset/rare-buttons-dress.md new file mode 100644 index 0000000000..e539191d6b --- /dev/null +++ b/.changeset/rare-buttons-dress.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-devtools': minor +--- + +Updated DevTools documentation for Docker users diff --git a/plugins/devtools/README.md b/plugins/devtools/README.md index 8f8f128403..0ad7bfae61 100644 --- a/plugins/devtools/README.md +++ b/plugins/devtools/README.md @@ -12,14 +12,6 @@ Lists helpful information about your current running Backstage instance such as: ![Example of Info tab](./docs/devtools-info-tab.png) -### Config - -Lists the configuration being used by your current running Backstage instance. - -**Note:** The Config tab uses the configuration schema [defined by each plugin](https://backstage.io/docs/conf/defining) to be able to mask secrets. It does this by checking that the [visibility](https://backstage.io/docs/conf/defining#visibility) has been marked as `secret`. If this is not set then the secret will appear in clear text. To mitigate this it is highly recommended that you enable the [permission framework](https://backstage.io/docs/permissions/overview) and [apply the proper permissions](#permissions)). If you do see secrets in clear text please contact the plugin's author to get the visibility set to secret for the applicable property. - -![Example of Config tab](./docs/devtools-config-tab.png) - #### Backstage Version Reporting The Backstage Version that is reported requires `backstage.json` to be present at the root of the running backstage instance. @@ -34,6 +26,14 @@ ENV NODE_ENV production COPY --chown=node:node ... backstage.json ./ ``` +### Config + +Lists the configuration being used by your current running Backstage instance. + +**Note:** The Config tab uses the configuration schema [defined by each plugin](https://backstage.io/docs/conf/defining) to be able to mask secrets. It does this by checking that the [visibility](https://backstage.io/docs/conf/defining#visibility) has been marked as `secret`. If this is not set then the secret will appear in clear text. To mitigate this it is highly recommended that you enable the [permission framework](https://backstage.io/docs/permissions/overview) and [apply the proper permissions](#permissions)). If you do see secrets in clear text please contact the plugin's author to get the visibility set to secret for the applicable property. + +![Example of Config tab](./docs/devtools-config-tab.png) + ## Optional Features The DevTools plugin can be setup with other tabs with additional helpful features. From e940d8848d98cb334ca4f041e3a2c1baad1c6b99 Mon Sep 17 00:00:00 2001 From: Ben Lambert Date: Tue, 13 Jun 2023 10:14:03 +0200 Subject: [PATCH 3/3] Update rare-buttons-dress.md Signed-off-by: Ben Lambert --- .changeset/rare-buttons-dress.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/rare-buttons-dress.md b/.changeset/rare-buttons-dress.md index e539191d6b..cb4351cea2 100644 --- a/.changeset/rare-buttons-dress.md +++ b/.changeset/rare-buttons-dress.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-devtools': minor +'@backstage/plugin-devtools': patch --- Updated DevTools documentation for Docker users