当前位置: 首页 > 软件库 > 云计算 > 云原生 >

container.training

授权协议 View license
开发语言 Google Go
所属分类 云计算、 云原生
软件类型 开源软件
地区 不详
投 递 者 顾鸣
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Container Training

This repository (formerly known as orchestration-workshop)contains materials (slides, scripts, demo app, and othercode samples) used for various workshops, tutorials, andtraining sessions around the themes of Docker, containers,and orchestration.

For the moment, it includes:

  • Introduction to Docker and Containers,
  • Container Orchestration with Docker Swarm,
  • Container Orchestration with Kubernetes.

These materials have been designed around the followingprinciples:

  • they assume very little prior knowledge of Docker,containers, or a particular programming language;
  • they can be used in a classroom setup (with aninstructor), or self-paced at home;
  • they are hands-on, meaning that they contain lotsof examples and exercises that you can easilyreproduce;
  • they progressively introduce concepts in chaptersthat build on top of each other.

If you're looking for the materials, you can stop readingright now, and hop to http://container.training/, whichhosts all the slides decks available.

The rest of this document explains how this repositoryis structured, and how to use it to deliver (or create)your own tutorials.

Why a single repository?

All these materials have been gathered in a single repositorybecause they have a few things in common:

What are the different courses available?

Introduction to Docker is derived from the first"Docker Fundamentals" training materials. For more information,see jpetazzo/intro-to-docker.The version in this repository has been adapted to the Markdownpublishing pipeline. It is still maintained, but only receivesminor updates once in a while.

Container Orchestration with Docker Swarm (formerlyknown as "Orchestration Workshop") is a workshop created by JérômePetazzoni in June 2015. Since then, it has been continuously updatedand improved, and received contributions from many others authors.It is actively maintained.

Container Orchestration with Kubernetes was created byJérôme Petazzoni in October 2017, with help and feedback froma few other contributors. It is actively maintained.

Repository structure

  • bin
    • A few helper scripts that you can safely ignore for now.
  • dockercoins
    • The demo app used throughout the orchestration workshops.
  • efk, elk, prom, snap:
    • Logging and metrics stacks used in the later parts ofthe orchestration workshops.
  • prepare-local, prepare-machine:
    • Contributed scripts to automate the creation of local environments.These could use some help to test/check that they work.
  • prepare-vms:
    • Scripts to automate the creation of AWS instances for students.These are routinely used and actively maintained.
  • slides:
    • All the slides! They are assembled from Markdown files witha custom Python script, and then rendered using gnab/remark. Check this directory for more details.
  • stacks:
    • A handful of Compose files (version 3) allowing to easilydeploy complex application stacks.

Course structure

(This applies only for the orchestration workshops.)

The workshop introduces a demo app, "DockerCoins," builtaround a micro-services architecture. First, we run iton a single node, using Docker Compose. Then, we pretendthat we need to scale it, and we use an orchestrator(SwarmKit or Kubernetes) to deploy and scale the app ona cluster.

We explain the concepts of the orchestrator. For SwarmKit,we setup the cluster with docker swarm init and docker swarm join.For Kubernetes, we use pre-configured clusters.

Then, we cover more advanced concepts: scaling, load balancing,updates, global services or daemon sets.

There are a number of advanced optional chapters aboutlogging, metrics, secrets, network encryption, etc.

The content is very modular: it is broken down in a largenumber of Markdown files, that are put together accordingto a YAML manifest. This allows to re-use contentbetween different workshops very easily.

DockerCoins

The sample app is in the dockercoins directory.It's used during all chaptersfor explaining different concepts of orchestration.

To see it in action:

  • cd dockercoins && docker-compose up -d
  • this will build and start all the services
  • the web UI will be available on port 8000

Running the Workshop

If you want to deliver one of these workshops yourself,this section is for you!

*This section has been mostly contributed byBret Fisher, who wasone of the first persons to have the bravery of deliveringthis workshop without me. Thanks Bret! ��

Jérôme.*

