{"id":13464802,"url":"https://github.com/jpetazzo/container.training","last_synced_at":"2025-05-13T17:05:56.175Z","repository":{"id":33359259,"uuid":"37004081","full_name":"jpetazzo/container.training","owner":"jpetazzo","description":"Slides and code samples for training, tutorials, and workshops about Docker, containers, and Kubernetes.","archived":false,"fork":false,"pushed_at":"2025-03-27T20:48:57.000Z","size":38539,"stargazers_count":3763,"open_issues_count":20,"forks_count":1612,"subscribers_count":135,"default_branch":"main","last_synced_at":"2025-04-19T11:27:34.517Z","etag":null,"topics":["compose","docker","dockerfiles","elk","helm","kubernetes","labs","slides","stern","swarm","training","workshop"],"latest_commit_sha":null,"homepage":"http://container.training/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpetazzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-07T04:03:19.000Z","updated_at":"2025-04-16T13:16:11.000Z","dependencies_parsed_at":"2024-12-17T14:00:30.658Z","dependency_job_id":"8c7dba3e-5048-4fe6-bcef-bf6a31e510a8","html_url":"https://github.com/jpetazzo/container.training","commit_stats":{"total_commits":2236,"total_committers":116,"mean_commits":"19.275862068965516","dds":0.2558139534883721,"last_synced_commit":"6105b57914f6280a7eb7406d1876d2823cae4c14"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetazzo%2Fcontainer.training","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetazzo%2Fcontainer.training/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetazzo%2Fcontainer.training/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpetazzo%2Fcontainer.training/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpetazzo","download_url":"https://codeload.github.com/jpetazzo/container.training/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528731,"owners_count":21445516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compose","docker","dockerfiles","elk","helm","kubernetes","labs","slides","stern","swarm","training","workshop"],"created_at":"2024-07-31T14:00:50.610Z","updated_at":"2025-04-24T00:38:14.704Z","avatar_url":"https://github.com/jpetazzo.png","language":"Shell","readme":"# Container Training\n\nThis repository (formerly known as `orchestration-workshop`)\ncontains materials (slides, scripts, demo app, and other\ncode samples) used for various workshops, tutorials, and\ntraining sessions around the themes of Docker, containers,\nand orchestration.\n\nFor the moment, it includes:\n\n- Introduction to Docker and Containers,\n- Container Orchestration with Docker Swarm,\n- Container Orchestration with Kubernetes.\n\nThese materials have been designed around the following\nprinciples:\n\n- they assume very little prior knowledge of Docker,\n  containers, or a particular programming language;\n- they can be used in a classroom setup (with an\n  instructor), or self-paced at home;\n- they are hands-on, meaning that they contain lots\n  of examples and exercises that you can easily\n  reproduce;\n- they progressively introduce concepts in chapters\n  that build on top of each other.\n\nIf you're looking for the materials, you can stop reading\nright now, and hop to http://container.training/, which\nhosts all the slides decks available.\n\nThe rest of this document explains how this repository\nis structured, and how to use it to deliver (or create)\nyour own tutorials.\n\n\n## Why a single repository?\n\nAll these materials have been gathered in a single repository\nbecause they have a few things in common:\n\n- some [shared slides](slides/shared/) that are re-used\n  (and updated) identically between different decks;\n- a [build system](slides/) generating HTML slides from\n  Markdown source files;\n- a [semi-automated test harness](slides/autopilot/) to check\n  that the exercises and examples provided work properly;\n- a [PhantomJS script](slides/slidechecker.js) to check\n  that the slides look good and don't have formatting issues;\n- [deployment scripts](prepare-vms/) to start training\n  VMs in bulk;\n- a fancy pipeline powered by\n  [Netlify](https://www.netlify.com/) and continuously\n  deploying `master` to http://container.training/.\n\n\n## What are the different courses available?\n\n**Introduction to Docker** is derived from the first\n\"Docker Fundamentals\" training materials. For more information,\nsee [jpetazzo/intro-to-docker](https://github.com/jpetazzo/intro-to-docker).\nThe version in this repository has been adapted to the Markdown\npublishing pipeline. It is still maintained, but only receives\nminor updates once in a while.\n\n**Container Orchestration with Docker Swarm** (formerly\nknown as \"Orchestration Workshop\") is a workshop created by Jérôme\nPetazzoni in June 2015. Since then, it has been continuously updated\nand improved, and received contributions from many others authors.\nIt is actively maintained.\n\n**Container Orchestration with Kubernetes** was created by\nJérôme Petazzoni in October 2017, with help and feedback from\na few other contributors. It is actively maintained.\n\n\n## Repository structure\n\n- [bin](bin/)\n  - A few helper scripts that you can safely ignore for now.\n- [dockercoins](dockercoins/)\n  - The demo app used throughout the orchestration workshops.\n- [efk](efk/), [elk](elk/), [prom](prom/), [snap](snap/):\n  - Logging and metrics stacks used in the later parts of\n    the orchestration workshops.\n- [prepare-local](prepare-local/), [prepare-machine](prepare-machine/):\n  - Contributed scripts to automate the creation of local environments.\n    These could use some help to test/check that they work.\n- [prepare-vms](prepare-vms/):\n  - Scripts to automate the creation of AWS instances for students.\n    These are routinely used and actively maintained.\n- [slides](slides/):\n  - All the slides! They are assembled from Markdown files with\n    a custom Python script, and then rendered using [gnab/remark](\n    https://github.com/gnab/remark). Check this directory for more details.\n- [stacks](stacks/):\n  - A handful of Compose files (version 3) allowing to easily\n    deploy complex application stacks.\n\n\n## Course structure\n\n(This applies only for the orchestration workshops.)\n\nThe workshop introduces a demo app, \"DockerCoins,\" built\naround a micro-services architecture. First, we run it\non a single node, using Docker Compose. Then, we pretend\nthat we need to scale it, and we use an orchestrator\n(SwarmKit or Kubernetes) to deploy and scale the app on\na cluster.\n\nWe explain the concepts of the orchestrator. For SwarmKit,\nwe setup the cluster with `docker swarm init` and `docker swarm join`.\nFor Kubernetes, we use pre-configured clusters.\n\nThen, we cover more advanced concepts: scaling, load balancing,\nupdates, global services or daemon sets.\n\nThere are a number of advanced optional chapters about\nlogging, metrics, secrets, network encryption, etc.\n\nThe content is very modular: it is broken down in a large\nnumber of Markdown files, that are put together according\nto a YAML manifest. This allows to re-use content\nbetween different workshops very easily.\n\n\n### DockerCoins\n\nThe sample app is in the `dockercoins` directory.\nIt's used during all chapters\nfor explaining different concepts of orchestration.\n\nTo see it in action:\n\n- `cd dockercoins \u0026\u0026 docker-compose up -d`\n- this will build and start all the services\n- the web UI will be available on port 8000\n\n\n## Running the Workshop\n\nIf you want to deliver one of these workshops yourself,\nthis section is for you!\n\n\u003e *This section has been mostly contributed by\n\u003e [Bret Fisher](https://twitter.com/bretfisher), who was\n\u003e one of the first persons to have the bravery of delivering\n\u003e this workshop without me. Thanks Bret! 🍻\n\u003e\n\u003e Jérôme.*\n\n\n### General timeline of planning a workshop\n\n- Fork repo and run through slides, doing the hands-on to be sure you\n  understand the different `dockercoins` repo's and the steps we go through to\n  get to a full Swarm Mode cluster of many containers. You'll update the first\n  few slides and last slide at a minimum, with your info.\n- ~~Your docs directory can use GitHub Pages.~~\n- This workshop expects 5 servers per student. You can get away with as little\n  as 2 servers per student, but you'll need to change the slide deck to\n  accommodate. More servers = more fun.\n- If you have more then ~20 students, try to get an assistant (TA) to help\n  people with issues, so you don't have to stop the workshop to help someone\n  with ssh etc.\n- AWS is our most tested process for generating student machines. In\n  `prepare-vms` you'll find scripts to create EC2 instances, install docker,\n  pre-pull images, and even print \"cards\" to place at each students seat with\n  IP's and username/password.\n- Test AWS Scripts: Be sure to test creating *all* your needed servers a week\n  before workshop (just for a few minutes). You'll likely hit AWS limits in the\n  region closest to your class, and it sometimes takes days to get AWS to raise\n  those limits with a support ticket.\n- Create a https://gitter.im chat room for your workshop and update slides\n  with url. Also useful for TA to monitor this during workshop. You can use it\n  before/after to answer questions, and generally works as a better answer then\n  \"email me that question\".\n- If you can send an email to students ahead of time, mention how they should\n  get SSH, and test that SSH works. If they can `ssh github.com` and get\n  `permission denied (publickey)` then they know it worked, and SSH is properly\n  installed and they don't have anything blocking it. SSH and a browser are all\n  they need for class.\n- Typically you create the servers the day before or morning of workshop, and\n  leave them up the rest of day after workshop. If creating hundreds of servers,\n  you'll likely want to run all these `workshopctl` commands from a dedicated\n  instance you have in same region as instances you want to create. Much faster\n  this way if you're on poor internet. Also, create 2 sets of servers for\n  yourself, and use one during workshop and the 2nd is a backup.\n- Remember you'll need to print the \"cards\" for students, so you'll need to\n  create instances while you have a way to print them.\n\n\n### Things That Could Go Wrong\n\n- Creating AWS instances ahead of time, and you hit its limits in region and\n  didn't plan enough time to wait on support to increase your limits. :(\n- Students have technical issues during workshop. Can't get ssh working,\n  locked-down computer, host firewall, etc.\n- Horrible wifi, or ssh port TCP/22 not open on network! If wifi sucks you\n  can try using MOSH https://mosh.org which handles SSH over UDP. TMUX can also\n  prevent you from losing your place if you get disconnected from servers.\n  https://tmux.github.io\n- Forget to print \"cards\" and cut them up for handing out IP's.\n- Forget to have fun and focus on your students!\n\n\n### Creating the VMs\n\n`prepare-vms/workshopctl` is the script that gets you most of what you need for\nsetting up instances. See\n[prepare-vms/README.md](prepare-vms)\nfor all the info on tools and scripts.\n\n\n### Content for Different Workshop Durations\n\nWith all the slides, this workshop is a full day long. If you need to deliver\nit in shorter timelines, here's some recommendations on what to cut out. You\ncan replace `---` with `???` which will hide slides. Or leave them there and\nadd something like `(EXTRA CREDIT)` to title so students can still view the\ncontent but you also know to skip during presentation.\n\n\n#### 3 Hour Version\n\n- Limit time on debug tools, maybe skip a few. *\"Chapter 1:\n  Identifying bottlenecks\"*\n- Limit time on Compose, try to have them building the Swarm Mode by 30\n  minutes in\n- Skip most of Chapter 3, Centralized Logging and ELK\n- Skip most of Chapter 4, but keep stateful services and DAB's if possible\n- Mention what DAB's are, but make this part optional in case you run out\n  of time\n\n\n#### 2 Hour Version\n\n- Skip all the above, and:\n- Skip the story arc of debugging dockercoins all together, skipping the\n  troubleshooting tools. Just focus on getting them from single-host to\n  multi-host and multi-container.\n- Goal is first 30min on intro and Docker Compose and what dockercoins is,\n  and getting it up on one node in docker-compose.\n- Next 60-75 minutes is getting dockercoins in Swarm Mode services across\n  servers. Big Win.\n- Last 15-30 minutes is for stateful services, DAB files, and questions.\n\n\n### Pre-built images\n\nThere 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.\n\nThere are also three variants, for demo purposes:\n\n- `dockercoins/rng:v0.2` is broken (the server won't even start),\n- `dockercoins/webui:v0.2` has bigger font on the Y axis and a green graph (instead of blue),\n- `dockercoins/worker:v0.2` is 11x slower than `v0.1`.\n\n\n## Past events\n\nSince its inception, this workshop has been delivered dozens of times,\nto thousands of people, and has continuously evolved. This is a short\nhistory of the first times it was delivered. Look also in the \"tags\"\nof this repository: they all correspond to successive iterations of\nthis workshop. If you attended a past version of the workshop, you\ncan use these tags to see what has changed since then.\n\n- QCON, New York City (2015, June)\n- KCDC, Kansas City (2015, June)\n- JDEV, Bordeaux (2015, July)\n- OSCON, Portland (2015, July)\n- StrangeLoop, Saint Louis (2015, September)\n- LISA, Washington D.C. (2015, November)\n- SCALE, Pasadena (2016, January)\n- Zenika, Paris (2016, February)\n- Container Solutions, Amsterdam (2016, February)\n- ... and much more!\n\n\n# Problems? Bugs? Questions?\n\nIf there is a bug and you can fix it: submit a PR.\nMake sure that I know who you are so that I can thank you\n(because you're the real MVP!)\n\nIf there is a bug and you can't fix it, but you can\nreproduce it: submit an issue explaining how to reproduce.\n\nIf there is a bug and you can't even reproduce it:\nsorry. It is probably an Heisenbug. We can't act on it\nuntil it's reproducible, alas.\n\n\n# “Please teach us!”\n\nIf you have attended one of these workshops, and want\nyour team or organization to attend a similar one, you\ncan look at the list of upcoming events on\nhttp://container.training/.\n\nYou are also welcome to reuse these materials to run\nyour own workshop, for your team or even at a meetup\nor conference. In that case, you might enjoy watching\n[Bridget Kromhout's talk at KubeCon 2018 Europe](\nhttps://www.youtube.com/watch?v=mYsp_cGY2O0), explaining\nprecisely how to run such a workshop yourself.\n\nFinally, you can also contact the following persons,\nwho are experienced speakers, are familiar with the\nmaterial, and are available to deliver these workshops\nat your conference or for your company:\n\n- jerome dot petazzoni at gmail dot com\n- bret at bretfisher dot com\n\n(If you are willing and able to deliver such workshops,\nfeel free to submit a PR to add your name to that list!)\n\n**Thank you!**\n\n","funding_links":[],"categories":["Shell","Workshop training","Python","kubernetes","docker","swarm","Uncategorized","Books / Training"],"sub_categories":["Uncategorized","Containers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetazzo%2Fcontainer.training","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpetazzo%2Fcontainer.training","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpetazzo%2Fcontainer.training/lists"}