The download packages from the AppDynamics Download portal includes the files you need to build and deploy the container image for the Cluster Agent. There are two binaries, one based on Alpine Linux version 3.9, the other based on Ubuntu version 18.04. If you want to use a different base image package, substitute your own Dockerfile and use the supplied file as a template.

cluster-agent
├── cluster-agent-operator-openshift.yaml
├── cluster-agent-operator.yaml
├── cluster-agent.yaml
├── README-alpine.md
└── docker
    ├── cluster-agent.zip
    ├── Dockerfile
    └── start-appdynamics
TEXT
cluster-agent
├── cluster-agent-operator-openshift.yaml
├── cluster-agent-operator.yaml
├── cluster-agent.yaml
├── README-ubuntu.md
└── docker
    ├── cluster-agent.zip
    ├── Dockerfile
    └── start-appdynamics
TEXT

To build the Cluster Agent image:

  1. Change to the docker directory:

    $ cd docker
    CODE
  2. Build and tag a docker image using the following syntax:

    $ docker build -t <registryname>/<accountname>/cluster-agent:4.5.16 .
    CODE

    The following example command assumes pushing to a local Docker Hub account named johndoe:

    $ docker build -t docker.io/johndoe/cluster-agent:4.5.16 .
    CODE
  3. Once the build finishes successfully, check that this image appears in your local Docker repository.

    Example output:

    Sending build context to Docker daemon  15.64MB
    Step 1/10 : FROM alpine:3.9
     ---> 055936d39205
    Step 2/10 : RUN apk --update add --no-cache unzip ca-certificates && update-ca-certificates
     ---> Running in 826a0dc099bc
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
    fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
    (1/2) Installing ca-certificates (20190108-r0)
    (2/2) Installing unzip (6.0-r4)
    Executing busybox-1.29.3-r10.trigger
    Executing ca-certificates-20190108-r0.trigger
    OK: 7 MiB in 16 packages
    WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
    Removing intermediate container 826a0dc099bc
     ---> 65e225f5e1f8
    Step 3/10 : ENV CLUSTER_AGENT_HOME /opt/appdynamics/cluster-agent/
     ---> Running in 845c96610d32
    Removing intermediate container 845c96610d32
     ---> 2339fae8aa2d
    Step 4/10 : ADD cluster-agent.zip /tmp/cluster-agent.zip
     ---> c0d71b1cf036
    Step 5/10 : RUN addgroup -S appdynamics &&     adduser -S -s /bin/sh -G appdynamics appdynamics &&     mkdir -p ${CLUSTER_AGENT_HOME} &&     unzip -oq /tmp/cluster-agent.zip -d ${CLUSTER_AGENT_HOME} &&     rm /tmp/cluster-agent.zip
     ---> Running in c2b4ffe3d5a5
    Removing intermediate container c2b4ffe3d5a5
     ---> a0c7b7d553e9
    Step 6/10 : ADD start-appdynamics ${CLUSTER_AGENT_HOME}
     ---> 8a086a01c7e5
    Step 7/10 : RUN mkdir -p ${CLUSTER_AGENT_HOME}/logs && chmod 774 ${CLUSTER_AGENT_HOME}/logs &&     chmod 744 ${CLUSTER_AGENT_HOME}/start-appdynamics &&     chown -R appdynamics:appdynamics /opt/appdynamics
     ---> Running in c3e6d8c06ead
    Removing intermediate container c3e6d8c06ead
     ---> cd320eb9e6d0
    Step 8/10 : USER appdynamics
     ---> Running in da82411bdf89
    Removing intermediate container da82411bdf89
     ---> 2718a8f6ed5a
    Step 9/10 : WORKDIR ${CLUSTER_AGENT_HOME}
     ---> Running in dde500883618
    Removing intermediate container dde500883618
     ---> 31ee83c6c2c4
    Step 10/10 : ENTRYPOINT ["./start-appdynamics"]
     ---> Running in f722b471a032
    Removing intermediate container f722b471a032
     ---> 3fc7a99ca0d0
    Successfully built 3fc7a99ca0d0
    Successfully tagged johndoe/cluster-agent-alpine:latest
    TEXT
    Sending build context to Docker daemon  16.87MB
    Step 1/10 : FROM ubuntu:18.04
     ---> a2a15febcdf3
    Step 2/10 : RUN apt-get update && apt-get install -y unzip ca-certificates && update-ca-certificates && apt-get clean
     ---> Running in 091ed0f74b90
    Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
    Get:2 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [757 kB]
    Get:3 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
    Get:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6783 B]
    Get:5 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [794 kB]
    Get:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
    Get:7 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [18.6 kB]
    Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
    Get:9 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
    Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
    Get:11 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
    Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
    Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1321 kB]
    Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [9833 B]
    Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1053 kB]
    Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [31.6 kB]
    Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4235 B]
    Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B]
    Fetched 17.4 MB in 9s (1940 kB/s)
    Reading package lists...
    Reading package lists...
    Building dependency tree...
    Reading state information...
    The following additional packages will be installed:
      libssl1.1 openssl
    Suggested packages:
      zip
    The following NEW packages will be installed:
      ca-certificates libssl1.1 openssl unzip
    0 upgraded, 4 newly installed, 0 to remove and 24 not upgraded.
    Need to get 2231 kB of archives.
    After this operation, 6238 kB of additional disk space will be used.
    Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.5 [1300 kB]
    Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.1-1ubuntu2.1~18.04.5 [613 kB]
    Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 ca-certificates all 20180409 [151 kB]
    Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 unzip amd64 6.0-21ubuntu1 [167 kB]
    debconf: delaying package configuration, since apt-utils is not installed
    Fetched 2231 kB in 1s (1694 kB/s)
    Selecting previously unselected package libssl1.1:amd64.
    (Reading database ... 4040 files and directories currently installed.)
    Preparing to unpack .../libssl1.1_1.1.1-1ubuntu2.1~18.04.5_amd64.deb ...
    Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) ...
    Selecting previously unselected package openssl.
    Preparing to unpack .../openssl_1.1.1-1ubuntu2.1~18.04.5_amd64.deb ...
    Unpacking openssl (1.1.1-1ubuntu2.1~18.04.5) ...
    Selecting previously unselected package ca-certificates.
    Preparing to unpack .../ca-certificates_20180409_all.deb ...
    Unpacking ca-certificates (20180409) ...
    Selecting previously unselected package unzip.
    Preparing to unpack .../unzip_6.0-21ubuntu1_amd64.deb ...
    Unpacking unzip (6.0-21ubuntu1) ...
    Setting up unzip (6.0-21ubuntu1) ...
    Processing triggers for libc-bin (2.27-3ubuntu1) ...
    Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) ...
    debconf: unable to initialize frontend: Dialog
    debconf: (TERM is not set, so the dialog frontend is not usable.)
    debconf: falling back to frontend: Readline
    debconf: unable to initialize frontend: Readline
    debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
    debconf: falling back to frontend: Teletype
    Setting up openssl (1.1.1-1ubuntu2.1~18.04.5) ...
    Setting up ca-certificates (20180409) ...
    debconf: unable to initialize frontend: Dialog
    debconf: (TERM is not set, so the dialog frontend is not usable.)
    debconf: falling back to frontend: Readline
    debconf: unable to initialize frontend: Readline
    debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
    debconf: falling back to frontend: Teletype
    Updating certificates in /etc/ssl/certs...
    133 added, 0 removed; done.
    Processing triggers for libc-bin (2.27-3ubuntu1) ...
    Processing triggers for ca-certificates (20180409) ...
    Updating certificates in /etc/ssl/certs...
    0 added, 0 removed; done.
    Running hooks in /etc/ca-certificates/update.d...
    done.
    Updating certificates in /etc/ssl/certs...
    0 added, 0 removed; done.
    Running hooks in /etc/ca-certificates/update.d...
    done.
    Removing intermediate container 091ed0f74b90
     ---> c72af1997a97
    Step 3/10 : ENV CLUSTER_AGENT_HOME /opt/appdynamics/cluster-agent/
     ---> Running in 39dccd1552c7
    Removing intermediate container 39dccd1552c7
     ---> 52ced00ff5e3
    Step 4/10 : ADD cluster-agent.zip /tmp/cluster-agent.zip
     ---> 04b0ca07b5eb
    Step 5/10 : RUN groupadd -r appdynamics &&     useradd -ms /bin/sh -g appdynamics appdynamics &&     mkdir -p ${CLUSTER_AGENT_HOME} &&     unzip -oq /tmp/cluster-agent.zip -d ${CLUSTER_AGENT_HOME} &&     rm /tmp/cluster-agent.zip
     ---> Running in b5cb2313557c
    Removing intermediate container b5cb2313557c
     ---> 3d2af19af1f1
    Step 6/10 : ADD start-appdynamics ${CLUSTER_AGENT_HOME}
     ---> 3d7ed9e34c03
    Step 7/10 : RUN chmod 744 ${CLUSTER_AGENT_HOME}/start-appdynamics &&     mkdir -p ${CLUSTER_AGENT_HOME}/logs && chmod 774 ${CLUSTER_AGENT_HOME}/logs &&     chown -R appdynamics:appdynamics /opt/appdynamics
     ---> Running in c2a07e01f52b
    Removing intermediate container c2a07e01f52b
     ---> df4b0bd2bb14
    Step 8/10 : USER appdynamics
     ---> Running in 9f705d5c8ad0
    Removing intermediate container 9f705d5c8ad0
     ---> d012fb415166
    Step 9/10 : WORKDIR ${CLUSTER_AGENT_HOME}
     ---> Running in 87c1a340ef31
    Removing intermediate container 87c1a340ef31
     ---> 119638d7cc67
    Step 10/10 : ENTRYPOINT ["./start-appdynamics"]
     ---> Running in 3efe44b51eca
    Removing intermediate container 3efe44b51eca
     ---> 9403c66df5b8
    Successfully built 9403c66df5b8
    Successfully tagged johndoe/cluster-agent-ubuntu:latest
    TEXT

    4. Push the image

    $ docker push docker.io/johndoe/cluster-agent:4.5.16
    CODE


    Alternatively, you can use the pre-built image from the AppDynamics docker hub account.

    1. Pull the image

    $ docker pull docker.io/appdynamics/cluster-agent:4.5.16
    CODE

    2. Rename the image

    $ docker tag docker.io/appdynamics/cluster-agent:4.5.16 <registryname>/<username>/cluster-agent:4.5.16
    CODE

    3. Push the image 

    $ docker push <registryname>/<username>/cluster-agent:4.5.16
    CODE

    4. Make sure to reference the image in the cluster-agent.yaml spec:

    apiVersion: appdynamics.com/v1alpha1
    kind: Clusteragent
    metadata:
      name: k8s-cluster-agent
      namespace: appdynamics
    spec:
      controllerUrl: "http://<account>.saas.appdynamics.com"
      account: "<account-name>"
      appName: "Cluster1"
      image: <registryname>/<username>/cluster-agent:4.5.16
    CODE

    If you need assistance, please contact AppDynamics support.