General timeline of planning a workshop

  • Fork repo and run through slides, doing the hands-on to be sure youunderstand the different dockercoins repo's and the steps we go through toget to a full Swarm Mode cluster of many containers. You'll update the firstfew slides and last slide at a minimum, with your info.
  • Your docs directory can use GitHub Pages.
  • This workshop expects 5 servers per student. You can get away with as littleas 2 servers per student, but you'll need to change the slide deck toaccommodate. More servers = more fun.
  • If you have more then ~20 students, try to get an assistant (TA) to helppeople with issues, so you don't have to stop the workshop to help someonewith ssh etc.
  • AWS is our most tested process for generating student machines. Inprepare-vms you'll find scripts to create EC2 instances, install docker,pre-pull images, and even print "cards" to place at each students seat withIP's and username/password.
  • Test AWS Scripts: Be sure to test creating all your needed servers a weekbefore workshop (just for a few minutes). You'll likely hit AWS limits in theregion closest to your class, and it sometimes takes days to get AWS to raisethose limits with a support ticket.
  • Create a https://gitter.im chat room for your workshop and update slideswith url. Also useful for TA to monitor this during workshop. You can use itbefore/after to answer questions, and generally works as a better answer then"email me that question".
  • If you can send an email to students ahead of time, mention how they shouldget SSH, and test that SSH works. If they can ssh github.com and getpermission denied (publickey) then they know it worked, and SSH is properlyinstalled and they don't have anything blocking it. SSH and a browser are allthey need for class.
  • Typically you create the servers the day before or morning of workshop, andleave them up the rest of day after workshop. If creating hundreds of servers,you'll likely want to run all these workshopctl commands from a dedicatedinstance you have in same region as instances you want to create. Much fasterthis way if you're on poor internet. Also, create 2 sets of servers foryourself, and use one during workshop and the 2nd is a backup.
  • Remember you'll need to print the "cards" for students, so you'll need tocreate instances while you have a way to print them.

Things That Could Go Wrong

  • Creating AWS instances ahead of time, and you hit its limits in region anddidn't plan enough time to wait on support to increase your limits. :(
  • Students have technical issues during workshop. Can't get ssh working,locked-down computer, host firewall, etc.
  • Horrible wifi, or ssh port TCP/22 not open on network! If wifi sucks youcan try using MOSH https://mosh.org which handles SSH over UDP. TMUX can alsoprevent you from losing your place if you get disconnected from servers.https://tmux.github.io
  • Forget to print "cards" and cut them up for handing out IP's.
  • Forget to have fun and focus on your students!

Creating the VMs

prepare-vms/workshopctl is the script that gets you most of what you need forsetting up instances. Seeprepare-vms/README.mdfor all the info on tools and scripts.

Content for Different Workshop Durations

With all the slides, this workshop is a full day long. If you need to deliverit in shorter timelines, here's some recommendations on what to cut out. Youcan replace --- with ??? which will hide slides. Or leave them there andadd something like (EXTRA CREDIT) to title so students can still view thecontent but you also know to skip during presentation.

3 Hour Version

  • Limit time on debug tools, maybe skip a few. "Chapter 1:Identifying bottlenecks"
  • Limit time on Compose, try to have them building the Swarm Mode by 30minutes in
  • Skip most of Chapter 3, Centralized Logging and ELK
  • Skip most of Chapter 4, but keep stateful services and DAB's if possible
  • Mention what DAB's are, but make this part optional in case you run outof time

2 Hour Version

  • Skip all the above, and:
  • Skip the story arc of debugging dockercoins all together, skipping thetroubleshooting tools. Just focus on getting them from single-host tomulti-host and multi-container.
  • Goal is first 30min on intro and Docker Compose and what dockercoins is,and getting it up on one node in docker-compose.
  • Next 60-75 minutes is getting dockercoins in Swarm Mode services acrossservers. Big Win.
  • Last 15-30 minutes is for stateful services, DAB files, and questions.

Pre-built images

There are pre-built images for the 4 components of the DockerCoins demo app: dockercoins/hasher:v0.1, dockercoins/rng:v0.1, dockercoins/webui:v0.1, and dockercoins/worker:v0.1. They correspond to the code in this repository.

