Compare commits

...

8 Commits

Author SHA1 Message Date
Jérôme Petazzoni
b7397c5e2f 🔥 Prepare deck for reblaze 2021-06-12 19:04:35 +02:00
Jérôme Petazzoni
ee7bd37f83 ♻️ Update download URL for k9s 2021-06-10 17:25:28 +02:00
Jérôme Petazzoni
166cacc48e ♻️ Update slides counting script 2021-06-10 07:56:53 +02:00
Jérôme Petazzoni
9595179f03 ♻️ Rename settings files 2021-06-07 17:46:32 +02:00
Jérôme Petazzoni
3b6509b95b 🐞 Fix minor bug in inventory command 2021-06-07 17:22:02 +02:00
Jérôme Petazzoni
c84a5ce6b7 📅Add more Enix sesssions + fix past slides 2021-06-04 17:33:13 +02:00
Jérôme Petazzoni
4402c17eb9 📃Add info about hyperkube in k8s 1.19 2021-06-03 15:59:26 +02:00
Jérôme Petazzoni
4f04046fea 🤖Update deployment scripts 2021-05-31 08:12:35 +02:00
13 changed files with 247 additions and 141 deletions

View File

@@ -1,3 +1,6 @@
# Note: hyperkube isn't available after Kubernetes 1.18.
# So we'll have to update this for Kubernetes 1.19!
version: "3"
services:

View File

@@ -170,24 +170,27 @@ _cmd_kubebins() {
TAG=$1
need_tag
##VERSION##
ETCD_VERSION=v3.4.13
K8SBIN_VERSION=v1.19.11 # Can't go to 1.20 because it requires a serviceaccount signing key.
CNI_VERSION=v0.8.7
pssh --timeout 300 "
set -e
cd /usr/local/bin
if ! [ -x etcd ]; then
##VERSION##
curl -L https://github.com/etcd-io/etcd/releases/download/v3.4.9/etcd-v3.4.9-linux-amd64.tar.gz \
curl -L https://github.com/etcd-io/etcd/releases/download/$ETCD_VERSION/etcd-$ETCD_VERSION-linux-amd64.tar.gz \
| sudo tar --strip-components=1 --wildcards -zx '*/etcd' '*/etcdctl'
fi
if ! [ -x hyperkube ]; then
##VERSION##
curl -L https://dl.k8s.io/v1.18.10/kubernetes-server-linux-amd64.tar.gz \
curl -L https://dl.k8s.io/$K8SBIN_VERSION/kubernetes-server-linux-amd64.tar.gz \
| sudo tar --strip-components=3 -zx \
kubernetes/server/bin/kube{ctl,let,-proxy,-apiserver,-scheduler,-controller-manager}
fi
sudo mkdir -p /opt/cni/bin
cd /opt/cni/bin
if ! [ -x bridge ]; then
curl -L https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-amd64-v0.8.6.tgz \
curl -L https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION/cni-plugins-linux-amd64-$CNI_VERSION.tgz \
| sudo tar -zx
fi
"
@@ -327,7 +330,7 @@ EOF"
# Install the AWS IAM authenticator
pssh "
if [ ! -x /usr/local/bin/aws-iam-authenticator ]; then
##VERSION##
##VERSION##
sudo curl -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.12.7/2019-03-27/bin/linux/amd64/aws-iam-authenticator
sudo chmod +x /usr/local/bin/aws-iam-authenticator
fi"
@@ -342,13 +345,17 @@ EOF"
echo export PATH=/home/docker/.krew/bin:\\\$PATH | sudo -u docker tee -a /home/docker/.bashrc
fi"
# Install k9s and popeye
# Install k9s
pssh "
if [ ! -x /usr/local/bin/k9s ]; then
FILENAME=k9s_\$(uname -s)_\$(uname -m).tar.gz &&
curl -sSL https://github.com/derailed/k9s/releases/latest/download/\$FILENAME |
VERSION=v0.24.10 &&
FILENAME=k9s_\${VERSION}_\$(uname -s)_\$(uname -m).tar.gz &&
curl -sSL https://github.com/derailed/k9s/releases/download/\$VERSION/\$FILENAME |
sudo tar -zxvf- -C /usr/local/bin k9s
fi
fi"
# Install popeye
pssh "
if [ ! -x /usr/local/bin/popeye ]; then
FILENAME=popeye_\$(uname -s)_\$(uname -m).tar.gz &&
curl -sSL https://github.com/derailed/popeye/releases/latest/download/\$FILENAME |
@@ -428,7 +435,7 @@ _cmd_inventory() {
case "$1" in
"")
for INFRA in infra/*; do
$0 list $INFRA
$0 inventory $INFRA
done
;;
*/example.*)

