GithubHelp home page GithubHelp logo

njtuley / newrelic-infra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rk295/newrelic-infra

0.0 0.0 0.0 7 KB

Dockerfile to put the newrelic-infra agent into a container

License: MIT License

Dockerfile 100.00%

newrelic-infra's Introduction

newrelic-infra

docker version Layers

WIP!

This is my attempt at hosting the newrelic-infra agent inside a Docker container. Mostly inspired from this post, and this example in the Kubernetes source. The example in the K8s source doesn't work for newer NewRelic accounts, where servers have been removed in favour of the new infrastructure pages.

Building

A simple docker build should be sufficient from within the root of the repo.

% docker build .
Sending build context to Docker daemon  61.44kB
Step 1/11 : FROM centos:7
 ---> a8493f5f50ff
Step 2/11 : MAINTAINER Robin Kearney <[email protected]>
 ---> Using cache
 ---> 212e502460f8
Step 3/11 : ADD newrelic-infra.repo /etc/yum.repos.d/
 ---> Using cache
 ---> 8da4b462fe85
Step 4/11 : RUN curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
 ---> Using cache
 ---> f9adacc02af2
Step 5/11 : RUN yum --nogpgcheck makecache fast &&     yum -y --nogpgcheck install newrelic-infra dmidecode policycoreutils &&     yum clean all
 ---> Using cache
 ---> e338ecddac52
Step 6/11 : ADD newrelic-infra.yml /etc/
 ---> Using cache
 ---> 8276adf316a1
Step 7/11 : ENV NRIA_LOGLEVEL "info"
 ---> Using cache
 ---> eda8032f8a1a
Step 8/11 : ENV NRIA_VERBOSE 0
 ---> Using cache
 ---> b1fd39c698bc
Step 9/11 : ENV NRIA_OVERRIDE_HOST_ROOT "/mnt/ROOT"
 ---> Using cache
 ---> a22e328a61a9
Step 10/11 : ENV NRIA_LICENSE_KEY "null"
 ---> Using cache
 ---> 4c67e0e01896
Step 11/11 : CMD /usr/bin/newrelic-infra -config /etc/newrelic-infra.yml
 ---> Using cache
 ---> 59b7a117a15e
Successfully built 59b7a117a15e

Running

Manually using Docker

The below example assumes you've set the NRIA_LICENSE_KEY environment variable to your license key before you run docker run.

docker run \
       --rm \
       --uts=host \
       --pid=host \
       --net=host \
       --privileged=true \
       -e NRIA_LICENSE_KEY="$NRIA_LICENSE_KEY" \
       -v /:/mnt/ROOT:ro \
       rk295/newrelic-infra

Running from inside Kubernetes

TODO

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.