Compare commits

...

34 Commits

Author SHA1 Message Date
Jerome Petazzoni
5f0380af79 fix-redirects.sh: adding forced redirect 2020-04-07 16:49:31 -05:00
Jerome Petazzoni
c825b97058 update final words 2018-09-30 20:38:57 -05:00
Jerome Petazzoni
7af11d3120 update final words 2018-09-30 20:38:16 -05:00
Jerome Petazzoni
454e8b8f23 Merge branch 'master' into k8s2d 2018-09-30 19:15:29 -05:00
Jerome Petazzoni
d1609845a9 Merge branch 'kube-ps1' into k8s2d 2018-09-30 17:43:48 -05:00
Jerome Petazzoni
1020a8ff86 kube-ps1 is cool and we should mention it 2018-09-30 17:43:18 -05:00
Jerome Petazzoni
ec3476173a Merge branch 'master' into k8s2d 2018-09-30 17:31:27 -05:00
Jerome Petazzoni
4c1169c785 add wifi info 2018-09-30 15:03:18 +02:00
Jerome Petazzoni
8b9ee3ecbb Merge branch 'cleanup-after-netpol' into k8s2d 2018-09-29 20:40:31 -05:00
Jerome Petazzoni
724753b8b9 For this workshop, deploy portworx to 4 nodes, using loop4 2018-09-29 18:56:05 -05:00
Jerome Petazzoni
5c4267afda Merge branch 'enixlogo' into k8s2d 2018-09-29 18:54:15 -05:00
Jerome Petazzoni
f01bc2a7a9 Fix overlapsing slide number and pics 2018-09-29 18:54:00 -05:00
Jerome Petazzoni
8f89953d25 Fix typo in logistics 2018-09-29 18:53:33 -05:00
Jerome Petazzoni
b07720c703 Merge branch 'master' into k8s2d 2018-09-29 18:44:26 -05:00
Jerome Petazzoni
e3b71d35a6 Merge branch 'master' into k8s2d 2018-09-29 10:06:37 -05:00
Jerome Petazzoni
a32d4132f9 Merge branch 'master' into k8s2d 2018-09-28 19:36:01 -05:00
Jerome Petazzoni
3e1fac323c Timing and location of breaks 2018-09-28 19:29:23 -05:00
Jerome Petazzoni
5bb8c2a6c2 Merge branch 'master' into k8s2d 2018-09-28 19:14:17 -05:00
Jerome Petazzoni
739c20fa4c Merge branch 'master' into k8s2d 2018-09-28 19:05:12 -05:00
Jerome Petazzoni
3200de3bea Merge branch 'master' into k8s2d 2018-09-28 18:49:13 -05:00
Jerome Petazzoni
4e0ec722bc Merge branch 'master' into k8s2d 2018-09-28 18:36:42 -05:00
Jerome Petazzoni
10e6891dca Merge branch 'master' into k8s2d 2018-09-28 18:31:50 -05:00
Jerome Petazzoni
8dd3bccf7a Update cards design; add settings for velocity nyc 2018-09-28 18:25:07 -05:00
Jerome Petazzoni
970cbdd8fd Merge branch 'new-prepare-scripts' into k8s2d 2018-09-28 18:24:36 -05:00
Jerome Petazzoni
67ed422aaf Bump up EBS size to 20G for Portworx 2018-09-28 18:24:14 -05:00
Jerome Petazzoni
720f2fc86e Actually modify the prompt 2018-09-28 18:18:05 -05:00
Jerome Petazzoni
a9e99e3bae merge master 2018-09-28 16:19:23 -05:00
Jerome Petazzoni
ee9b775f01 Merge branch 'enixlogo' into k8s2d 2018-09-28 16:14:32 -05:00
Bridget Kromhout
a94271c14c Slight modifications to current docs/scripts 2018-09-28 16:09:10 -05:00
Jerome Petazzoni
c04dafd698 Assemble deck for Velocity NYC 2018 2018-09-28 16:08:18 -05:00
Jerome Petazzoni
96be5c16bf Merge branch 'new-prepare-scripts' into nyc2018 2018-09-28 15:26:29 -05:00
Jerome Petazzoni
e4e0386efd Add kubectl, kubens, kube_ps1
kubectl and kubens are added as kctl and kns (to avoid clashing with
completion for kubectl). Their completion is added too (so you can
do 'kns kube-sy[TAB]' to switch to kube-system).

kube_ps1 is added and enabled. The default prompt for the docker
user now shows the current context and namespace.
2018-09-28 14:24:20 -05:00
Jerome Petazzoni
9b54ea95ac Massive refactoring of workshopctl
This allows to manage groups of VMs across multiple infrastructure
providers. It also adds support to create groups of VMs on OpenStack.

