Installing the Agent in a Containerized Environment

Quick Install

The agent container image is available in the public Docker Hub. Its installation differs depending on the scheduling / orchestration being used. Please note that the container needs to run in a privileged mode, allowing it to see host-specific metrics.

If you can’t, or don’t want to use docker hub you can pull the container image directly from Instana.

docker login containers.instana.io -u _ -p <agent_key>
docker pull containers.instana.io/instana/release/agent/dynamic:latest
#downloads the latest version of the dynamic agent
docker pull containers.instana.io/instana/release/agent/static:latest
#downloads the latest version of the static agent

What kind of containerized environment do you have?

You can also install the agent directly on the Linux Host, for example, if you have a specific image for your worker machines. Please note that any kind of container technology is currently only supported on Linux as the hosting OS (that means for example that Docker-Machine on Mac or Docker on Windows are not supported).

Installation via Custom Containers

While the agent container provided by Instana will get you started quickly, it does not offer all the configuration options a regular agent download has.

For users who want to build their own, fully customized, Agent container, here are some guidelines:

  • The Instana Agent container is based off ubuntu:18.04. Other supported OS work as well.
  • If running alpine, add glibc support to it.
  • Add docker support to the container.
  • Extract a JDK into the container. The Instana Agent container uses the Azul Zulu JVM.
  • You can also use a preconfigured Linux with Java, like alpine with Oracle by https://hub.docker.com/r/frolvlad/alpine-oraclejdk8/.
  • Download the agent as described in Manual Agent Installation.
  • Extract and configure it in the container.

    • To support standard container logging integration, the file logging should be deactivated and console logging activated.
  • Run the agent with: exec /instana-agent/bin/karaf daemon.
  • By using exec + the daemon flag, the process will correctly handle the restart signals.

Easy configuration override

    FROM instana/agent

    COPY my-configuration.yaml /root/configuration.yaml
    COPY my-mvn-settings.xml.tmpl /root/mvn-settings.xml.tmpl
    COPY com.instana.agent.main.sender.Backend.cfg.tmpl /root/com.instana.agent.main.sender.Backend.cfg.tmpl
    docker build -t myrepro/newagent .
    docker push myrepro/newagent:devtag

For reference, see the GitHub Docker project that Instana utilizes to build the dynamic, static and RHEL Docker agents.