MANAGING MESOS, DOCKER, AND CHRONOS WITH PUPPET

Similar documents
CONTINUOUS DELIVERY WITH MESOS, DC/OS AND JENKINS

Distributed CI: Scaling Jenkins on Mesos and Marathon. Roger Ignazio Puppet Labs, Inc. MesosCon 2015 Seattle, WA

@joerg_schad Nightmares of a Container Orchestration System

FROM MONOLITH TO DOCKER DISTRIBUTED APPLICATIONS

Building/Running Distributed Systems with Apache Mesos

CONTINUOUS DELIVERY WITH DC/OS AND JENKINS

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

SAMPLE CHAPTER IN ACTION. Roger Ignazio. FOREWORD BY Florian Leibert MANNING

Scale your Docker containers with Mesos

Using DC/OS for Continuous Delivery

利用 Mesos 打造高延展性 Container 環境. Frank, Microsoft MTC

Building a Data-Friendly Platform for a Data- Driven Future

From Zero to Production Our Mesos Journey. Chien Huey DevOps Engineer XO Group, Inc.

SCALING LIKE TWITTER WITH APACHE MESOS

INDIGO PAAS TUTORIAL. ! Marica Antonacci RIA INFN-Bari

UP! TO DOCKER PAAS. Ming

Razor. Michal Bryxí Software Engineer Puppet Slides based on work from: David Lutterkort Principal Engineer Puppet

Beyond 1001 Dedicated Data Service Instances

AGILE DEVELOPMENT AND PAAS USING THE MESOSPHERE DCOS

Upcoming Services in OpenStack Rohit Agarwalla, Technical DEVNET-1102

Container Orchestration on Amazon Web Services. Arun

From Bare Metal to Cloud. Andy ICCLab, ZHAW Piotr Kasprzak, GWDG

Be smart. Think open source.

Introduction to Mesos and the Datacenter Operating System

State of OpenShift on Bare Metal

Automated Deployment of Private Cloud (EasyCloud)

Deployment Patterns using Docker and Chef

SAMPLE CHAPTER IN ACTION. Roger Ignazio. FOREWORD BY Florian Leibert MANNING

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

CloudCenter for Developers

We are ready to serve Latest Testing Trends, Are you ready to learn?? New Batches Info

How to Keep UP Through Digital Transformation with Next-Generation App Development

CLOUD INFRASTRUCTURE ARCHITECTURE DESIGN

Building A Better Test Platform:

DevOps Course Content

Containerizing GPU Applications with Docker for Scaling to the Cloud

Distributed Data on Distributed Infrastructure. Claudius Weinberger & Kunal Kusoorkar, ArangoDB Jörg Schad, Mesosphere

Hybrid Cloud Automation using Cisco CloudCenter API

Building physical clouds

Application Centric Microservices Ken Owens, CTO Cisco Intercloud Services. Redhat Summit 2015

Advantages of using DC/OS Azure infrastructure and the implementation architecture Bill of materials used to construct DC/OS and the ACS clusters

Setting up Kubernetes with Day 2 in Mind. Angela Chin, Senior Software Engineer, Pivotal Urvashi Reddy, Senior Software Engineer, Pivotal

Supporting GPUs in Docker Containers on Apache Mesos

HOW TO PLAN & EXECUTE A SUCCESSFUL CLOUD MIGRATION

How Container Schedulers and Software-based Storage will Change the Cloud

Continuous Delivery for Cloud Native Applications

Speeding Up Infrastructure Provisioning with CloudForms. Jason Dillaman Principal Architect, Red Hat Nick Lane Consultant, Red Hat

The Post-Cloud. Where Google, DevOps, and Docker Converge

Puppet on the AWS Cloud

DevOps Technologies. for Deployment

Continuous Integration using Docker & Jenkins

DevOps in the Cloud A pipeline to heaven?! Robert Cowham BCS CMSG Vice Chair

From Bare Metal to Cloud

Cloud I - Introduction