WARNING: the syntax of workshopctl has changed slightly. Check READMEs
for details.
2018-09-28 13:18:54 -05:00
Jerome Petazzoni
3eaa844c55 Add ENIX logo
Warning: do not merge this branch to your content, otherwise you
will get the ENIX logo in the top right of all your decks
2018-09-08 07:49:38 -05:00
12 changed files with 92 additions and 139 deletions

View File

@@ -0,0 +1,25 @@
# Number of VMs per cluster
clustersize: 5
# 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
# Feel free to reduce this if your printer can handle it
paper_margin: 0.2in
# Note: paper_size and paper_margin only apply to PDF generated with pdfkit.
# If you print (or generate a PDF) using ips.html, they will be ignored.
# (The equivalent parameters must be set from the browser's print dialog.)
# 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.21.2
machine_version: 0.14.0
# Password used to connect with the "docker user"
docker_user_password: training

View File

@@ -1,5 +1,5 @@
{# Feel free to customize or override anything in there! #}
{%- set url = "http://container.training/" -%}
{%- set url = "http://k8s2d.container.training/" -%}
{%- set pagesize = 12 -%}
{%- if clustersize == 1 -%}
{%- set workshop_name = "Docker workshop" -%}

2
slides/_redirects Normal file
View File

@@ -0,0 +1,2 @@
/ /kube-fullday.yml.html 200!

View File

@@ -227,3 +227,21 @@ Note: it might take a minute or two for the app to be up and running.
- On our clusters, they are installed as `kns` and `kctx`
(for brevity and to avoid completion clashes between `kubectx` and `kubectl`)
---
## `kube-ps1`
- It's easy to lose track of our current cluster / context / namespace
- `kube-ps1` makes it easy to track these, by showing them in our shell prompt
- It's a simple shell script availble from https://github.com/jonmosco/kube-ps1
- On our clusters, `kube-ps1` is installed and included in `PS1`:
```
[123.45.67.89] `(kubernetes-admin@kubernetes:default)` docker@node1 ~
```
(The highlighted part is `context:namespace`, managed by `kube-ps1`)
- Highly recommended if you work across multiple contexts or namespaces!

View File

@@ -122,13 +122,13 @@
- Create a 10 GB file on each node:
```bash
for N in $(seq 1 5); do ssh node$N sudo truncate --size 10G /portworx.blk; done
for N in $(seq 1 4); do ssh node$N sudo truncate --size 10G /portworx.blk; done
```
(If SSH asks to confirm host keys, enter `yes` each time.)
- Associate the file to a loop device on each node:
```bash
for N in $(seq 1 5); do ssh node$N sudo losetup /dev/loop4 /portworx.blk; done
for N in $(seq 1 4); do ssh node$N sudo losetup /dev/loop4 /portworx.blk; done
```
]

View File

