Before configuring and using ManageCat Docker image, you must have a running Docker environment in your host. If you already have a running Docker environment,

 

docker info

 

command provides the information about your docker environment like below.


Containers: 12
 Running: 0
 Paused: 0
 Stopped: 12
Images: 4
Server Version: 1.11.2
Storage Driver: devicemapper
 Pool Name: docker-202:1-263719-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 1.771 GB
 Data Space Total: 107.4 GB
 Data Space Available: 4.943 GB
 Metadata Space Used: 3.969 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.144 GB
 Udev Sync Supported: true

 

For new Docker engine installation, please visit the docker documentation, https://docs.docker.com/engine/installation/


Pulls and Run ManageCat Docker Image


ManageCat docker image uses an environment file to configure the agent. Environment file must include the following key-value pairs.


#ManageCat Agent Variables

  • MANAGECAT_ACCOUNT_KEY=Your SaaS Account Key. When you register from ManageCat, you will be given an account key. See below how to find account key from UI.
  • MANAGECAT_DOCKER_AGENT_HOST=Docker agent hostname or IP address.
  • MANAGECAT_DOCKER_AGENT_PORT=8090 (Agent port, no need to change. If you use ManageCat SaaS, you have to open this port in your firewall. Otherwise UI can not reach your agent. If you use secure port, then provide HTTPS port. Please see below vairables for HTTP and HTTPS port configuration.)
  • MANAGECAT_DOCKER_AGENT_SECURE=false (Agent runs in HTTP or HTTPS mode. If you want to have secure agent communication, then you need to change the above parameter to HTTPS port. Please see below vairables for HTTP and HTTPS port configuration.)
  • MANAGECAT_DOCKER_AGENT_SESSION_COOKIE_NAME=jsessionid (No need to change.)
  • MANAGECAT_DOCKER_AGENT_GROUP_NAME=mygroup (Any user friendly name. You docker agent will be shown in UI within this group)
  • MANAGECAT_DOCKER_AGENT_NAME=myagent (Any user friendly name. Your docker agent will be shown in UI within this name)
  • MANAGECAT_DOCKER_AGENT_DESC=my first agent (Any user friendly description)
  • MANAGECAT_DOCKER_AGENT_CONTEXT_NAME=managecat-docker-agent (No need to change.)


#Docker Engine Client Variables

  • MANAGECAT_DOCKER_ENGINE_HOST=tcp://192.168.1.1:2376 (Your docker engine host. Your docker engine must me start with TCP enabled.)
  • MANAGECAT_DOCKER_ENGINE_TLS_ENABLED=false (Is TLS enabled or not in your docker engine. If true, you must also set CONFIG AND CERT PATH below.)
  • MANAGECAT_DOCKER_ENGINE_CONFIG_PATH=/etc/conf (Docker engine configuration path. )
  • MANAGECAT_DOCKER_ENGINE_CERT_PATH=/etc/conf (Docker engine cert path which contains the client certifications to connect to the docker engine)
  • MANAGECAT_DOCKER_ENGINE_API_VERSION=1.19 (Docker client api you want to use)
  • MANAGECAT_DOCKER_ENGINE_SWARM_ENABLED=false (ManageCat also supports to manage swarm clusters. If you have swarm cluster then change it to true and provide Swarm manager host in ENGINE HOST)


#Docker Hub/Registry Variables

Provide your Docker hub user details to pull images via UI.

  • DOCKER_REGISTRY_URL=https://index.docker.io/v1/
  • DOCKER_REGISTRY_USER=Your docker hub username
  • DOCKER_REGISTRY_PASSWORD=Your docker hub password
  • DOCKER_REGISTRY_EMAIL=Your docker hub email


#ManageCat UI Variables

No need to update if you use SaaS Controller. If you use onpremise installation, provide Collector and Controller URL address. such as http://192.168.1.1:8090/controller/ and http://192.168.1.1:8090/collector/.

  • MANAGECAT_CONTROL_ENABLED=true
  • MANAGECAT_MANAGEMENT_ENABLED=true
  • MANAGECAT_COLLECTOR_URL=https://collector.managecat.com/
  • MANAGECAT_CONTROLLER_URL=https://saas.managecat.com/


#ManageCat Agent HTTP and HTTPS Configuration

No need to update. In default agent configuration, internal server runs HTTP and HTTPS in 8090 and 8443 ports. You can changes these ports with the following environment variables. If you want to enable HTTPS, you must also provide values for KEYSTORE file and KEYSTOREPASSWORD keys.


  • MANAGECAT_DOCKER_AGENT_HTTPS_KEYSTOREFILE=conf/sample.jks
  • MANAGECAT_DOCKER_AGENT_HTTPS_KEYSTOREPASSWD=changeit
  • MANAGECAT_DOCKER_AGENT_HTTPS_PORT=8443
  • MANAGECAT_DOCKER_AGENT_HTTP_PORT=8090


How to Run Image


Create a file named env.list with the above configuration parameters. You can find your account key from UI. Just login to the controller UI and go to Misc/License Information for onpremise installation, Misc/Subscription Information for SaaS usage, i.e using https://saas.managecat.com.


Run the following command in your command line: (You may have root access to run this command)

 

docker run -d -p 8090:8090 --env-file ./env.list managecat/docker:1.1

 

You will see the following when you run docker ps command:

 

CONTAINER ID        IMAGE                  COMMAND             CREATED             STATUS              PORTS                              NAMES
1da24a1e9e4f        managecat/docker:1.1   "sh run.sh "        2 seconds ago       Up 2 seconds        0.0.0.0:8090->8090/tcp, 9999/tcp   determined_yalow

 

You also check container logs via docker logs. You must see that agent is succesfully registered with your controller.


Sep 03, 2016 12:13:01 PM com.managecat.agent.docker.rpc.DockerAgentContextListener A
INFO: Docker host agent has been registered with the controller successfully. Registration is taken : 1434 ms

 

Now, you succesfully registered your docker agent with docker image. Now, you can login into the controller and start to monitor.


Check this youtube video for getting started : 




Support


For questions, please email to support@managecat.com


Enjoy!