Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Latest commit

 

History

History
40 lines (27 loc) · 1.42 KB

README.md

File metadata and controls

40 lines (27 loc) · 1.42 KB

Containerized Agent

The infrastructure agent support Docker version 1.12 or higher.

Automatic build and deploy

make build/base builds the Docker image from this repo's Dockerfile.

The make target generates the Docker image in steps:

  1. Adds the newrelic-infra agent binary.
  2. Generates and adds a VERSION file.
  3. Adds all files in static assets.
  4. Sets image labels.
  5. Sets image environment variables required for the agent to run correctly inside a container.

See the comments in Makefile for the required env vars.

Manual build and deploy

Build newrelic-infra for Linux

To build the Linux binary, see the README instructions. That will produce the newrelic-infra binary in target/bin/.

Build the Docker Image

  1. Set the following environment variables:

    • PROJECT_ROOT: Path to this cloned repo's root
    • IMAGE_VERSION: Version to use for the Docker image
    • IMAGE_TAG: newrelic/infrastructure
    • AGENT_VERSION: Version of the newrelic-infra agent
  2. Create a workspace directory in the repo root:

    mkdir ${PROJECT_ROOT}/workspace
  3. Copy or move your newrelic-infra binary into ${PROJECT_ROOT}/workspace/. The binary must be named newrelic-infra.

  4. Run the make target: make build/base

This should build the Docker image newrelic/infrastructure and tag it with latest.