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:
These materials have been designed around the followingprinciples:
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.
All these materials have been gathered in a single repositorybecause they have a few things in common:
master
to http://container.training/.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.
(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.
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
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.*
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.prepare-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.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.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.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.
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.
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
.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.
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.
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:
(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