PSOACI Tetration Overview. Mike Herbert

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Mesosphere and the Enterprise: Run Your Applications on Apache Mesos. Steve Wong Open Source Engineer {code} by Dell

A Whirlwind Tour of Apache Mesos

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

ovirt and Docker Integration

Zenoss Resource Manager Planning Guide

CS-580K/480K Advanced Topics in Cloud Computing. Container III

Customer s journey into the private cloud with Cisco Enterprise Cloud Suite

SUSE Manager and Salt

Mesosphere and Percona Server for MongoDB. Jeff Sandstrom, Product Manager (Percona) Ravi Yadav, Tech. Partnerships Lead (Mesosphere)

Mesosphere and Percona Server for MongoDB. Peter Schwaller, Senior Director Server Eng. (Percona) Taco Scargo, Senior Solution Engineer (Mesosphere)

Container Management : First Looks

Issues Fixed in DC/OS

Xen and CloudStack. Ewan Mellor. Director, Engineering, Open-source Cloud Platforms Citrix Systems

Puppet Managed Cisco UCS Infrastructure with Docker Enterprise Edition for Container Management

AGENDA. 13:30-14:25 Gestion des patches, du provisionning et de la configuration de RHEL avec Satellite 6.1, par Michael Lessard, Red Hat

Fixing the "It works on my machine!" Problem with Docker

No Limits Cloud Introducing the HPE Helion Cloud Suite July 28, Copyright 2016 Vivit Worldwide

개발자와운영자를위한 DevOps 플랫폼 OpenShift Container Platform. Hyunsoo Senior Solution Architect 07.Feb.2017

Big Data Security. Facing the challenge

CLUSTERING HIVEMQ. Building highly available, horizontally scalable MQTT Broker Clusters

Configuring and Managing a Private Cloud with Oracle Enterprise Manager

IBM Bluemix compute capabilities IBM Corporation

P a g e 1. Teknologisk Institut. Online kursus k SysAdmin & DevOps Collection

RED HAT GLUSTER TECHSESSION CONTAINER NATIVE STORAGE OPENSHIFT + RHGS. MARCEL HERGAARDEN SR. SOLUTION ARCHITECT, RED HAT BENELUX April 2017

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Designing MQ deployments for the cloud generation

What s New in Red Hat OpenShift Container Platform 3.4. Torben Jäger Red Hat Solution Architect

The age of orchestration

Active System Manager Release 8.2 SDK Reference Guide

Container in Production : Openshift 구축사례로 이해하는 PaaS. Jongjin Lim Specialist Solution Architect, AppDev

Friday, March 1, 13. State of Puppet

DevOps Foundations : Infrastructure as Code

Taming your heterogeneous cloud with Red Hat OpenShift Container Platform.

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Installation runbook for

OpenStack Magnum Hands-on. By Saulius Alisauskas and Bryan Havenstein

Isn't it Ironic? Managing a bare metal cloud. devananda.github.io/talks/isnt-it-ironic.html. Devananda van der Veen

Ahead in the Cloud. Matt Wood TECHNOLOGY EVANGELIST

Operating and managing an Atomic container-based infrastructure

POWERING THE INTERNET WITH APACHE MESOS

Build Cloud like Rackspace with OpenStack Ansible

HPC over Cloud. July 16 th, SCENT HPC Summer GIST. SCENT (Super Computing CENTer) GIST (Gwangju Institute of Science & Technology)

Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2

Transcription:

Roger Ignazio PuppetConf 2015 MANAGING MESOS, DOCKER, AND CHRONOS WITH PUPPET 2015 Mesosphere, Inc. All Rights Reserved. 1

$(whoami) ABOUT ME Roger Ignazio Infrastructure Automation Engineer @ Mesosphere @rogerignazio 2015 Mesosphere, Inc. All Rights Reserved. 2

$(whoami) MESOS IN ACTION mesosinaction.com Code: ctwpuppet 2015 Mesosphere, Inc. All Rights Reserved. 3

