Transcript
Page 1: Zenoss Control Center Introduction

Zenoss Control Center

Open Source Application Management & Orchestration System for Docker

controlcenter.io

Page 2: Zenoss Control Center Introduction

Overview

• History• Brief introduction to Docker • Why Docker? • What is Control Center? • Demo• Questions

Page 3: Zenoss Control Center Introduction

History

• Zenoss founded in 2005 as Open Source Enterprise IT Management Solution

• Docker was chosen to support the scale requirements for monitoring the modern datacenter

• Need was created for managing Zenoss within Docker

• Birth of Control Center • Zenoss Control Center Open Sourced in August

2014

Page 4: Zenoss Control Center Introduction

Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application.

What is Docker? docker.io

http://slides.com/stevenborrelli/docker

Page 5: Zenoss Control Center Introduction

● Based on Linux containers● Minimal overhead (cpu/io/network)● Can run on any Linux system that supports LXC, nsinit● Docker container contains everything it needs to run● A docker container should be able to run anywhere that

Docker can run.

What is Docker?

http://slides.com/stevenborrelli/docker

Page 6: Zenoss Control Center Introduction

Why Docker?

• Scalability– Ability to spin up new daemons on the fly

• Easy Installs – Just pull image and deploy– Dependencies exist in the container

• Reliable History Tracking– Improves upgrades– Easy to roll back

Page 7: Zenoss Control Center Introduction

What Docker doesn’t provide (yet)● service discovery

● a good log interface

● cross host volumes

● cross host scheduling

… and anything else you may find in a cluster manager

Page 8: Zenoss Control Center Introduction

Where Docker Ends, Control Center Begins

Physical/Virtual Server

Host OS (UOS)

Container Manager

Control Center

App Containers

CC

Control Center (CC) is an application written in Go! (aka golang).

CC takes care of all interactions with Docker and the host system.

You install CC on every computer that you intend to run Zenoss on.

CC is open source software (Apache 2 license).

Page 9: Zenoss Control Center Introduction

Terms● serviced: Control Center command-line client

● Service: An entity that manages a container and/or other services.

● Service Definition: Describes how a service is run and configured

● Service Template: A document of service definitions relating to a platform.

We tell Control Center how to execute the application inside of a container image via a Service Template.

The same container may act completely differently depending on the service definition used to start it.

Page 10: Zenoss Control Center Introduction

CONTROL CENTER - SYSTEMS

The Control Center has 3 important systems that divide the work of orchestrating and monitoring of services.Master - This subsystem houses several subservices and is generally responsible of the overall orchestration of the system. There will only be one Control Center Master.

Node Controller - This controller is responsible for all docker interaction, starting/stopping services, mounting of service resources and metric collection. There is one of these per host.

Container Controller - This program is the first program that gets launched inside a container. It is responsible for starting the actual service, providing network proxies, forwarding logs/events, and forwarding service specific stats.

Page 11: Zenoss Control Center Introduction

CONTROL CENTER - SYSTEM OVERVIEW

MasterLogstash

Zookeeper

Metric Svc

Docker Registry

UI/Rest API

RPC APIDocker

Node Controller

RPC API

Container

controller

Your Service

logstash-forwarder

Container

controller

Your Service

logstash-forwarder

Container

controller

logstash-forwarder

Your ServiceTCP Mux

Shared FS Host Boundary

Node Controller TCP MuxRPC

Page 12: Zenoss Control Center Introduction

CONTROL CENTER MASTER

Elasticsearch Database for control center

Zookeeper Coordination service

Logstash Log consolidation Uses its own copy of Elasticsearch

Metrics -- CC centric metric system OpenTSDB Standalone Hbase Consumer Query service

Celery Schedule tasks

Registry docker-registry

Shared Storage (NFS)

Web server for CC UI

Rest API / RPC API

Page 13: Zenoss Control Center Introduction

CC NODE CONTROLLER

● 1 Node Controller per host

● Configured how to talk to master

● Watches the master’s zookeeper for services that has been scheduled to start on its hosts

● Pulls down images from Master’s Docker Registry

● Starts/Stops/Manages services as needed

● Mux distributes all network traffic to this box to the appropriate containers

Page 14: Zenoss Control Center Introduction

CONTAINER CONTROLLER

● Injected into each container

● Serviced binary is bind mounted into every container that it runs automatically

● The Serviced container controller is what runs and then executes the actual service command

● Imports endpoints from other services

● transparently proxies connections to remote endpoints and makes them appear local