View File

@@ -1,24 +0,0 @@
# 3 nodes for k8s 101 workshops
# Number of VMs per cluster
clustersize: 3
# The hostname of each node will be clusterprefix + a number
clusterprefix: node
# Jinja2 template to use to generate ready-to-cut cards
cards_template: cards.html
# Use "Letter" in the US, and "A4" everywhere else
paper_size: Letter
# This can be "test" or "stable"
engine_version: stable
# These correspond to the version numbers visible on their respective GitHub release pages
compose_version: 1.24.1
machine_version: 0.14.0
# Password used to connect with the "docker user"
docker_user_password: training

View File

@@ -30,7 +30,7 @@ TAG=$PREFIX-$SETTINGS
--tag $TAG \
--infra $INFRA \
--settings settings/$SETTINGS.yaml \
--count $STUDENTS
--students $STUDENTS
retry 5 ./workshopctl deploy $TAG
retry 5 ./workshopctl disabledocker $TAG
@@ -45,7 +45,7 @@ TAG=$PREFIX-$SETTINGS
--tag $TAG \
--infra $INFRA \
--settings settings/$SETTINGS.yaml \
--count $((3*$STUDENTS))
--students $STUDENTS
retry 5 ./workshopctl disableaddrchecks $TAG
retry 5 ./workshopctl deploy $TAG
@@ -60,7 +60,7 @@ TAG=$PREFIX-$SETTINGS
--tag $TAG \
--infra $INFRA \
--settings settings/$SETTINGS.yaml \
--count $((3*$STUDENTS))
--students $STUDENTS
retry 5 ./workshopctl disableaddrchecks $TAG
retry 5 ./workshopctl deploy $TAG
@@ -79,10 +79,9 @@ TAG=$PREFIX-$SETTINGS
--tag $TAG \
--infra $INFRA \
--settings settings/$SETTINGS.yaml \
--count $((3*$STUDENTS))
--students $STUDENTS
retry 5 ./workshopctl deploy $TAG
retry 5 ./workshopctl kube $TAG 1.17.13
retry 5 ./workshopctl kube $TAG 1.19.11
retry 5 ./workshopctl webssh $TAG
retry 5 ./workshopctl tailhist $TAG
./workshopctl cards $TAG

View File

@@ -2,6 +2,7 @@
#/ /kube-halfday.yml.html 200!
#/ /kube-fullday.yml.html 200!
#/ /kube-twodays.yml.html 200!
/ /reblaze.yml.html 200!
# And this allows to do "git clone https://container.training".
/info/refs service=git-upload-pack https://github.com/jpetazzo/container.training/info/refs?service=git-upload-pack

View File

