zenoss control center introduction

Download Zenoss Control Center Introduction

Post on 21-May-2015

679 views

Category:

Technology

2 download

Embed Size (px)

DESCRIPTION

Control Center is an open source application management and orchestration system. Control Center was developed by Zenoss; however, apart from working with the Zenoss platform Control Center can be used to manage other Docker applications, from a simple web application to a multi-tiered stateful application stack. Control Center is based on a service oriented architecture which enables applications to run as a set of distributed services that can span hosts, datacenters, and geographic regions. A simple declarative application template file is used to describe how an application is configured, deployed, managed, and monitored.

TRANSCRIPT

  • 1. Zenoss Control CenterOpen Source Application Management& Orchestration System for Dockercontrolcenter.io

2. Overview History Brief introduction to Docker Why Docker? What is Control Center? Demo Questions 3. History Zenoss founded in 2005 as Open SourceEnterprise IT Management Solution Docker was chosen to support the scalerequirements for monitoring the moderndatacenter Need was created for managing Zenoss withinDocker Birth of Control Center Zenoss Control Center Open Sourced inAugust 2014 4. What is Docker? docker.ioDocker is an open-source project to easily createlightweight, portable, self-sufficientcontainers from any application.http://slides.com/stevenborrelli/docker 5. 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 thatDocker can run.What is Docker?http://slides.com/stevenborrelli/docker 6. 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 7. What Docker doesnt provide (yet) service discovery a good log interface cross host volumes cross host scheduling and anything else you may find in a clustermanager 8. Where Docker Ends, Control Center BeginsApp ContainersControl CenterContainer ManagerHost OS (UOS)Physical/VirtualServerCCControl Center (CC) is anapplication written in Go!(aka golang).CC takes care of allinteractions with Dockerand the host system.You install CC on everycomputer that you intendto run Zenoss on.CC is open source software(Apache 2 license). 9. 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 theapplication inside of a container image via aService Template.The same container may act completelydifferently depending on the service definitionused to start it. 10. CONTROL CENTER - SYSTEMSThe Control Center has 3 important systems that divide the work oforchestrating and monitoring of services.Master - This subsystem houses several subservices and is generallyresponsible of the overall orchestration of the system. There will only be oneControl 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 launchedinside a container. It is responsible for starting the actual service, providingnetwork proxies, forwarding logs/events, and forwarding service specific stats. 11. CONTROL CENTER - SYSTEM OVERVIEWMasterLogstashZookeeperMetric SvcDockerRegistryUI/Rest APIRPC APINodeControllerRPC APIDockerContainerContainercontrollerContainercontrollercontrollerlogstash-forwarderlogstash-forwarderYour ServiceYour ServiceYour Servicelogstash-forwarderTCP MuxShared FS Host BoundaryNode Controller RPC TCP Mux 12. CONTROL CENTER MASTERElasticsearchDatabase for control centerZookeeperCoordination serviceLogstashLog consolidationUses its own copy of ElasticsearchMetrics -- CC centric metric systemOpenTSDBStandalone HbaseConsumerQuery serviceCelerySchedule tasksRegistrydocker-registryShared Storage (NFS)Web server for CC UIRest API / RPC API 13. CC NODE CONTROLLER 1 Node Controller per host Configured how to talk to master Watches the masters zookeeper for services that has been scheduledto start on its hosts Pulls down images from Masters Docker Registry Starts/Stops/Manages services as needed Mux distributes all network traffic to this box to the appropriatecontainers 14. CONTAINER CONTROLLER Injected into each container Serviced binary is bind mounted into every container that it runsautomatically The Serviced container controller is what runs and then executes theactual service command Imports endpoints from other services transparently proxies connections to remote endpoints and makes themappear local Bind mounts Logstash forwarder 15. CC - CORE CONCEPTSPool - a collection of compute, network and storageresources. IP Addresses Hosts Storage Systems (future) 16. CC - CORE CONCEPTSHost - a compute node (physical or virtual) that is available tothe control center. Hostname Pool ID Kernel Version OS Distribution Docker Version ServiceD Version Memory Size CPU Count Interface (NICs) Names & Addresses Monitoring Profilehttps://github.com/zenoss/serviced/blob/develop/domain/host/host.go#L19 17. CC - CORE CONCEPTSService Template - A hierarchical description of a services that deliver anApplicationResource ManagerZproxy (Nginx)ZopeQuery OpenTSDB HBaseMariaDBZEPRabbitMQMariaDB 2ZookeeperNot Limited to Tree Dependencies 18. CC - CORE CONCEPTSService - Is a description of an individual process. 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 containerbefore startup Log Files - what log files the service writes to inside the containerand what is the format of those log files Memory Limit - what is the maximum allowable amount of memorythe service can use Volumes - what persistent disk storage is needed by the service andwhere that storage should be mounted Endpoints - what network endpoints does this service depend on ordoes this service expose Health Checks - what scripts can be run to determine the health of aservice Metrics - what datapoints the service exposes Thresholds - what thresholds can be applied to the exposed metrics Graphs - what graphs are relevant to the service 19. CC - CORE CONCEPTSSchema - the relationship between the various domain objects in the controlcenterService Control CenterTemplatePool [default]Host [app0.example.com]Host [app0.example.com]Host [app0.example.com]Service AService AService AServiceA @T0 20. CC - NETWORK CONNECTIONSImagine your service needs to talk to Redis.It thinks it can access redis via 127.0.0.1:6379The container controller actually accepts the connectionYour ServiceContainerControllerlocalhost interface (lo)127.0.0.1ZookeeperThe controller finds where redis is actually running via ZK.MuxThe controller makes an encrypted connection to the mux.Redis ContainerThe mux contacts the exposed port of the redis container. 21. 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"]} 22. Persistent VolumesFor those services that have to maintain state betweenexecution, the Control Center will mount a folderfrom the Shared File System into the container.The SFS is used so that even if the service starts up on adifferent machine it can still access the same files.Service 1Service 2Control CenterDockerSFSOperating SystemService 3Service 4Service 6Control CenterService 5DockerSFSOperating System 23. Install Control Center on Ubuntu14.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 24. Demo Time 25. Questions?

Recommended

View more >