AGENDA Getting started Deploying a Mesos cluster Building a Docker image Creating a Chronos job Demo Provisioning infrastructure bare-metal and cloud Q & A 2015 Mesosphere, Inc. All Rights Reserved. 4

AUDIENCE POLL 2015 Mesosphere, Inc. All Rights Reserved. 5

GETTING STARTED ABOUT MESOS, DOCKER, AND CHRONOS Mesos Represent many machines (thousands) as a single entity Advertise resources directly to applications Docker Easily package and deploy apps (with dependencies) Analogous to VMs, but minus the overhead* Chronos Distributed, highly available Cron for Mesos Run scheduled tasks in cgroups, Docker containers 2015 Mesosphere, Inc. All Rights Reserved. 6

GETTING STARTED ABOUT PUPPET Declare desired state for your infrastructure Wide range of OS support Idempotent Extensible (via custom facts, types, providers) Open source Apache License, version 2 2015 Mesosphere, Inc. All Rights Reserved. 7

GETTING STARTED PUPPET S ROLE Mesos Apps ( Frameworks ) (Chronos, Marathon, etc) Mesos Operating System (RHEL, Ubuntu, Windows, etc) Virtual Infrastructure and IaaS (vsphere, OpenStack, AWS, Azure, etc) Physical Infrastructure (Cisco, Dell, HP, etc) 2015 Mesosphere, Inc. All Rights Reserved. 8

GETTING STARTED PUPPET S ROLE If Mesos is the abstraction layer for your applications, Puppet is the abstraction layer for infrastructure management 2015 Mesosphere, Inc. All Rights Reserved. 9

GETTING STARTED PUPPET S ROLE If Mesos is the abstraction layer for your applications, Puppet is the abstraction layer for infrastructure management But it can also be more... 2015 Mesosphere, Inc. All Rights Reserved. 10

GETTING STARTED PUPPET S ROLE Custom types and providers can interact with external services (AWS, Chronos,...) Chronos API Chronos Node Puppet Master AWS Coordinator Node AWS API 2015 Mesosphere, Inc. All Rights Reserved. 11