@@ -20,7 +20,6 @@ And *then* it is time to look at orchestration!
---
## Options for our first production cluster
- Get a managed cluster from a major cloud provider (AKS, EKS, GKE...)
@@ -57,26 +56,6 @@ And *then* it is time to look at orchestration!
---
## Namespaces
- Namespaces let you run multiple identical stacks side by side
- Two namespaces (e.g. `blue` and `green`) can each have their own `redis` service
- Each of the two `redis` services has its own `ClusterIP`
- CoreDNS creates two entries, mapping to these two `ClusterIP` addresses:
`redis.blue.svc.cluster.local` and `redis.green.svc.cluster.local`
- Pods in the `blue` namespace get a *search suffix* of `blue.svc.cluster.local`
- As a result, resolving `redis` from a pod in the `blue` namespace yields the "local" `redis`
.warning[This does not provide *isolation*! That would be the job of network policies.]
---
## Stateful services (databases etc.)
- As a first step, it is wiser to keep stateful services *outside* of the cluster
@@ -97,91 +76,6 @@ And *then* it is time to look at orchestration!
---
## Stateful services (second take)
- If we want to host stateful services on Kubernetes, we can use:
- a storage provider
- persistent volumes, persistent volume claims
- stateful sets
- Good questions to ask:
- what's the *operational cost* of running this service ourselves?
- what do we gain by deploying this stateful service on Kubernetes?
---
## HTTP traffic handling
- *Services* are layer 4 constructs
- HTTP is a layer 7 protocol
- It is handled by *ingresses* (a different resource kind)
- *Ingresses* allow:
- virtual host routing
- session stickiness
- URI mapping
- and much more!
- Check out e.g. [Træfik](https://docs.traefik.io/user-guide/kubernetes/)
---
## Logging
- Logging is delegated to the container engine
- Logs are exposed through the API
- Logs are also accessible through local files (`/var/log/containers`)
- Log shipping to a central platform is usually done through these files
(e.g. with an agent bind-mounting the log directory)
---
## Metrics
- The kubelet embeds [cAdvisor](https://github.com/google/cadvisor), which exposes container metrics
(cAdvisor might be separated in the future for more flexibility)
- It is a good idea to start with [Prometheus](https://prometheus.io/)
(even if you end up using something else)
- Starting from Kubernetes 1.8, we can use the [Metrics API](https://kubernetes.io/docs/tasks/debug-application-cluster/core-metrics-pipeline/)
- [Heapster](https://github.com/kubernetes/heapster) was a popular add-on
(but is being [deprecated](https://github.com/kubernetes/heapster/blob/master/docs/deprecation.md) starting with Kubernetes 1.11)
---
## Managing the configuration of our applications
- Two constructs are particularly useful: secrets and config maps
- They allow to expose arbitrary information to our containers
- **Avoid** storing configuration in container images
(There are some exceptions to that rule, but it's generally a Bad Idea)
- **Never** store sensitive information in container images
(It's the container equivalent of the password on a post-it note on your screen)
---
## Managing stack deployments
- The best deployment tool will vary, depending on:

View File

@@ -1,14 +1,12 @@
title: |
Deploying and Scaling Microservices
with Kubernetes
Kubernetes bootcamp:
Deploying and scaling microservices
#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)"
#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)"
chat: "In person!"
chat: "[Gitter](https://gitter.im/jpetazzo/training-20180930-nyc)"
gitrepo: github.com/jpetazzo/container.training
slides: http://container.training/
slides: http://k8s2d.container.training/
exclude:
- self-paced
@@ -48,7 +46,6 @@ chapters:
- k8s/netpol.md
- k8s/authn-authz.md
- - k8s/ingress.md
- k8s/gitworkflows.md
- k8s/prometheus.md
- - k8s/volumes.md
- k8s/build-with-docker.md

View File

@@ -1,28 +1,12 @@
## Intros
- This slide should be customized by the tutorial instructor(s).
- Hello! I'm Jérôme ([@jpetazzo](https://twitter.com/jpetazzo), Enix SAS)
- Hello! We are:
- The workshop will run from 9am to 5pm
- .emoji[👩🏻‍🏫] Ann O'Nymous ([@...](https://twitter.com/...), Megacorp Inc)
- Lunch will be served at 12:30pm (in Rhinelander)
- .emoji[👨🏾‍🎓] Stu Dent ([@...](https://twitter.com/...), University of Wakanda)
<!-- .dummy[
- .emoji[👷🏻‍♀️] AJ ([@s0ulshake](https://twitter.com/s0ulshake), Travis CI)
- .emoji[🐳] Jérôme ([@jpetazzo](https://twitter.com/jpetazzo), Enix SAS)
- .emoji[⛵] Jérémy ([@jeremygarrouste](twitter.com/jeremygarrouste), Inpiwee)
] -->
- The workshop will run from ...
- There will be a lunch break at ...
(And coffee breaks!)
- Morning and afternoon breaks are scheduled at 10:30am and 3pm (in Sutton Foyer)
- Feel free to interrupt for questions at any time

17
slides/override.css Normal file
View File

@@ -0,0 +1,17 @@
.remark-slide-content:not(.pic) {
background-repeat: no-repeat;
background-position: 99% 1%;
background-size: 8%;
background-image: url(https://enix.io/static/img/logos/logo-domain-cropped.png);
}
div.extra-details:not(.pic) {
background-image: url("images/extra-details.png"), url(https://enix.io/static/img/logos/logo-domain-cropped.png);
background-position: 0.5% 1%, 99% 1%;
background-size: 4%, 8%;
}
.remark-slide-content:not(.pic) div.remark-slide-number {
top: 16px;
right: 112px
}

View File

@@ -4,8 +4,20 @@ Thank you!
---
class: title, in-person
# Final words
That's all, folks! <br/> Questions?
- For $$$ reasons, our clusters will be shut down *now*
![end](images/end.jpg)
- if you want another cluster that you can keep longer, come talk to me
- If you liked this tutorial:
- [rate it on the O'Reilly website](https://conferences.oreilly.com/velocity/vl-ny/public/schedule/evaluate/69875)
- tweet about it, tagging @jpetazzo and #VelocityConf
- hire me to deliver it for your team: jerome.petazzoni@gmail.com
- If you didn't like this tutorial:
- please tell me why, so I can do better next time!

View File

@@ -11,6 +11,9 @@ class: title, in-person
@@TITLE@@<br/></br>
.footnote[
WiFi: OReilly18<br/>
Password: velocity<br/>
**Be kind to the WiFi!**<br/>
<!-- *Use the 5G network.* -->
*Don't use your hotspot.*<br/>

View File

@@ -4,6 +4,7 @@
<title>@@TITLE@@</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="workshop.css">
<link rel="stylesheet" href="override.css">
</head>
<body>
<!--