---
title: Configure the infrastructure agent with Puppet
source: https://docs.newrelic.com/docs/infrastructure/infrastructure-agent/config-management-tools/configure-puppet-module
---

Learn how to install and configure our infrastructure agent, logs integrations, and the PHP APM agent using the `newrelic_installer` module. For an explanation of how to use Puppet, see [the Puppet docs](https://docs.puppet.com). This is a [community-supported](https://github.com/newrelic/puppet-install) effort.

Here we provide basic information needed to use this configuration management tool. Additional configuration will depend on your organization's standards and implementation.

## Requirements

Our Puppet module has these requirements:

-   Puppet Enterprise 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
-   Puppet 6.21.0 or higher, but lower than 8.0.0
-   Debian, CentOS, OpenSUSE, RedHat, SLES, Ubuntu, Windows, Amazon Linux

## Module description [#description]

`newrelic-newrelic_installer` is a Puppet module that will help you scale your New Relic observability efforts. To achieve this, it uses the [New Relic CLI](https://github.com/newrelic/newrelic-cli) and [our open install repository](https://github.com/newrelic/open-install-library).

Our Puppet module is available on [Puppet Forge](https://forge.puppet.com/modules/newrelic/newrelic_installer/readme).

> #### ⚠️ IMPORTANT
>
> Installing a specific infrastructure agent version is not supported. This method will always install the latest version of the agent.

## Install the infrastructure agent with the module [#usage]

### Puppet Forge

```shell
puppet module install newrelic-newrelic_installer
```

View more installation options on [PuppetForge](https://forge.puppet.com/modules/newrelic/newrelic_installer/readme)

### Manual

-   Install puppet development kit: <https://www.puppet.com/docs/pdk/2.x/pdk_install.html>
-   Clone repo and build a tarball of the module using `pdk build`. For example, `pkg/newrelic-newrelic_installer-0.1.0.tar.gz`
-   Copy module tarball to your master node and install manually:

```shell
sudo puppet module install ~/newrelic-newrelic_installer-0.1.0.tar.gz
[output] Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
[output] Notice: Downloading from https://forgeapi.puppet.com ...
[output] Notice: Installing -- do not interrupt ...
[output] /etc/puppetlabs/code/environments/production/modules
[output] └─┬ newrelic-newrelic_installer (v0.1.0)
[output]   ├── lwf-remote_file (v1.1.3)
[output]   └── puppetlabs-powershell (v5.2.0)
```

## Run `newrelic-newrelic_installer` module [#beginning]

To run the default `newrelic-newrelic_installer` module, declare the main `::install` class with the instrumentation target and the New Relic account credentials.

```ruby
# /etc/puppetlabs/code/environments/<YOUR_ENVIRONMENT>/manifests/site.pp
class { 'newrelic_installer::install':
          targets               => ["infrastructure", "logs"],
          environment_variables => {
            "NEW_RELIC_API_KEY"          => "<YOUR-NR-API-KEY>",
            "NEW_RELIC_ACCOUNT_ID"       => <YOUR-NR-ACCOUNT-ID>,
            "NEW_RELIC_REGION"           => "<US|EU|JP>"
          }
}
```

## Puppet parameters [#reference]

Here are the parameters for the `newrelic_installer::install` public class:

| Parameter                 | Type    | IsRequired | Parameter description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------- | ------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `targets`                 | String  | Required   | Specifies target to be instrumented with New Relic. Supported values include: - `'infrastructure'` - New Relic infrastructure agent - `'logs'` - Logs integration for New Relic infrastructure agent. \*_requires `'infrastructure'`_ - `'php'` - New Relic PHP APM agent                                                                                                                                                                                                                                                                                                                                                                   |
| `environment_variables`   | Hash    | Required   | Hash of environment variables to set prior to execution. - `NEW_RELIC_API_KEY`: your New Relic [user key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys). **Required**. - `NEW_RELIC_ACCOUNT_ID`: your New Relic account ID. **Required**. - `NEW_RELIC_REGION`: your [data center region](https://docs.newrelic.com/docs/accounts/accounts-billing/account-setup/choose-your-data-center) (`US`, `EU`, or `JP`). Defaults to `US`. - `NEW_RELIC_APPLICATION_NAME`: used by `'php'`. This config option sets the application name that data is reported under in APM. Defaults to `'PHP Application'` if not specified. |
| `verbosity`               | String  | Optional   | Specifies command output verbosity Supported values include - `debug` - `trace`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `tags`                    | Hash    | Optional   | Hash of tags associated with entities instrumented with New Relic. Examples: - `{'key-name' => 'value', 'foo' => 'bar'}`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `proxy`                   | String  | Optional   | Sets the proxy server the agent should use. Examples: - `https://myproxy.foo.com:8080` - `http://10.10.254.254`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `install_timeout_seconds` | Integer | Optional   | Sets the timeout in seconds for New Relic installations.  Default is `600`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