DEPLOYING MESOS, DOCKER, AND CHRONOS 2015 Mesosphere, Inc. All Rights Reserved. 12

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYMENT OVERVIEW Install/configure Mesos, ZooKeeper, Docker Stage a Docker image on the Mesos agents Install and configure Chronos Create a Chronos job (that runs in a Docker container) 2015 Mesosphere, Inc. All Rights Reserved. 13

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYMENT OVERVIEW Chronos ZK Mesos Master Mesos Agent Mesos Agent Mesos Agent Docker Engine Docker Engine Docker Engine 2015 Mesosphere, Inc. All Rights Reserved. 14

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYMENT OVERVIEW Puppet s roles/profiles pattern Using the following Puppet modules deric-zookeeper deric-mesos garethr-docker puppetlabs-chronos All of these modules are open source and available via the Puppet Forge: https://forge.puppetlabs.com 2015 Mesosphere, Inc. All Rights Reserved. 15

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING MESOS (MASTER) class role::mesos::master { include profile::base include profile::chronos include profile::mesos::master include profile::zookeeper } 2015 Mesosphere, Inc. All Rights Reserved. 16

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING MESOS (MASTER) class profile::mesos::master { include profile::mesos::common class { '::mesos::master': # From deric-mesos listen_address => $::ipaddress_eth0, work_dir => '/var/lib/mesos', options => { log_dir => '/var/log/mesos', quorum => '1', }, } } 2015 Mesosphere, Inc. All Rights Reserved. 17

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING ZOOKEEPER class profile::zookeeper { include java # Include defaults from puppetlabs-java } class { '::zookeeper': # From deric-zookeeper client_ip => $::ipaddress_eth0, id => '1', repo => 'cloudera', require => Class['java'], } 2015 Mesosphere, Inc. All Rights Reserved. 18

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING MESOS (AGENT) class role::mesos::agent { include profile::base include profile::docker include profile::mesos::agent } 2015 Mesosphere, Inc. All Rights Reserved. 19

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING MESOS (AGENT) class profile::mesos::agent { include profile::mesos::common } class { '::mesos::slave': # From deric-mesos listen_address => $::ipaddress_eth0, work_dir => '/var/lib/mesos', options => { log_dir => '/var/log/mesos', }, } 2015 Mesosphere, Inc. All Rights Reserved. 20

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING MESOS (COMMON) class profile::mesos::common { class { '::mesos': # From deric-mesos repo => 'mesosphere', zookeeper => 'zk://192.168.248.10:2181/mesos', } } 2015 Mesosphere, Inc. All Rights Reserved. 21

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING DOCKER include ::docker # Include defaults from garethr-docker class { '::mesos::slave': # Let s reconfigure the Mesos agent... options => { containerizers => 'docker,mesos', isolation => 'cgroups/cpu,cgroups/mem', executor_registration_timeout => '5mins', }, } 2015 Mesosphere, Inc. All Rights Reserved. 22

DEPLOYING MESOS, DOCKER, AND CHRONOS DEPLOYING CHRONOS class profile::chronos { include ::chronos # Include defaults from puppetlabs-chronos } 2015 Mesosphere, Inc. All Rights Reserved. 23

BUILDING DOCKER IMAGES WITH PUPPET 2015 Mesosphere, Inc. All Rights Reserved. 24

BUILDING DOCKER IMAGES WITH PUPPET GETTING STARTED WITH PUPPET AND DOCKER Synopsis: Build a Docker image declaratively Two approaches: puppet agent pre-shared key to use existing Puppet infra puppet apply directly apply manifests during build 2015 Mesosphere, Inc. All Rights Reserved. 25

BUILDING DOCKER IMAGES WITH PUPPET GETTING STARTED WITH PUPPET AND DOCKER Synopsis: Build a Docker image declaratively Two approaches: puppet agent pre-shared key to use existing Puppet infra puppet apply directly apply manifests during build 2015 Mesosphere, Inc. All Rights Reserved. 26

BUILDING DOCKER IMAGES WITH PUPPET GETTING STARTED WITH PUPPET AND DOCKER FROM debian:wheezy MAINTAINER Roger Ignazio <roger@mesosphere.com> WORKDIR /tmp RUN curl -sol https://apt.puppetlabs.com/puppetlabs-release-wheezy.deb RUN dpkg -i puppetlabs-release-wheezy.deb RUN apt-get update RUN apt-get -y install puppet COPY *./ RUN puppet apply example.pp 2015 Mesosphere, Inc. All Rights Reserved. 27

BUILDING DOCKER IMAGES WITH PUPPET GETTING STARTED WITH PUPPET AND DOCKER package { ['ruby', 'ruby-dev', 'build-essential']: ensure => installed, } package { 'httparty': ensure => installed, provider => gem, } file { '/usr/bin/query_mesos': ensure => file, mode => '0755', source => '/tmp/query_mesos.rb', } 2015 Mesosphere, Inc. All Rights Reserved. 28

BUILDING DOCKER IMAGES WITH PUPPET GETTING STARTED WITH PUPPET AND DOCKER Step 10 : RUN puppet apply example.pp ---> Running in 12eda5e24ff8 Notice: Compiled catalog for 90c88c41cdaa.bad in environment production in 0.16 seconds Notice: Package[build-essential]/ensure: ensure changed 'purged' to 'present' Notice: File[/usr/bin/query_mesos]/ensure: defined content as '{md5} e44268ac8e31f75f1aeee961d0ebe36b' Notice: Package[ruby-dev]/ensure: ensure changed 'purged' to 'present' Notice: Package[httparty]/ensure: created Notice: Finished catalog run in 33.22 seconds ---> 1a8fefd724ee Removing intermediate container 12eda5e24ff8 Successfully built 1a8fefd724ee 2015 Mesosphere, Inc. All Rights Reserved. 29

BUILDING DOCKER IMAGES WITH PUPPET STAGING DOCKER IMAGES ON NODES Using the garethr-docker Puppet module docker::image { 'rogerignazio/basic-puppet-example': image_tag => 'latest', } Equivalent to $ docker pull rogerignazio/basic-puppet-example:latest 2015 Mesosphere, Inc. All Rights Reserved. 30

MANAGING CHRONOS JOBS WITH PUPPET 2015 Mesosphere, Inc. All Rights Reserved. 31

MANAGING CHRONOS JOBS WITH PUPPET A CUSTOM TYPE AND PROVIDER Bundled with a module Found at lib/puppet/type and lib/puppet/provider Model the API of an external service as Puppet code Chronos API Puppet Master Chronos Node 2015 Mesosphere, Inc. All Rights Reserved. 32

MANAGING CHRONOS JOBS WITH PUPPET A CUSTOM TYPE AND PROVIDER chronos_job { 'fetch_mesos_master_metrics': command => 'query_mesos 192.168.248.10', job_schedule => 'R/2015-10-09T00:00:00.000Z/PT1M', container => { type => 'DOCKER', image => 'rogerignazio/basic-puppet-example', }, cpus => 0.5, mem => 256, owner => 'roger@mesosphere.com', } 2015 Mesosphere, Inc. All Rights Reserved. 33

DEMO 2015 Mesosphere, Inc. All Rights Reserved. 34

PROVISIONING INFRASTRUCTURE 2015 Mesosphere, Inc. All Rights Reserved. 35

PROVISIONING INFRASTRUCTURE CLOUD PROVISIONING WITH AWS Declare AWS infrastructure as Puppet resources Custom types and providers hit the AWS API Ensures resources are in desired state Puppet Master AWS Coordinator Node AWS API 2015 Mesosphere, Inc. All Rights Reserved. 36

PROVISIONING INFRASTRUCTURE CLOUD PROVISIONING WITH AWS ec2_instance { 'mesos-slave-nn': ensure => present, region => 'us-west-2', # US West (Oregon) image_id => 'ami-4dbf9e7d', # AWS RHEL 7.1 image instance_type => 'c4.xlarge', # 4 CPUs, 7.5 GB mem security_groups => ['mesos-aws-secgrp'], } 2015 Mesosphere, Inc. All Rights Reserved. 37

PROVISIONING INFRASTRUCTURE CLOUD PROVISIONING WITH AWS Some of the available resource types: ec2_instance ec2_securitygroup ec2_vpc elb_loadbalancer route53_a_record A more complete example: http://bit.ly/puppet-aws-example 2015 Mesosphere, Inc. All Rights Reserved. 38

PROVISIONING INFRASTRUCTURE BARE-METAL PROVISIONING WITH RAZOR Auto-discover inventory Policy-based provisioning Pluggable brokers Razor is open source Apache License, v2 2015 Mesosphere, Inc. All Rights Reserved. 39

PROVISIONING INFRASTRUCTURE BARE-METAL PROVISIONING WITH RAZOR Ubuntu ISO RHEL ISO PXE Boot Razor Microkernel Razor Server Razor Client (Admin) Policy (Facts, IPMI, LLDP) role::mesos::master role::mesos::agent Puppet Master... 2015 Mesosphere, Inc. All Rights Reserved. 40

PROVISIONING INFRASTRUCTURE BARE-METAL PROVISIONING WITH RAZOR For more information, check out http://bit.ly/razor-intro 2015 Mesosphere, Inc. All Rights Reserved. 41

Q & A puppetconf_talk { 'managing_mesos': ensure => presented, speaker => 'Roger Ignazio', email => 'roger@mesosphere.com', twitter => '@rogerignazio', } 2015 Mesosphere, Inc. All Rights Reserved. 42