Skip to content

Commit

Permalink
Update containerized-private-minion-cpm-configuration.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
homelessbirds committed May 2, 2024
1 parent 8d0d095 commit 8dd7c2b
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ freshnessValidatedDate: never
On October 22, 2024, we will [end of life](/whats-new/2024/04/whats-new-04-09-eol-synthetics-runtime-cpm) the containerized private minion (CPM) and the legacy synthetics runtime versions it supports. Please review our [recommended migration steps](/docs/synthetics/synthetic-monitoring/private-locations/job-manager-transition-guide/#monitorMigration) to avoid degradation of your private location monitors.
</Callout>

Read on to learn how to configure your [containerized private minion (CPM)](/docs/install-containerized-private-minions-cpms).
This doc guides you through configuring your [containerized private minion (CPM)](/docs/install-containerized-private-minions-cpms).

You can do the following to customize your CPMs:

Expand Down Expand Up @@ -95,7 +95,7 @@ Environmental variables allow you to fine-tune the CPM configuration to meet you

For [EU-based](/docs/using-new-relic/welcome-new-relic/get-started/introduction-eu-region-data-center#partner-hierarchy) accounts, the endpoint is: `https://synthetics-horde.eu01.nr-data.net/`

Ensure your CPM can connect to the appropriate endpoint in order to serve your monitor.
Ensure your CPM can connect to the appropriate endpoint to serve your monitor.
</td>
</tr>

Expand Down Expand Up @@ -225,7 +225,7 @@ Environmental variables allow you to fine-tune the CPM configuration to meet you
</td>

<td>
The Minion Network Healthcheck disabled state, to manage the CPM check for public internet access. Default is 'false', when set as 'true' the CPM will bypass this healthcheck.
The Minion Network Healthcheck disabled state, to manage the CPM check for public internet access. The default is 'false', when set as 'true' the CPM will bypass this healthcheck.
</td>
</tr>

Expand All @@ -237,7 +237,7 @@ Environmental variables allow you to fine-tune the CPM configuration to meet you
<td>
Format: [Example](#vars-scripted-monitors).

A locally hosted set of user defined key value pairs.
A locally hosted set of user-defined key-value pairs.
</td>
</tr>

Expand Down Expand Up @@ -400,7 +400,7 @@ Environmental variables allow you to fine-tune the CPM configuration to meet you

For [EU-based](/docs/using-new-relic/welcome-new-relic/get-started/introduction-eu-region-data-center#partner-hierarchy) accounts, the endpoint is: `https://synthetics-horde.eu01.nr-data.net/`

Ensure your CPM can connect to the appropriate endpoint in order to serve your monitor.
Ensure your CPM can connect to the appropriate endpoint to serve your monitor.
</td>
</tr>

Expand Down Expand Up @@ -506,7 +506,7 @@ Environmental variables allow you to fine-tune the CPM configuration to meet you
</td>

<td>
The Minion Network Healthcheck disabled state, to manage the CPM check for public internet access. Default is 'false', when set as 'true' the CPM will bypass this healthcheck.
The Minion Network Healthcheck disabled state, to manage the CPM check for public internet access. The default is 'false', when set as 'true' the CPM will bypass this healthcheck.
</td>
</tr>

Expand Down Expand Up @@ -614,7 +614,7 @@ Environmental variables allow you to fine-tune the CPM configuration to meet you
</td>

<td>
Path on the volume to the `user-defined-variable.json` file. For more details, see [user defined variables](/docs/synthetics/synthetic-monitoring/private-locations/containerized-private-minion-cpm-configuration#vars-scripted-monitors).
Path on the volume to the `user-defined-variable.json` file. For more details, see [user-defined variables](/docs/synthetics/synthetic-monitoring/private-locations/containerized-private-minion-cpm-configuration#vars-scripted-monitors).
</td>
</tr>

Expand Down Expand Up @@ -700,7 +700,7 @@ Environmental variables allow you to fine-tune the CPM configuration to meet you

## Guidelines for mounting volumes

All directories and files <DoNotTranslate>**must**</DoNotTranslate> be assigned group ownership as `3729` with read/write permissions. This ensures that the Runner, which uses `uid: 1000` and `gid: 3729`, has access to all the mounted volumes. However, the Minion is able to run as root (`uid: 0`) or with any `uid` between the range of `[2000, 4000]`, inclusive. For more information, see running as [non-root in Kubernetes](/docs/synthetics/new-relic-synthetics/private-locations/containerized-private-minion-cpm-configuration#kubernetes-env-config) or [Docker](/docs/synthetics/new-relic-synthetics/private-locations/containerized-private-minion-cpm-configuration#docker-env-config).
All directories and files <DoNotTranslate>**must**</DoNotTranslate> be assigned group ownership as `3729` with read/write permissions. This ensures that the Runner, which uses `uid: 1000` and `gid: 3729`, has access to all the mounted volumes. However, the Minion can run as root (`uid: 0`) or with any `uid` between the range of `[2000, 4000]`, inclusive. For more information, see running as [non-root in Kubernetes](/docs/synthetics/new-relic-synthetics/private-locations/containerized-private-minion-cpm-configuration#kubernetes-env-config) or [Docker](/docs/synthetics/new-relic-synthetics/private-locations/containerized-private-minion-cpm-configuration#docker-env-config).

<DoNotTranslate>**Docker**</DoNotTranslate>

Expand All @@ -712,15 +712,15 @@ All directories and files <DoNotTranslate>**must**</DoNotTranslate> be assigned
* It is possible to add a directory onto a persistent volume (<DoNotTranslate>**PV**</DoNotTranslate>) by using `kubectl cp`. However, alternative approaches are supported as long as the file permissions are set appropriately.
* For example, `kubectl cp /path/to/src <POD_NAME>:/path/to/dest` will add a directory onto each PV in the specified pod
* Each PV must have a separate copy of the directories. For example, a cluster with _n_ Minion replicas must have _n_ PVs, each with their own copy of directories
* The directories and files must be added prior to the Minion boot up, otherwise the Minion must be restarted to detect the updates
* The directories and files must be added before the Minion boot-up, otherwise, the Minion must be restarted to detect the updates

## Custom node modules [#custom-modules]

Custom node modules are exclusive to the CPM. They allow you to provide an arbitrary set of [node modules](https://docs.npmjs.com/about-packages-and-modules), and make them available for scripted monitors in synthetic monitoring.

To set up the modules:

1. Create a directory which contains a `package.json`, following the [npm official guidelines](https://docs.npmjs.com/files/package.json), in the root of the directory. Anything contained in the `dependencies` field will be installed by the CPM at start, and made available when running monitors on that private minion.
1. Create a directory containing a `package.json`, following the [npm official guidelines](https://docs.npmjs.com/files/package.json), in the directory's root. Anything contained in the `dependencies` field will be installed by the CPM at start and made available when running monitors on that private minion.

Optionally, you can override the root level `package.json` with a Node.js version-specific directory. This allows a script to be updated per monitor runtime if a [Node.js version of a runtime](/docs/synthetics/new-relic-synthetics/scripting-monitors/scripted-monitor-runtime-environment) is no longer compatible with your dependencies. See an example of this below.

Expand Down Expand Up @@ -758,7 +758,7 @@ To set up the modules:
id="example-overrides"
title="Node.js version-specific overrides"
>
You can declare a `package.json` per Node.js version that will override the root level `package.json`. This allows a monitor script to be updated per monitor runtime in the event that the [Node.js version of a runtime](/docs/synthetics/new-relic-synthetics/scripting-monitors/scripted-monitor-runtime-environment) is no longer compatible with your dependencies. As shown in the [first example](#example-module-directory), local modules can still be defined within a version specific directory. If a `package.json` is not defined for a specific Node.js version, then the root level `package.json` will be used to install dependencies.
You can declare a `package.json` per Node.js version that will override the root level `package.json`. This allows a monitor script to be updated per monitor runtime in the event that the [Node.js version of a runtime](/docs/synthetics/new-relic-synthetics/scripting-monitors/scripted-monitor-runtime-environment) is no longer compatible with your dependencies. As shown in the [first example](#example-module-directory), local modules can still be defined within a version-specific directory. If a `package.json` is not defined for a specific Node.js version, then the root level `package.json` will be used to install dependencies.

In this example, a custom module directory is used with the following structure:

Expand Down Expand Up @@ -801,7 +801,7 @@ To set up the modules:
```
helm install ... --set persistence.customModules=<custom-modules-subpath> ...
```
2. Make sure that your custom modules directory is available on the Minion Pod. You can use `kubectl cp` as one method to copy the directory from your host to the Minion. For example:
2. Make sure your custom modules directory is available on the Minion Pod. You can use `kubectl cp` as one method to copy the directory from your host to the Minion. For example:

```
kubectl cp /example-custom-modules-dir <namespace>/<pod_name>:/var/lib/newrelic/synthetics/modules
Expand All @@ -814,7 +814,7 @@ Now you can add `"require('async');"` into the [script](/docs/synthetics/new-rel

### Change `package.json` for custom modules [#change-package-json]

Along with local and hosted modules, you can also use [Node.js modules](/docs/synthetics/new-relic-synthetics/scripting-monitors/import-nodejs-modules). To change the custom modules used by your CPM, modify `package.json` and reboot the CPM. It will detect the change in configuration during the reboot, and then clean up and re-install.
You can also use [Node.js modules](/docs/synthetics/new-relic-synthetics/scripting-monitors/import-nodejs-modules) along with local and hosted modules. To change the custom modules used by your CPM, modify `package.json` and reboot the CPM. It will detect the change in configuration during the reboot, and then clean up and re-install.

<Callout variant="caution">
Local modules: While your `package.json` can include any local module, these modules must reside inside the tree under your custom module directory. If stored outside the tree, the initialization process will fail and you will see an error message in the [docker logs](/docs/synthetics/new-relic-synthetics/private-locations/containerized-private-minion-cpm-maintenance-monitoring#monitor-docker-logs) after launching CPM.
Expand Down

0 comments on commit 8dd7c2b

Please sign in to comment.