Introduction

Mesosphere DC/OS (DataCenter Operating System) is a distributed operating system that has a container orchestration platform and cluster resource management. The Mesosphere DC/OS contains a group of agent nodes that collaborates with a group of master nodes. Mesos ensures that the required number of instances of the requested tasks (micro-services) is running. When an instance fails, it starts a new instance with the resource offered by Mesos.

Mesos uses a group of devices called Mesos Cluster to run micro-services. The cluster devices (nodes) are classified into two categories namely Mesos Agent and Mesos Masters. The Mesos can have multiple master nodes at a time and only one master node acts as the real master and other stays as standby. The standby nodes perform the same job as a master node when the running master node fails. The master node assigns tasks to agent to run the tasks.

OpsRamp lets you monitor the Mesos cluster with the help of Mesos Integration. As the monitoring of the clusters is agent-based, you must run agent in every cluster node (All Mesos masters, Standby masters, and Agent). The new agent can automatically detect if the running environment is a Mesos cluster and identify the category (Master/Agent). You must provide a Cluster ID for every agent at the time of installation.

Prerequisites

  1. Ensure to provide access to all master nodes to execute a command.
  2. Enable node access to the app server and connection node.
  3. Ensure to install the Mesos master and Mesos agent in your environment.

OpsRamp configuration

To configure the integration:

  1. From All Clients, select the client.
  2. Go to Setup > Integrations > Integrations.
  3. From Available Integrations, select Compute > Mesophere DC/OS and click Install.
  4. Provide a name for the integration.
  5. Click Install.
Mesosphere Integration

Mesosphere Integration

Mesosphere configuration

Configuration involves installing the OpsRamp agent on all of the master and agent nodes in the cluster. The agent can be installed using one of the following methods:

  • Using the docker run command (containerized agent).
  • As a regular process.

Installing agents with docker run

The most recent docker run command is provided in the OpsRamp configuration. Agents must be deployed on both master and agent nodes.

Deploying on master nodes

On all master nodes, execute the following docker run command:

docker run -d --net=host --name=opsramp-agent 
    -v /var/run/docker.sock:/var/run/docker.sock 
    -v /run/dcos/dcos-diagnostics.sock:/var/run/dcos-diagnostics.sock 
    -e AGENT_API_KEY="xxxxxxxxxxxxxxxxx"
    -e AGENT_API_SECRET="xxxxxxxxxxxxxxxxx"
    -e APP_SERVER="app-2adc3.vistanet.jp"
    -e LOG_LEVEL="warn"
    -e MESOS_MASTER="TRUE"
    -e CLUSTER_ID="INTG-c3032402-fdb9-4465-896c-dfedbac874a3" opsramp/agent
Note: The above is an example, and the values will vary based on the setup.

Deploying on agent nodes

Deploying on the agent nodes can be done using one of the following methods:

  • docker command
  • catalog

To deploy on the agent nodes user the docker command, execute the following docker run command:

docker run -d --net=host --name=opsramp-agent 
    -v /var/run/docker.sock:/var/run/docker.sock 
    -e AGENT_API_KEY="xxxxxxxxxxxxxxxxx" 
    -e AGENT_API_SECRET="xxxxxxxxxxxxxxxxx" 
    -e APP_SERVER="app-2adc3.vistanet.jp" 
    -e LOG_LEVEL="warn" 
    -e MESOS_AGENT="TRUE" 
    -e CLUSTER_ID="INTG-c3032402-fdb9-4465-896c-dfedbac874a3" opsramp/agent
Note: The above is an example, and the values will vary based on the setup.

To deploy on the agent nodes using catalog:

  1. Go to Mesosphere web portal then navigate to the catalog section.
  2. Select application with the name opsramp.
  3. Enter the required details provided in the integration details page.
  4. Click on Review and Run and then Run Service.

Installing agents as a regular process

To install the OpsRamp Agent:

  1. Go to Setup > Downloads > OpsRamp Agent.
  2. Click the Download icon to download the package requirements according to your operating system.
  3. Click Instructions. You must follow the instructions until running Python command.
  4. After reaching the Python command, you must add an extra argument -C followed by Cluster ID. You can obtain Cluster ID from Agents Deployment Configuration screen under Mesos Integration.

After adding the Cluster ID, run the following Python commands:

sudo python /opt/opsramp/agent/bin/configure.py -K <key>-S <secret> -s <apipurl> -C <ClusterID>

sudo python /opt/opsramp/agent/bin/configure.py -K <key>-S <secret> -s <apipurl> -C <ClusterID>  
    -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"

What to do next

  • View the Mesosphere integration details in Infrastructure > Resources.