● Bind mounts Logstash forwarder

Page 15: Zenoss Control Center Introduction

CC - CORE CONCEPTS

● IP Addresses● Hosts● Storage Systems (future)

Pool - a collection of compute, network and storage resources.

Page 16: Zenoss Control Center Introduction

CC - CORE CONCEPTS

Host - a compute node (physical or virtual) that is available to the control center.

○ Hostname○ Pool ID○ Kernel Version○ OS Distribution○ Docker Version○ ServiceD Version○ Memory Size○ CPU Count○ Interface (NICs) Names & Addresses○ Monitoring Profile

https://github.com/zenoss/serviced/blob/develop/domain/host/host.go#L19

Page 17: Zenoss Control Center Introduction

CC - CORE CONCEPTS

Service Template - A hierarchical description of a services that deliver an Application

Resource Manager

Zproxy (Nginx)

Zope

MariaDB

ZEP

RabbitMQ

MariaDB 2

Query OpenTSDB HBase

Zookeeper

Not Limited to Tree Dependencies

Page 18: Zenoss Control Center Introduction

CC - CORE CONCEPTS

● ImageID - what container image does this service use● Startup - what command must run to start the service● Config Files - what configuration files to inject into the container

before startup● Log Files - what log files the service writes to inside the container and

what is the format of those log files● Memory Limit - what is the maximum allowable amount of memory

the service can use● Volumes - what persistent disk storage is needed by the service and

where that storage should be mounted● Endpoints - what network endpoints does this service depend on or

does this service expose● Health Checks - what scripts can be run to determine the health of a

service● Metrics - what datapoints the service exposes● Thresholds - what thresholds can be applied to the exposed metrics● Graphs - what graphs are relevant to the service

Service - Is a description of an individual process.

Page 19: Zenoss Control Center Introduction

CC - CORE CONCEPTS

Schema - the relationship between the various domain objects in the control center

Pool [default]

Host [app0.example.com]Host [app0.example.com]

Host [app0.example.com]

Control CenterService Template

Service AService A

Service A

ServiceA @T0

Page 20: Zenoss Control Center Introduction

CC - NETWORK CONNECTIONS

Your Service

Imagine your service needs to talk to Redis.

localhost interface (lo)127.0.0.1

Container Controller

It thinks it can access redis via 127.0.0.1:6379The container controller actually accepts the connection

Zookeeper

The controller finds where redis is actually running via ZK.

Mux

The controller makes an encrypted connection to the mux.

Redis Container

The mux contacts the exposed port of the redis container.

Page 21: Zenoss Control Center Introduction

MariaDB Sample Service Template{

"Command": "/usr/bin/mysqld_safe","Endpoints": [

{ "Application": "mysql", "PortNumber": 3306, "Protocol": "tcp", "Purpose": "export" }

],"ImageId": "zenoss/zenoss5x","Instances": {

"min": 1},"Launch": "auto","LogConfigs": [

{ "path": "/var/log/mysqld.log", "type": "mysql" }

],"Name": "MySQL","Snapshot": {

"Pause": "PAUSE_CHECK_TIMEOUT=60 LOCK_HOLD_DURATION=600 $ZENHOME/bin/quiesce-mysql.sh pause", "Resume": "$ZENHOME/bin/quiesce-mysql.sh resume"

},"Tags": [

"daemon"]

}

Page 22: Zenoss Control Center Introduction

Persistent VolumesFor those services that have to maintain state between

execution, the Control Center will mount a folder from the Shared File System into the container.

The SFS is used so that even if the service starts up on a different machine it can still access the same files.

Operating System

Control Center

DockerSFS

S

ervi

ce 1

S

ervi

ce 2

Control Center

S

ervi

ce 5

Operating System

DockerSFS

S

ervi

ce 3

S

ervi

ce 4

S

ervi

ce 6

Page 23: Zenoss Control Center Introduction

Install Control Center on Ubuntu 14.04

# install docker repowget -O - http://get.docker.io | sh

# install zenoss reposudo apt-key adv --keyserver keys.gnupg.net --recv-keys AA5A1AD7sudo sh -c 'echo "deb [ arch=amd64 ] http://get.zenoss.io/apt/ubuntu trusty universe" \ > /etc/apt/sources.list.d/zenoss.list’

# update repo databasesudo apt-get update

# install Control Centersudo apt-get -y install serviced

# then start servicessudo start serviced

Page 24: Zenoss Control Center Introduction

Demo Time

Page 25: Zenoss Control Center Introduction

Questions?


Top Related