@@ -7,35 +7,17 @@ class: title
---
## Our training environment
## Installing Docker
- If you are attending a tutorial or workshop:
- For the hands on parts, we'll need Docker installed
- a VM has been provisioned for each student
- On Mac or Windows: the easiest solution is Docker Desktop
- If you are doing or re-doing this course on your own, you can:
(it's free; with upsells for extra features)
- install Docker locally (as explained in the chapter "Installing Docker")
- On Linux: the easiest solution is Docker CE
- install Docker on e.g. a cloud VM
- use https://www.play-with-docker.com/ to instantly get a training environment
---
## Our Docker VM
*This section assumes that you are following this course as part of
a tutorial, training or workshop, where each student is given an
individual Docker VM.*
- The VM is created just before the training.
- It will stay up during the whole training.
- It will be destroyed shortly after the training.
- It comes pre-loaded with Docker and some other useful tools.
(Community Edition; a set of open source packages)
---
@@ -55,46 +37,6 @@ individual Docker VM.*
---
## Why don't we run Docker locally?
- We are going to download container images and distribution packages.
- This could put a bit of stress on the local WiFi and slow us down.
- Instead, we use a remote VM that has a good connectivity
- In some rare cases, installing Docker locally is challenging:
- no administrator/root access (computer managed by strict corp IT)
- 32-bit CPU or OS
- old OS version (e.g. CentOS 6, OSX pre-Yosemite, Windows 7)
- It's better to spend time learning containers than fiddling with the installer!
---
## Connecting to your Virtual Machine
You need an SSH client.
* On OS X, Linux, and other UNIX systems, just use `ssh`:
```bash
$ ssh <login>@<ip-address>
```
* On Windows, if you don't have an SSH client, you can download:
* Putty (www.putty.org)
* Git BASH (https://git-for-windows.github.io/)
* MobaXterm (https://mobaxterm.mobatek.net/)
---
class: in-person
## `tailhist`
@@ -113,9 +55,9 @@ If it turns red, reloading the page should fix it.
---
## Checking your Virtual Machine
## Checking our Docker install
Once logged in, make sure that you can run a basic Docker command:
Let's make sure that we can run a basic Docker command:
.small[
```bash
@@ -142,8 +84,6 @@ Server:
```
]
If this doesn't work, raise your hand so that an instructor can assist you!
???
:EN:Container concepts

View File

@@ -11,10 +11,10 @@ class State(object):
self.section_title = None
self.section_start = 0
self.section_slides = 0
self.modules = {}
self.parts = {}
self.sections = {}
def show(self):
if self.section_title.startswith("module-"):
if self.section_title.startswith("part-"):
return
print("{0.section_title}\t{0.section_start}\t{0.section_slides}".format(self))
self.sections[self.section_title] = self.section_slides
@@ -38,10 +38,10 @@ for line in open(sys.argv[1]):
if line == "--":
state.current_slide += 1
toc_links = re.findall("\(#toc-(.*)\)", line)
if toc_links and state.section_title.startswith("module-"):
if state.section_title not in state.modules:
state.modules[state.section_title] = []
state.modules[state.section_title].append(toc_links[0])
if toc_links and state.section_title.startswith("part-"):
if state.section_title not in state.parts:
state.parts[state.section_title] = []
state.parts[state.section_title].append(toc_links[0])
# This is really hackish
if line.startswith("class:"):
for klass in EXCLUDED:
@@ -51,7 +51,7 @@ for line in open(sys.argv[1]):
state.show()
for module in sorted(state.modules, key=lambda f: int(f.split("-")[1])):
module_size = sum(state.sections[s] for s in state.modules[module])
print("{}\t{}\t{}".format("total size for", module, module_size))
for part in sorted(state.parts, key=lambda f: int(f.split("-")[1])):
part_size = sum(state.sections[s] for s in state.parts[part])
print("{}\t{}\t{}".format("total size for", part, part_size))

View File

@@ -112,7 +112,10 @@ TEMPLATE="""<html>
{% for item in all_past_workshops %}
<tr>
<td>{{ item.title }}</td>
<td><a class="slides" href="{{ item.slides }}" /></td>
<td>{% if item.slides %}<a class="slides" href="{{ item.slides }}" />
{% else %}
<p class="details">{{ item.status }}</p>
{% endif %}</td>
{% if item.video %}
<td><a class="video" href="{{ item.video }}" /></td>
{% endif %}

View File

@@ -1,3 +1,103 @@
- date: [2021-09-27, 2021-09-29]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Docker intensif (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
#slides: https://2021-05-enix.container.training/1.yml.html
- date: [2021-10-04, 2021-10-07]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Fondamentaux Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
#slides: https://2021-05-enix.container.training/2.yml.html
- date: [2021-10-11, 2021-10-12]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Packaging et CI/CD pour Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
#slides: https://2021-05-enix.container.training/3.yml.html
- date: [2021-11-08, 2021-11-16]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Kubernetes avancé (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
#slides: https://2021-05-enix.container.training/4.yml.html
- date: [2021-11-18, 2021-11-19]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Opérer Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
#slides: https://2021-05-enix.container.training/5.yml.html
- date: [2021-05-10, 2021-05-12]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Docker intensif (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-05-enix.container.training/1.yml.html
- date: [2021-05-17, 2021-05-20]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Fondamentaux Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-05-enix.container.training/2.yml.html
- date: [2021-05-24, 2021-05-25]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Packaging et CI/CD pour Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-05-enix.container.training/3.yml.html
- date: [2021-05-26, 2021-05-28]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Kubernetes avancé (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-05-enix.container.training/4.yml.html
- date: [2021-05-31, 2021-06-01]
country: www
city: streaming
event: ENIX SAS
speaker: jpetazzo
title: Opérer Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-05-enix.container.training/5.yml.html
- date: [2021-02-08, 2021-02-10]
country: www
city: streaming
@@ -6,6 +106,7 @@
title: Docker intensif (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-02-enix.container.training/1.yml.html
- date: [2021-02-15, 2021-02-18]
country: www
@@ -15,6 +116,7 @@
title: Fondamentaux Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-02-enix.container.training/2.yml.html
- date: [2021-02-22, 2021-02-23]
country: www
@@ -24,6 +126,7 @@
title: Packaging et CI/CD pour Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-02-enix.container.training/3.yml.html
- date: [2021-02-24, 2021-02-26]
country: www
@@ -33,6 +136,7 @@
title: Kubernetes avancé (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-02-enix.container.training/4.yml.html
- date: [2021-03-01, 2021-03-02]
country: www
@@ -42,6 +146,7 @@
title: Opérer Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2021-02-enix.container.training/5.yml.html
- date: [2020-10-05, 2020-10-06]
country: www
@@ -51,6 +156,7 @@
title: Docker intensif (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-10-enix.container.training/1.yml.html
- date: [2020-10-07, 2020-10-09]
country: www
@@ -60,6 +166,7 @@
title: Fondamentaux Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-10-enix.container.training/2.yml.html
- date: 2020-10-12
country: www
@@ -69,6 +176,7 @@
title: Packaging pour Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-10-enix.container.training/3.yml.html
- date: [2020-10-13, 2020-10-14]
country: www
@@ -78,6 +186,7 @@
title: Kubernetes avancé (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-10-enix.container.training/4.yml.html
- date: [2020-10-19, 2020-10-20]
country: www
@@ -87,6 +196,7 @@
title: Opérer Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-10-enix.container.training/5.yml.html
- date: [2020-09-28, 2020-10-01]
country: www
@@ -95,6 +205,7 @@
speaker: jpetazzo
title: Advanced Kubernetes Concepts
attend: https://skillsmatter.com/courses/700-advanced-kubernetes-concepts-workshop-jerome-petazzoni
slides: https://2020-09-skillsmatter.container.training/
- date: [2020-08-29, 2020-08-30]
country: www
@@ -130,6 +241,7 @@
title: Docker intensif (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-06-enix.container.training/1.yml.html
- date: [2020-06-17, 2020-06-19]
country: www
@@ -139,6 +251,7 @@
title: Fondamentaux Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-06-enix.container.training/2.yml.html
- date: 2020-06-22
country: www
@@ -148,6 +261,7 @@
title: Packaging pour Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-06-enix.container.training/3.yml.html
- date: [2020-06-23, 2020-06-24]
country: www
@@ -157,6 +271,7 @@
title: Kubernetes avancé (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-06-enix.container.training/4.yml.html
- date: [2020-06-25, 2020-06-26]
country: www
@@ -166,6 +281,8 @@
title: Opérer Kubernetes (en français)
lang: fr
attend: https://enix.io/fr/services/formation/online/
slides: https://2020-06-enix.container.training/5.yml.html
- date: [2020-06-09, 2020-06-11]
country: www

View File

@@ -1,30 +1,10 @@
## Intros
- This slide should be customized by the tutorial instructor(s).
- Hello! I'm Jérôme Petazzoni ([@jpetazzo](https://twitter.com/jpetazzo))
- Hello! We are:
- The training will run from 10h00 to 16h00 (Israel time)
- 👩🏻‍🏫 Ann O'Nymous ([@...](https://twitter.com/...), Megacorp Inc)
- 👨🏾‍🎓 Stu Dent ([@...](https://twitter.com/...), University of Wakanda)
<!-- .dummy[
- 👷🏻‍♀️ AJ ([@s0ulshake](https://twitter.com/s0ulshake), Travis CI)
- 🚁 Alexandre ([@alexbuisine](https://twitter.com/alexbuisine), Enix SAS)
- 🐳 Jérôme ([@jpetazzo](https://twitter.com/jpetazzo), Enix SAS)
- ⛵ Jérémy ([@jeremygarrouste](twitter.com/jeremygarrouste), Inpiwee)
- 🎧 Romain ([@rdegez](https://twitter.com/rdegez), Enix SAS)
] -->
- The workshop will run from ...
- There will be a lunch break at ...
- There will be a lunch break between 13h00 and 14h00
(And coffee breaks!)

80
slides/reblaze.yml Normal file
View File

@@ -0,0 +1,80 @@
title: |
Docker,
Containers,
& Kubernetes
#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)"
#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)"
gitrepo: github.com/jpetazzo/container.training
slides: https://2021-06-reblaze.container.training/
#slidenumberprefix: "#SomeHashTag &mdash; "
exclude:
- self-paced
content:
- shared/title.md
- logistics.md
- containers/intro.md
- shared/about-slides.md
- shared/chat-room-im.md
#- shared/chat-room-slack.md
#- shared/chat-room-zoom-meeting.md
#- shared/chat-room-zoom-webinar.md
- shared/toc.md
- # DAY 1
- containers/Training_Environment.md
- containers/First_Containers.md
- containers/Background_Containers.md
- containers/Naming_And_Inspecting.md
- containers/Getting_Inside.md
- containers/Initial_Images.md
- containers/Building_Images_Interactively.md
- containers/Building_Images_With_Dockerfiles.md
- containers/Cmd_And_Entrypoint.md
- containers/Copying_Files_During_Build.md
- containers/Exercise_Dockerfile_Basic.md
- # DAY 2
- containers/Container_Networking_Basics.md
- containers/Container_Network_Model.md
- containers/Local_Development_Workflow.md
- containers/Network_Drivers.md
- containers/Compose_For_Dev_Stacks.md
- containers/Exercise_Composefile.md
- containers/Multi_Stage_Builds.md
#- containers/Publishing_To_Docker_Hub.md
- containers/Dockerfile_Tips.md
- containers/Exercise_Dockerfile_Advanced.md
#- containers/Advanced_Dockerfiles.md
#- shared/webssh.md
- # DAY 3
- shared/prereqs.md
- shared/connecting.md
- shared/sampleapp.md
#- k8s/versions-k8s.md
#- shared/composescale.md
#- shared/hastyconclusions.md
- shared/composedown.md
- k8s/concepts-k8s.md
- k8s/kubectlget.md
- k8s/kubectl-run.md
- k8s/labels-annotations.md
- k8s/kubectl-logs.md
- k8s/logs-cli.md
- shared/declarative.md
- k8s/declarative.md
- k8s/deploymentslideshow.md
- k8s/kubenet.md
- k8s/kubectlexpose.md
- k8s/shippingimages.md
- k8s/buildshiprun-dockerhub.md
- k8s/ourapponkube.md
- k8s/exercise-wordsmith.md
#- k8s/namespaces.md
#- k8s/yamldeploy.md
#- k8s/kubectlscale.md
#- k8s/scalingdockercoins.md
#- shared/hastyconclusions.md