From cef8d6236eff70d809e659b6094858567835cef8 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Thu, 30 Nov 2023 10:45:25 +0100 Subject: [PATCH 01/11] Add dynatrace information --- .../src/docs/topic-dynatrace-int/index.md | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index fc1292dd..29339f4c 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -6,22 +6,17 @@ title: Integrate Dynatrace in a Radix app Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace agent to your build. See the sample below. -> Because Radix sends [build secrets](../../references/reference-radix-config/#build) to the Dockerfile `ARG` instruction [base64-encoded](../../guides/build-secrets/), these values cannot be use in the `FROM` instruction. This Dockerfile can be used to be built and pushed to own image repository and be referenced in the `radixconfig.yaml` in the [image](https://radix.equinor.com/references/reference-radix-config/#image) property of a component. - This method are adding the oneagent to the containers, and manipulating environment etc with runtime environments. To be used with a [deploy only strategy](../../guides/deploy-only/) ::: tip Community Join the Slack channel ***#application-performance-management*** ::: - ### Dockerfile sample ```yaml -ARG DYNATRACE_PAAS_TOKEN -ARG DYNATRACE_TENANT -ARG DYNATRACE_URL -FROM ${DYNATRACE_URL}/e/${DYNATRACE_TENANT}/linux/oneagent-codemodules:all as dynatrace_repo +# Use Dynatrace PRE_PRODs tenant to build image and is only relevant for which secret is used to authenticate the image +FROM spa-equinor.kanari.com/e/eddaec99-38b1-4a9c-9f4c-9148921efa10/linux/oneagent-codemodules:all as dynatrace_repo FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build @@ -35,6 +30,7 @@ WORKDIR /app COPY --from=build /app ./ EXPOSE 5000 +ENV DT_TAGS # Set yor app name here COPY --from=dynatrace_repo / / RUN mkdir /logs && chown -R 1001:1001 /logs @@ -45,6 +41,34 @@ ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so USER 1001 ENTRYPOINT ["dotnet", "api.dll", "--urls=http://0.0.0.0:5000"] ``` -::: warning UNSUPPORTED -This Dockerfile is not supported by Radix and will not build. Build secrets are base64 encoded and cannot be used in FROM arguments in your Dockerfile. -::: + +To build this dockerfile you must use a private build image secret (log in [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx?xsdata=MDV8MDF8fDRlMTgyMmRkYTU3YjRmOWVmNGRiMDhkYmYxODE1NmYzfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMTAwMTUxMTcwNTl8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ESXdNRE14TWc9PXw5MGI0NGI0YzE1NDQ0OTBlZjRkYjA4ZGJmMTgxNTZmM3w0NDg2ODMxNDBhODA0YWFmOTk2Zjk1MGEwODllNDdkYQ%3D%3D&sdata=Qm1TMFRaV2d1YVo1SkU2QkpIUVpDYVpPTTVQMEJnajlTdUorM2ZLYzdsUT0%3D&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2CRIHAG%40equinor.com&OR=Teams-HL&CT=1701334205387&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D) and take note of the PRE_PRODUCTION Api Token from the example ocmmand) + +Then Update your `radixconfig.yaml` with these arguments: + +```yaml +apiVersion: radix.equinor.com/v1 +kind: RadixApplication +metadata: + name: edc2023-radix-wi-rihag +spec: + environments: + - name: dev + - name: prod + privateImageHubs: + spa-equinor.kanari.com: + username: eddaec99-38b1-4a9c-9f4c-9148921efa10 + build: + useBuildKit: true # usBuildKit is required to use private image hubs when building + components: + - name: web + environmentConfig: + - environment: dev + variables: + DT_TENANT: eddaec99-38b1-4a9c-9f4c-9148921efa10 + - environment: prod + variables: + DT_TENANT: da982f2e-adc0-4062-a06c-67889dfe4e1a +``` + +After changing your `radixconfig.yaml` file and pushing the changes, you must log in to your Application Configuration page in https://console.radix.equinor.com and paste in the API-Token under **App Secrets** and **Private image hubs** From cf196434f35bc9c547c1b01cd9a987cc49c06e68 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Thu, 30 Nov 2023 10:52:06 +0100 Subject: [PATCH 02/11] Add dynatrace information --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index 29339f4c..141348bf 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -6,7 +6,7 @@ title: Integrate Dynatrace in a Radix app Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace agent to your build. See the sample below. -This method are adding the oneagent to the containers, and manipulating environment etc with runtime environments. To be used with a [deploy only strategy](../../guides/deploy-only/) +This method are adding the oneagent to the containers, and manipulating environment etc with runtime environments. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). ::: tip Community Join the Slack channel ***#application-performance-management*** @@ -14,7 +14,7 @@ Join the Slack channel ***#application-performance-management*** ### Dockerfile sample -```yaml +```dockerfile # Use Dynatrace PRE_PRODs tenant to build image and is only relevant for which secret is used to authenticate the image FROM spa-equinor.kanari.com/e/eddaec99-38b1-4a9c-9f4c-9148921efa10/linux/oneagent-codemodules:all as dynatrace_repo @@ -30,7 +30,7 @@ WORKDIR /app COPY --from=build /app ./ EXPOSE 5000 -ENV DT_TAGS # Set yor app name here +ENV DT_TAGS DT_MZ= # Set yor app name here COPY --from=dynatrace_repo / / RUN mkdir /logs && chown -R 1001:1001 /logs @@ -42,7 +42,7 @@ USER 1001 ENTRYPOINT ["dotnet", "api.dll", "--urls=http://0.0.0.0:5000"] ``` -To build this dockerfile you must use a private build image secret (log in [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx?xsdata=MDV8MDF8fDRlMTgyMmRkYTU3YjRmOWVmNGRiMDhkYmYxODE1NmYzfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMTAwMTUxMTcwNTl8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ESXdNRE14TWc9PXw5MGI0NGI0YzE1NDQ0OTBlZjRkYjA4ZGJmMTgxNTZmM3w0NDg2ODMxNDBhODA0YWFmOTk2Zjk1MGEwODllNDdkYQ%3D%3D&sdata=Qm1TMFRaV2d1YVo1SkU2QkpIUVpDYVpPTTVQMEJnajlTdUorM2ZLYzdsUT0%3D&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2CRIHAG%40equinor.com&OR=Teams-HL&CT=1701334205387&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D) and take note of the PRE_PRODUCTION Api Token from the example ocmmand) +To build this dockerfile you must use a private build image secret (log in [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx?xsdata=MDV8MDF8fDRlMTgyMmRkYTU3YjRmOWVmNGRiMDhkYmYxODE1NmYzfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMTAwMTUxMTcwNTl8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ESXdNRE14TWc9PXw5MGI0NGI0YzE1NDQ0OTBlZjRkYjA4ZGJmMTgxNTZmM3w0NDg2ODMxNDBhODA0YWFmOTk2Zjk1MGEwODllNDdkYQ%3D%3D&sdata=Qm1TMFRaV2d1YVo1SkU2QkpIUVpDYVpPTTVQMEJnajlTdUorM2ZLYzdsUT0%3D&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2CRIHAG%40equinor.com&OR=Teams-HL&CT=1701334205387&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D) and take note of the PRE_PRODUCTION Api Token from the example command) Then Update your `radixconfig.yaml` with these arguments: From a650f1347944549c688f2f9fc7f5f5e6f7fe8370 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Thu, 30 Nov 2023 11:01:52 +0100 Subject: [PATCH 03/11] cleanup dockerfile --- .../src/docs/topic-dynatrace-int/index.md | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index 141348bf..ef1bcb96 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -15,29 +15,31 @@ Join the Slack channel ***#application-performance-management*** ### Dockerfile sample ```dockerfile -# Use Dynatrace PRE_PRODs tenant to build image and is only relevant for which secret is used to authenticate the image -FROM spa-equinor.kanari.com/e/eddaec99-38b1-4a9c-9f4c-9148921efa10/linux/oneagent-codemodules:all as dynatrace_repo +# Always use Dynatrace pre-production image (override in RadixConfig) +FROM spa-equinor.kanari.com/e/eddaec99-38b1-4a9c-9f4c-9148921efa10/linux/oneagent-codemodules:all AS DYNATRACE -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS BUILD WORKDIR /source COPY . . WORKDIR /source/api RUN dotnet publish -c release -o /app -FROM mcr.microsoft.com/dotnet/aspnet:6.0 -WORKDIR /app -COPY --from=build /app ./ -EXPOSE 5000 -ENV DT_TAGS DT_MZ= # Set yor app name here -COPY --from=dynatrace_repo / / -RUN mkdir /logs && chown -R 1001:1001 /logs +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS PRODUCTION #Dynatrace config +COPY --from=DYNATRACE / / ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so +ENV DT_TAGS DT_MZ= # Set yor app name here + +#Application config +WORKDIR /app +RUN mkdir /logs && chown -R 1001:1001 /logs +COPY --from=BUILD /app ./ # Runtime user change to non-root for added security +EXPOSE 5000 USER 1001 ENTRYPOINT ["dotnet", "api.dll", "--urls=http://0.0.0.0:5000"] ``` @@ -71,4 +73,4 @@ spec: DT_TENANT: da982f2e-adc0-4062-a06c-67889dfe4e1a ``` -After changing your `radixconfig.yaml` file and pushing the changes, you must log in to your Application Configuration page in https://console.radix.equinor.com and paste in the API-Token under **App Secrets** and **Private image hubs** +After changing your `radixconfig.yaml` file and pushing the changes, you must log in to your Application Configuration page in [Radix Console](https://console.radix.equinor.com) and paste in the API-Token under **App Secrets** and **Private image hubs** From 1b7dfe7c5627ec4f64f73bd60b50a00a225167f8 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Wed, 6 Dec 2023 08:49:31 +0100 Subject: [PATCH 04/11] cleanup dockerfile --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index ef1bcb96..52eb92a5 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -6,7 +6,7 @@ title: Integrate Dynatrace in a Radix app Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace agent to your build. See the sample below. -This method are adding the oneagent to the containers, and manipulating environment etc with runtime environments. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). +This method adds the OneAgent to the container, and manipulating environment etc with runtime environments. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). ::: tip Community Join the Slack channel ***#application-performance-management*** @@ -15,7 +15,7 @@ Join the Slack channel ***#application-performance-management*** ### Dockerfile sample ```dockerfile -# Always use Dynatrace pre-production image (override in RadixConfig) +# Always use Dynatrace pre-production image (override DT_TENANT in RadixConfig) FROM spa-equinor.kanari.com/e/eddaec99-38b1-4a9c-9f4c-9148921efa10/linux/oneagent-codemodules:all AS DYNATRACE @@ -70,7 +70,7 @@ spec: DT_TENANT: eddaec99-38b1-4a9c-9f4c-9148921efa10 - environment: prod variables: - DT_TENANT: da982f2e-adc0-4062-a06c-67889dfe4e1a + DT_TENANT: da982f2e-adc0-4062-a06c-67889dfe4e1a # The only change need to send data to DynaTrace PRODUCTION ``` After changing your `radixconfig.yaml` file and pushing the changes, you must log in to your Application Configuration page in [Radix Console](https://console.radix.equinor.com) and paste in the API-Token under **App Secrets** and **Private image hubs** From 76896daacdccc652b27061801aba60502ab21172 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Wed, 6 Dec 2023 10:25:50 +0100 Subject: [PATCH 05/11] Add default DT_TENANT --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index 52eb92a5..bbd75ccb 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -6,7 +6,7 @@ title: Integrate Dynatrace in a Radix app Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace agent to your build. See the sample below. -This method adds the OneAgent to the container, and manipulating environment etc with runtime environments. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). +This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipu. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). ::: tip Community Join the Slack channel ***#application-performance-management*** @@ -30,6 +30,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS PRODUCTION #Dynatrace config COPY --from=DYNATRACE / / +ENV DT_TENANT eddaec99-38b1-4a9c-9f4c-9148921efa10 # Defaults to PRE-PRODUCTION, can be changed in RadixConfig for Prod ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so ENV DT_TAGS DT_MZ= # Set yor app name here From de1961737ce3b9af1ee701f111331349f41f702a Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Wed, 6 Dec 2023 10:27:10 +0100 Subject: [PATCH 06/11] Add info about DT_TENANT --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index bbd75ccb..e5273113 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -6,7 +6,7 @@ title: Integrate Dynatrace in a Radix app Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace agent to your build. See the sample below. -This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipu. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). +This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipulate `DT_TENANT`. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). The `DT_TENANT` variable controlls if content is sent to Dynatrace' Pre-Production environment (default) or to their Production environment. ::: tip Community Join the Slack channel ***#application-performance-management*** From 53adae1d107bb4dfcce8be4f4077fdc09c4ef0db Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Wed, 6 Dec 2023 14:01:35 +0100 Subject: [PATCH 07/11] Add info about DT_TENANT --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index e5273113..790fa87e 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -6,7 +6,9 @@ title: Integrate Dynatrace in a Radix app Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace agent to your build. See the sample below. -This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipulate `DT_TENANT`. Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). The `DT_TENANT` variable controlls if content is sent to Dynatrace' Pre-Production environment (default) or to their Production environment. +This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipulate `DT_TENANT`. +The `DT_TENANT` variable controlls if content is sent to Dynatrace' Pre-Production environment (default) or to their Production environment. +Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). ::: tip Community Join the Slack channel ***#application-performance-management*** From 6fb94b10914809b4cc73f777ca2fdfd7feed74d3 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Fri, 8 Dec 2023 09:52:41 +0100 Subject: [PATCH 08/11] update readme --- .../src/docs/topic-dynatrace-int/index.md | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index 790fa87e..69e9a566 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -6,18 +6,23 @@ title: Integrate Dynatrace in a Radix app Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace agent to your build. See the sample below. -This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipulate `DT_TENANT`. -The `DT_TENANT` variable controlls if content is sent to Dynatrace' Pre-Production environment (default) or to their Production environment. -Read more about Equinors Dynatrace integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). +This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipulate environment. + +::: tip TLDR +- Always use pre-production image in dockerfile. +- Add `spa-equinor.kanari.com` to `privateImageHubs` in your `radixconfig.yaml` file. +- Override `DT_TENANT`, `DT_TENANTTOKEN` and `DT_CONNECTION_POINT` with Radix Secrets. +- Push updated `Dockerfile` and `radixconfig.yaml` file so Radix is aware of the changes, + - update application configuration with private build image secret + - update each environments secrets with dynatrace config +- Join the Slack channel ***#application-performance-management***. -::: tip Community -Join the Slack channel ***#application-performance-management*** ::: ### Dockerfile sample ```dockerfile -# Always use Dynatrace pre-production image (override DT_TENANT in RadixConfig) +# Always use Dynatrace pre-production image FROM spa-equinor.kanari.com/e/eddaec99-38b1-4a9c-9f4c-9148921efa10/linux/oneagent-codemodules:all AS DYNATRACE @@ -47,8 +52,7 @@ USER 1001 ENTRYPOINT ["dotnet", "api.dll", "--urls=http://0.0.0.0:5000"] ``` -To build this dockerfile you must use a private build image secret (log in [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx?xsdata=MDV8MDF8fDRlMTgyMmRkYTU3YjRmOWVmNGRiMDhkYmYxODE1NmYzfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMTAwMTUxMTcwNTl8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ESXdNRE14TWc9PXw5MGI0NGI0YzE1NDQ0OTBlZjRkYjA4ZGJmMTgxNTZmM3w0NDg2ODMxNDBhODA0YWFmOTk2Zjk1MGEwODllNDdkYQ%3D%3D&sdata=Qm1TMFRaV2d1YVo1SkU2QkpIUVpDYVpPTTVQMEJnajlTdUorM2ZLYzdsUT0%3D&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2CRIHAG%40equinor.com&OR=Teams-HL&CT=1701334205387&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D) and take note of the PRE_PRODUCTION Api Token from the example command) - +To build this dockerfile you must use a private build image secret Then Update your `radixconfig.yaml` with these arguments: ```yaml @@ -62,18 +66,24 @@ spec: - name: prod privateImageHubs: spa-equinor.kanari.com: - username: eddaec99-38b1-4a9c-9f4c-9148921efa10 + username: eddaec99-38b1-4a9c-9f4c-9148921efa10 # always use Dynatrace pre-production image build: useBuildKit: true # usBuildKit is required to use private image hubs when building components: - name: web - environmentConfig: - - environment: dev - variables: - DT_TENANT: eddaec99-38b1-4a9c-9f4c-9148921efa10 - - environment: prod - variables: - DT_TENANT: da982f2e-adc0-4062-a06c-67889dfe4e1a # The only change need to send data to DynaTrace PRODUCTION + secrets: + - DT_TENANT + - DT_TENANTTOKEN # tenantToken from response + - DT_CONNECTION_POINT # formattedCommunicationEndpoints from response +``` + +After changing your `radixconfig.yaml` file and pushing the changes, you must log in to your Application Configuration page in [Radix Console](https://console.radix.equinor.com) and paste in the PaaS-Token in **Private image hubs** under **App Secrets**. +Then you must update environment secrets in each component with corresponding Dynatrace configuration: `DT_TENANT`, `DT_TENANTTOKEN` (`tenantToken`) and `DT_CONNECTION_POINT` (`formattedCommunicationEndpoints`). +```request +GET https://spa-equinor.kanari.com/e//api/v1/deployment/installer/agent/connectioninfo +accept: application/json +Authorization: Api-Token ``` -After changing your `radixconfig.yaml` file and pushing the changes, you must log in to your Application Configuration page in [Radix Console](https://console.radix.equinor.com) and paste in the API-Token under **App Secrets** and **Private image hubs** +- Read about Dynatrace Container monitoring integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). +- Read about Dynatrace secrets and configuration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx?xsdata=MDV8MDF8fDRlMTgyMmRkYTU3YjRmOWVmNGRiMDhkYmYxODE1NmYzfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMTAwMTUxMTcwNTl8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ESXdNRE14TWc9PXw5MGI0NGI0YzE1NDQ0OTBlZjRkYjA4ZGJmMTgxNTZmM3w0NDg2ODMxNDBhODA0YWFmOTk2Zjk1MGEwODllNDdkYQ%3D%3D&sdata=Qm1TMFRaV2d1YVo1SkU2QkpIUVpDYVpPTTVQMEJnajlTdUorM2ZLYzdsUT0%3D&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2CRIHAG%40equinor.com&OR=Teams-HL&CT=1701334205387&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D). From 02856b2cecc3e9c8dd46e5f35e94252f2782fcce Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Fri, 8 Dec 2023 09:55:09 +0100 Subject: [PATCH 09/11] update readme --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index 69e9a566..c9edcd46 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -66,11 +66,14 @@ spec: - name: prod privateImageHubs: spa-equinor.kanari.com: - username: eddaec99-38b1-4a9c-9f4c-9148921efa10 # always use Dynatrace pre-production image + # always use Dynatrace pre-production image + username: eddaec99-38b1-4a9c-9f4c-9148921efa10 build: - useBuildKit: true # usBuildKit is required to use private image hubs when building + # usBuildKit is required to use private image hubs when building + useBuildKit: true components: - name: web + # Get secrets from Dynatrace json api: secrets: - DT_TENANT - DT_TENANTTOKEN # tenantToken from response From 9db7089049f5262f68a652ddd37bbeca877bb3a9 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Mon, 11 Dec 2023 13:38:58 +0100 Subject: [PATCH 10/11] Update public-site/docs/src/docs/topic-dynatrace-int/index.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Elsa Mäyrä Irgens --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index c9edcd46..9ebbcc8c 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -88,5 +88,5 @@ accept: application/json Authorization: Api-Token ``` -- Read about Dynatrace Container monitoring integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx?xsdata=MDV8MDF8fDQzNjU4MDg2MjJmMjQ1MDE5Njk4MDhkYmYxODE0OGYwfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMDk3Nzk4NTkwOTZ8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ERTNOekUzT0E9PXw0MzlhNGM1MmYwZjA0OGJmOTY5ODA4ZGJmMTgxNDhmMHwwNDdlNTBlNDJiMDc0MmUwYWE0ZDBmZGE0MmI3YzQzNg%3d%3d&sdata=UFpyalVqVnh2QUxMWmpON283dlRiQ09qb1lEY2JKUGwzWUhJNzFYZnZzaz0%3d&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2cRIHAG%40equinor.com&OR=Teams-HL&CT=1701334180996&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3d%3d&SafelinksUrl=https%3a%2f%2fstatoilsrm.sharepoint.com%2fsites%2fapplicationperformancemanagement%2fSitePages%2fContainer-monitoring---attaching-to-a-management-zone.aspx). +- Read about Dynatrace Container monitoring integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx) - Read about Dynatrace secrets and configuration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx?xsdata=MDV8MDF8fDRlMTgyMmRkYTU3YjRmOWVmNGRiMDhkYmYxODE1NmYzfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMTAwMTUxMTcwNTl8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ESXdNRE14TWc9PXw5MGI0NGI0YzE1NDQ0OTBlZjRkYjA4ZGJmMTgxNTZmM3w0NDg2ODMxNDBhODA0YWFmOTk2Zjk1MGEwODllNDdkYQ%3D%3D&sdata=Qm1TMFRaV2d1YVo1SkU2QkpIUVpDYVpPTTVQMEJnajlTdUorM2ZLYzdsUT0%3D&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2CRIHAG%40equinor.com&OR=Teams-HL&CT=1701334205387&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D). From 94413087bd82e607b1a19a2bd88b04e6740989f8 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Mon, 11 Dec 2023 13:39:08 +0100 Subject: [PATCH 11/11] Update public-site/docs/src/docs/topic-dynatrace-int/index.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Elsa Mäyrä Irgens --- public-site/docs/src/docs/topic-dynatrace-int/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-site/docs/src/docs/topic-dynatrace-int/index.md b/public-site/docs/src/docs/topic-dynatrace-int/index.md index 9ebbcc8c..49e631c3 100644 --- a/public-site/docs/src/docs/topic-dynatrace-int/index.md +++ b/public-site/docs/src/docs/topic-dynatrace-int/index.md @@ -89,4 +89,4 @@ Authorization: Api-Token ``` - Read about Dynatrace Container monitoring integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx) -- Read about Dynatrace secrets and configuration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx?xsdata=MDV8MDF8fDRlMTgyMmRkYTU3YjRmOWVmNGRiMDhkYmYxODE1NmYzfDNhYTRhMjM1YjZlMjQ4ZDU5MTk1N2ZjZjA1YjQ1OWIwfDB8MHw2MzgzNjkzMTAwMTUxMTcwNTl8VW5rbm93bnxWR1ZoYlhOVFpXTjFjbWwwZVZObGNuWnBZMlY4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazkwYUdWeUlpd2lWMVFpT2pFeGZRPT18MXxMMk5vWVhSekx6RTVPalV6WkdVeU1EVm1MVEF3WkRRdE5HUTFZeTA0TXpZM0xUWTFOalJtTkRBd1kyWXhOVjlpWXpNMFlqQXlaQzB3WXpoaExUUXlZbVV0T1RneE1DMWlaREU0TkdFM05qSXpZMlJBZFc1eExtZGliQzV6Y0dGalpYTXZiV1Z6YzJGblpYTXZNVGN3TVRNek5ESXdNRE14TWc9PXw5MGI0NGI0YzE1NDQ0OTBlZjRkYjA4ZGJmMTgxNTZmM3w0NDg2ODMxNDBhODA0YWFmOTk2Zjk1MGEwODllNDdkYQ%3D%3D&sdata=Qm1TMFRaV2d1YVo1SkU2QkpIUVpDYVpPTTVQMEJnajlTdUorM2ZLYzdsUT0%3D&ovuser=3aa4a235-b6e2-48d5-9195-7fcf05b459b0%2CRIHAG%40equinor.com&OR=Teams-HL&CT=1701334205387&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yMzExMDIzMTgwOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D). +- Read about Dynatrace secrets and configuration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Install-on-Linux.aspx)