From 26c876174ad130191e49b1d54fd70c6b1ba6dd0e Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Fri, 24 May 2019 15:43:24 -0500 Subject: [PATCH] Modularize connection instructions ... so that they can be used for training sessions where we go from 1-node environments to N-node environments. --- slides/kube-fullday.yml | 1 + slides/kube-halfday.yml | 1 + slides/kube-selfpaced.yml | 1 + slides/kube-twodays.yml | 1 + slides/shared/connecting.md | 137 +++++++++++++++++++++++++++++++++++ slides/shared/prereqs.md | 140 ------------------------------------ slides/swarm-fullday.yml | 1 + slides/swarm-halfday.yml | 1 + slides/swarm-selfpaced.yml | 1 + slides/swarm-video.yml | 1 + 10 files changed, 145 insertions(+), 140 deletions(-) create mode 100644 slides/shared/connecting.md diff --git a/slides/kube-fullday.yml b/slides/kube-fullday.yml index 110c1b60..32dc3c87 100644 --- a/slides/kube-fullday.yml +++ b/slides/kube-fullday.yml @@ -20,6 +20,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - k8s/versions-k8s.md - shared/sampleapp.md # - shared/composescale.md diff --git a/slides/kube-halfday.yml b/slides/kube-halfday.yml index 8ff6b2ea..a13cf00d 100644 --- a/slides/kube-halfday.yml +++ b/slides/kube-halfday.yml @@ -22,6 +22,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - k8s/versions-k8s.md - shared/sampleapp.md # Bridget doesn't go into as much depth with compose diff --git a/slides/kube-selfpaced.yml b/slides/kube-selfpaced.yml index 358f5925..d4fb1269 100644 --- a/slides/kube-selfpaced.yml +++ b/slides/kube-selfpaced.yml @@ -20,6 +20,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - k8s/versions-k8s.md - shared/sampleapp.md - shared/composescale.md diff --git a/slides/kube-twodays.yml b/slides/kube-twodays.yml index 61aaac18..d02693a6 100644 --- a/slides/kube-twodays.yml +++ b/slides/kube-twodays.yml @@ -20,6 +20,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - k8s/versions-k8s.md - shared/sampleapp.md #- shared/composescale.md diff --git a/slides/shared/connecting.md b/slides/shared/connecting.md new file mode 100644 index 00000000..f21d46b7 --- /dev/null +++ b/slides/shared/connecting.md @@ -0,0 +1,137 @@ +class: in-person + +## Connecting to our lab environment + +.exercise[ + +- Log into the first VM (`node1`) with your SSH client + + + +- Check that you can SSH (without password) to `node2`: + ```bash + ssh node2 + ``` +- Type `exit` or `^D` to come back to `node1` + + + +] + +If anything goes wrong — ask for help! + +--- + +## Doing or re-doing the workshop on your own? + +- Use something like + [Play-With-Docker](http://play-with-docker.com/) or + [Play-With-Kubernetes](https://training.play-with-kubernetes.com/) + + Zero setup effort; but environment are short-lived and + might have limited resources + +- Create your own cluster (local or cloud VMs) + + Small setup effort; small cost; flexible environments + +- Create a bunch of clusters for you and your friends + ([instructions](https://@@GITREPO@@/tree/master/prepare-vms)) + + Bigger setup effort; ideal for group training + +--- + +class: self-paced + +## Get your own Docker nodes + +- If you already have some Docker nodes: great! + +- If not: let's get some thanks to Play-With-Docker + +.exercise[ + +- Go to http://www.play-with-docker.com/ + +- Log in + +- Create your first node + + + +] + +You will need a Docker ID to use Play-With-Docker. + +(Creating a Docker ID is free.) + +--- + +## We will (mostly) interact with node1 only + +*These remarks apply only when using multiple nodes, of course.* + +- Unless instructed, **all commands must be run from the first VM, `node1`** + +- We will only checkout/copy the code on `node1` + +- During normal operations, we do not need access to the other nodes + +- If we had to troubleshoot issues, we would use a combination of: + + - SSH (to access system logs, daemon status...) + + - Docker API (to check running containers and container engine status) + +--- + +## Terminals + +Once in a while, the instructions will say: +
"Open a new terminal." + +There are multiple ways to do this: + +- create a new window or tab on your machine, and SSH into the VM; + +- use screen or tmux on the VM and open a new window from there. + +You are welcome to use the method that you feel the most comfortable with. + +--- + +## Tmux cheatsheet + +[Tmux](https://en.wikipedia.org/wiki/Tmux) is a terminal multiplexer like `screen`. + +*You don't have to use it or even know about it to follow along. +
+But some of us like to use it to switch between terminals. +
+It has been preinstalled on your workshop nodes.* + +- Ctrl-b c → creates a new window +- Ctrl-b n → go to next window +- Ctrl-b p → go to previous window +- Ctrl-b " → split window top/bottom +- Ctrl-b % → split window left/right +- Ctrl-b Alt-1 → rearrange windows in columns +- Ctrl-b Alt-2 → rearrange windows in rows +- Ctrl-b arrows → navigate to other windows +- Ctrl-b d → detach session +- tmux attach → reattach to session diff --git a/slides/shared/prereqs.md b/slides/shared/prereqs.md index 7840b527..52684b34 100644 --- a/slides/shared/prereqs.md +++ b/slides/shared/prereqs.md @@ -169,143 +169,3 @@ class: in-person, extra-details - It requires UDP ports to be open (By default, it uses a UDP port between 60000 and 61000) - ---- - -class: in-person - -## Connecting to our lab environment - -.exercise[ - -- Log into the first VM (`node1`) with your SSH client - - - -- Check that you can SSH (without password) to `node2`: - ```bash - ssh node2 - ``` -- Type `exit` or `^D` to come back to `node1` - - - -] - -If anything goes wrong — ask for help! - ---- - -## Doing or re-doing the workshop on your own? - -- Use something like - [Play-With-Docker](http://play-with-docker.com/) or - [Play-With-Kubernetes](https://training.play-with-kubernetes.com/) - - Zero setup effort; but environment are short-lived and - might have limited resources - -- Create your own cluster (local or cloud VMs) - - Small setup effort; small cost; flexible environments - -- Create a bunch of clusters for you and your friends - ([instructions](https://@@GITREPO@@/tree/master/prepare-vms)) - - Bigger setup effort; ideal for group training - ---- - -class: self-paced - -## Get your own Docker nodes - -- If you already have some Docker nodes: great! - -- If not: let's get some thanks to Play-With-Docker - -.exercise[ - -- Go to http://www.play-with-docker.com/ - -- Log in - -- Create your first node - - - -] - -You will need a Docker ID to use Play-With-Docker. - -(Creating a Docker ID is free.) - ---- - -## We will (mostly) interact with node1 only - -*These remarks apply only when using multiple nodes, of course.* - -- Unless instructed, **all commands must be run from the first VM, `node1`** - -- We will only checkout/copy the code on `node1` - -- During normal operations, we do not need access to the other nodes - -- If we had to troubleshoot issues, we would use a combination of: - - - SSH (to access system logs, daemon status...) - - - Docker API (to check running containers and container engine status) - ---- - -## Terminals - -Once in a while, the instructions will say: -
"Open a new terminal." - -There are multiple ways to do this: - -- create a new window or tab on your machine, and SSH into the VM; - -- use screen or tmux on the VM and open a new window from there. - -You are welcome to use the method that you feel the most comfortable with. - ---- - -## Tmux cheatsheet - -[Tmux](https://en.wikipedia.org/wiki/Tmux) is a terminal multiplexer like `screen`. - -*You don't have to use it or even know about it to follow along. -
-But some of us like to use it to switch between terminals. -
-It has been preinstalled on your workshop nodes.* - -- Ctrl-b c → creates a new window -- Ctrl-b n → go to next window -- Ctrl-b p → go to previous window -- Ctrl-b " → split window top/bottom -- Ctrl-b % → split window left/right -- Ctrl-b Alt-1 → rearrange windows in columns -- Ctrl-b Alt-2 → rearrange windows in rows -- Ctrl-b arrows → navigate to other windows -- Ctrl-b d → detach session -- tmux attach → reattach to session diff --git a/slides/swarm-fullday.yml b/slides/swarm-fullday.yml index ab3b38a9..8f30665d 100644 --- a/slides/swarm-fullday.yml +++ b/slides/swarm-fullday.yml @@ -24,6 +24,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - swarm/versions.md - shared/sampleapp.md - shared/composescale.md diff --git a/slides/swarm-halfday.yml b/slides/swarm-halfday.yml index d69c5c2c..a80a0733 100644 --- a/slides/swarm-halfday.yml +++ b/slides/swarm-halfday.yml @@ -24,6 +24,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - swarm/versions.md - shared/sampleapp.md - shared/composescale.md diff --git a/slides/swarm-selfpaced.yml b/slides/swarm-selfpaced.yml index 73290511..2510eed5 100644 --- a/slides/swarm-selfpaced.yml +++ b/slides/swarm-selfpaced.yml @@ -19,6 +19,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - swarm/versions.md - | name: part-1 diff --git a/slides/swarm-video.yml b/slides/swarm-video.yml index ba62175a..0d361a40 100644 --- a/slides/swarm-video.yml +++ b/slides/swarm-video.yml @@ -19,6 +19,7 @@ chapters: - shared/about-slides.md - shared/toc.md - - shared/prereqs.md + - shared/connecting.md - swarm/versions.md - | name: part-1