There are also three variants, for demo purposes:

  • dockercoins/rng:v0.2 is broken (the server won't even start),
  • dockercoins/webui:v0.2 has bigger font on the Y axis and a green graph (instead of blue),
  • dockercoins/worker:v0.2 is 11x slower than v0.1.

Past events

Since its inception, this workshop has been delivered dozens of times,to thousands of people, and has continuously evolved. This is a shorthistory of the first times it was delivered. Look also in the "tags"of this repository: they all correspond to successive iterations ofthis workshop. If you attended a past version of the workshop, youcan use these tags to see what has changed since then.

  • QCON, New York City (2015, June)
  • KCDC, Kansas City (2015, June)
  • JDEV, Bordeaux (2015, July)
  • OSCON, Portland (2015, July)
  • StrangeLoop, Saint Louis (2015, September)
  • LISA, Washington D.C. (2015, November)
  • SCALE, Pasadena (2016, January)
  • Zenika, Paris (2016, February)
  • Container Solutions, Amsterdam (2016, February)
  • ... and much more!

Problems? Bugs? Questions?

If there is a bug and you can fix it: submit a PR.Make sure that I know who you are so that I can thank you(because you're the real MVP!)

If there is a bug and you can't fix it, but you canreproduce it: submit an issue explaining how to reproduce.

If there is a bug and you can't even reproduce it:sorry. It is probably an Heisenbug. We can't act on ituntil it's reproducible, alas.

“Please teach us!”

If you have attended one of these workshops, and wantyour team or organization to attend a similar one, youcan look at the list of upcoming events onhttp://container.training/.

You are also welcome to reuse these materials to runyour own workshop, for your team or even at a meetupor conference. In that case, you might enjoy watchingBridget Kromhout's talk at KubeCon 2018 Europe, explainingprecisely how to run such a workshop yourself.

Finally, you can also contact the following persons,who are experienced speakers, are familiar with thematerial, and are available to deliver these workshopsat your conference or for your company:

  • jerome dot petazzoni at gmail dot com
  • bret at bretfisher dot com

(If you are willing and able to deliver such workshops,feel free to submit a PR to add your name to that list!)

Thank you!

  • 一、Containerd 介绍 Containerd 是一个工业级标准的容器运行时,它强调简单性、健壮性和可移植性。Containerd 可以在宿主机中管理完整的容器生命周期:容器镜像的传输和存储、容器的执行和管理、存储和网络等 1、命令行工具 ctr:containerd 相比于docker , 多了namespace概念, 每个image和container 都会在各自的namespace下可

  • 实战:centos7上containerd的安装 docker 更改containerd 先卸载已经安装的docker apt-get remove docker \ docker-client \ docker-client-latest \ docker-common \

  • Docker - Docker Container及Container命令详解 什么是Docker容器(Docker Container) 上一篇博客介绍了Docker镜像(Docker Image)以及Image的一些命令:Docker - Docker Image及Image命令详解。 其实镜像(Image)和容器(Container)的关系,就像是程序和进程一样,镜像是静态的定义,容器则是动

  • 1.containerd的概述 名字:ctr (containerd CLI) 用法:CTR [global options] command [command options] [arguments…] 描述:CTR是一个不受支持的用于交互的调试和管理客户机使用容器守护进程。因为它不受支持,选项和操作不能保证向后兼容或容器项目从一个版本到另一个版本都是稳定的 注:如果没有指定默认名称空间的话,则

  • 已知一个变量的地址时,使用container_of获取此变量所在的结构体的首指针。其定义如下: #define container_of(ptr, type, member) ({              \     void *__mptr = (void *)(ptr);                   \     BUILD_BUG_ON_MSG(!__same_type(*(ptr)

  •   在学习Linux驱动的过程中,遇到一个宏叫做container_of。 该宏定义在include/linux/kernel.h中,首先来贴出它的代码: /** * container_of - cast a member of a structure out to the containing structure * @ptr:        the pointer to the member

  • Getting started with containerd Installing containerd Option 1: From the official binaries The official binary releases of containerd are available for the amd64 (also known as x86_64) and arm64 (also

  • 转载自:http://blog.csdn.net/yinkaizhong/archive/2009/04/20/4093795.aspx 问题:如何通过结构中的某个变量获取结构本身的指针??? 关于container_of见kernel.h中: /** * container_of - cast a member of a structure out to the containing struc

  • container_of 有的情况下,只知道 struct结构中莫个成员的指针,而需要知道整个struct的指针 (如网卡驱动里面,list) struct DDD {         int a;         int b;         int c;         int d; }; struct DDD  ddd; |------------|  <-------  得

  • 一、Containerd 安装 1、安装 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum -y install containerd containerd config default > /etc/containerd/config.toml systemctl e