From 2cb06edc2d721924f7cc8cc301701610278819ab Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Thu, 31 May 2018 14:13:55 -0500 Subject: [PATCH 1/2] Replace index.html with a generator The events are now listend in index.yaml, and generated with index.py. The latter is called automatically by build.sh. The list of events has been slightly improved: - we only show the last 5 past events - video recordings now get a section of their own --- .gitignore | 1 + slides/build.sh | 1 + slides/index.html | 248 ---------------------------------------- slides/index.py | 162 ++++++++++++++++++++++++++ slides/index.yaml | 172 ++++++++++++++++++++++++++++ slides/requirements.txt | 1 + 6 files changed, 337 insertions(+), 248 deletions(-) delete mode 100644 slides/index.html create mode 100755 slides/index.py create mode 100644 slides/index.yaml diff --git a/.gitignore b/.gitignore index 6bdc5ba7..a5280d4a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ prepare-vms/settings.yaml prepare-vms/tags slides/*.yml.html slides/autopilot/state.yaml +slides/index.html node_modules diff --git a/slides/build.sh b/slides/build.sh index 4b95c4c9..1261b281 100755 --- a/slides/build.sh +++ b/slides/build.sh @@ -1,6 +1,7 @@ #!/bin/sh case "$1" in once) + ./index.py for YAML in *.yml; do ./markmaker.py $YAML > $YAML.html || { rm $YAML.html diff --git a/slides/index.html b/slides/index.html deleted file mode 100644 index 09973c2d..00000000 --- a/slides/index.html +++ /dev/null @@ -1,248 +0,0 @@ - - - Container Training - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Container Training
Coming soon near you
June 12th, 2018: Velocity San Jose - Kubernetes 101 
June 27th, 2018: devopsdays Amsterdam - Kubernetes 101 
July 17th, 2018: OSCON - Kubernetes 101 
Oct 1st, 2018: Velocity New York - Kubernetes 101 
Past workshops
May 17th, 2018: Revolution Conf Virginia Beach - Docker 101
May 10th, 2018: NDC Minnesota - Kubernetes 101
May 8th, 2018: CRAFT Budapest - Swarm Orchestration
April 27th, 2018: GOTO Chicago - Swarm Orchestration
April 24th, 2018: GOTO Chicago - Kubernetes 101
April 11-12, 2018: Introduction aux conteneurs (in French)
April 13, 2018: Introduction à l'orchestration (in French)
April 6th, 2018: MuraCon Sacramento, CA - Docker 101
March 27, 2018: SREcon Americas — Kubernetes 101
March 27, 2018: Boosterconf: Kubernetes 101
February 22, 2018: IndexConf: Kubernetes 101
QCON SF: Orchestrating Microservices with Docker Swarm
QCON SF: Introduction to Docker and Containers
Deploying and scaling microservices with Docker and Kubernetes
LISA16 T1: Deploying and Scaling Applications with Docker Swarm
PyCon2016: Introduction to Docker and containers
Self-paced tutorials
Introduction to Docker and Containers
Container Orchestration with Docker and Swarm
Deploying and Scaling Microservices with Docker and Kubernetes
-
- - diff --git a/slides/index.py b/slides/index.py new file mode 100755 index 00000000..4f591846 --- /dev/null +++ b/slides/index.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python2 +# coding: utf-8 +TEMPLATE=""" + + Container Training + + + +
+ + + + + + + + {% for item in coming_soon %} + + + + + + {% endfor %} + + + + {% for item in past_workshops[:5] %} + + + + + + {% endfor %} + + {% if past_workshops[5:] %} + + + + {% endif %} + + + + {% for item in recorded_workshops %} + + + + + + + + + {% endfor %} + + + {% for item in self_paced %} + + + + + {% endfor %} + + + + + + +
Container Training
Coming soon near you
{{ item.prettydate }}: {{ item.title }} at {{ item.event }} in {{ item.city }}{% if item.slides %}{% endif %}
Past workshops
{{ item.prettydate }}: {{ item.title }} {% if item.event %}at {{ item.event }} {% endif %} {% if item.city %} in {{ item.city }} {% endif %}{% if item.video %}{% endif %}
... and at least {{ past_workshops[5:] | length }} more.
Recorded workshops
{{ item.title }}
Delivered {{ item.prettydate }} at {{ item.event }} in {{item.city }}.
Self-paced tutorials
{{ item.title }}
+
+ +""".decode("utf-8") + +import datetime +import jinja2 +import yaml + +items = yaml.load(open("index.yaml")) + +for item in items: + if "date" in item: + date = item["date"] + suffix = { + 1: "st", 2: "nd", 3: "rd", + 21: "st", 22: "nd", 23: "rd", + 31: "st"}.get(date.day, "th") + item["prettydate"] = date.strftime("%B %e{}, %Y").format(suffix) + +today = datetime.date.today() +coming_soon = [i for i in items if i.get("date") and i["date"] >= today] +coming_soon.sort(key=lambda i: i["date"]) +past_workshops = [i for i in items if i.get("date") and i["date"] < today] +past_workshops.sort(key=lambda i: i["date"], reverse=True) +self_paced = [i for i in items if not i.get("date")] +recorded_workshops = [i for i in items if i.get("video")] + +template = jinja2.Template(TEMPLATE) +with open("index.html", "w") as f: + f.write(template.render(coming_soon=coming_soon, past_workshops=past_workshops, self_paced=self_paced, recorded_workshops=recorded_workshops).encode("utf-8")) diff --git a/slides/index.yaml b/slides/index.yaml new file mode 100644 index 00000000..c029147e --- /dev/null +++ b/slides/index.yaml @@ -0,0 +1,172 @@ +- date: 2018-06-12 + city: San Jose, CA + country: us + event: Velocity + title: Kubernetes 101 + speaker: bridgetkromhout + attend: https://conferences.oreilly.com/velocity/vl-ca/public/schedule/detail/66286 + +- date: 2018-06-27 + city: Amsterdam + country: nl + event: devopsdays + title: Kubernetes 101 + speaker: bridgetkromhout + attend: https://www.devopsdays.org/events/2018-amsterdam/registration/ + +- date: 2018-07-17 + city: Portland, OR + country: us + event: OSCON + title: Kubernetes 101 + speaker: bridgetkromhout + attend: https://conferences.oreilly.com/oscon/oscon-or/public/schedule/detail/66287 + +- date: 2018-10-01 + city: New York, NY + country: us + event: Velocity + title: Kubernetes 101 + speaker: bridgetkromhout + attend: https://conferences.oreilly.com/velocity/vl-ny/public/schedule/detail/70102 + +- date: 2018-05-17 + city: Virginia Beach, FL + country: us + event: Revolution Conf + title: Docker 101 + speaker: bretfisher + slides: https://revconf18.bretfisher.com + +- date: 2018-05-10 + city: Saint Paul, MN + country: us + event: NDC Minnesota + title: Kubernetes 101 + slides: https://ndcminnesota2018.container.training + +- date: 2018-05-08 + city: Budapest + country: hu + event: CRAFT + title: Swarm Orchestration + slides: https://craftconf18.bretfisher.com + +- date: 2018-04-27 + city: Chicago, IL + country: us + event: GOTO + title: Swarm Orchestration + slides: https://gotochgo18.bretfisher.com + +- date: 2018-04-24 + city: Chicago, IL + country: us + event: GOTO + title: Kubernetes 101 + slides: http://gotochgo2018.container.training/ + +- date: 2018-04-11 + city: Paris + country: fr + title: Introduction aux conteneurs + lang: fr + slides: https://avril2018.container.training/intro.yml.html + +- date: 2018-04-13 + city: Paris + country: fr + lang: fr + title: Introduction à l'orchestration + slides: https://avril2018.container.training/kube.yml.html + +- date: 2018-04-06 + city: Sacramento, CA + country: us + event: MuraCon + title: Docker 101 + slides: https://muracon18.bretfisher.com + +- date: 2018-03-27 + city: Santa Clara, CA + country: us + event: SREcon Americas + title: Kubernetes 101 + slides: http://srecon2018.container.training/ + +- date: 2018-03-27 + city: Bergen + country: no + event: Boosterconf + title: Kubernetes 101 + slides: http://boosterconf2018.container.training/ + +- date: 2018-02-22 + city: San Francisco, CA + country: us + event: IndexConf + title: Kubernetes 101 + slides: http://indexconf2018.container.training/ + #attend: https://developer.ibm.com/indexconf/sessions/#!?id=5474 + +- date: 2017-11-17 + city: San Francisco, CA + country: us + event: QCON SF + title: Orchestrating Microservices with Docker Swarm + slides: http://qconsf2017swarm.container.training/ + +- date: 2017-11-16 + city: San Francisco, CA + country: us + event: QCON SF + title: Introduction to Docker and Containers + slides: http://qconsf2017intro.container.training/ + video: https://www.youtube.com/playlist?list=PLBAFXs0YjviLgqTum8MkspG_8VzGl6C07 + + +#LISA17 M7: Getting Started with Docker and Containers +#slides: http://lisa17m7.container.training/ +#LISA17 T9: Build, Ship, and Run Microservices on a Docker Swarm Cluster +#slides: http://lisa17t9.container.training/ + +- date: 2017-10-26 + city: Prague + country: cz + event: Open Source Summit Europe + title: Deploying and scaling microservices with Docker and Kubernetes + slides: http://osseu17.container.training/ + video: https://www.youtube.com/playlist?list=PLBAFXs0YjviLrsyydCzxWrIP_1-wkcSHS + + +#DockerCon Workshop: from Zero to Hero (full day, B3 M1-2) +#slides: http://dc17eu.container.training/ + +#DockerCon Workshop: Orchestration for Advanced Users (afternoon, B4 M5-6) +#slides: https://www.bretfisher.com/dockercon17eu/ + +- date: 2016-12-06 + city: Boston, MA + country: us + event: LISA + title: Deploying and Scaling Applications with Docker Swarm + slides: http://lisa16t1.container.training/ + video: https://www.youtube.com/playlist?list=PLBAFXs0YjviIDDhr8vIwCN1wkyNGXjbbc + +- date: 2016-05-29 + city: Portland, OR + country: us + event: PyCon + title: Introduction to Docker and containers + slides: https://us.pycon.org/2016/site_media/media/tutorial_handouts/DockerSlides.pdf + video: https://www.youtube.com/watch?v=ZVaRK10HBjo + +- title: Introduction to Docker and Containers + slides: intro-selfpaced.yml.html + +- title: Container Orchestration with Docker and Swarm + slides: swarm-selfpaced.yml.html + +- title: Deploying and Scaling Microservices with Docker and Kubernetes + slides: kube-selfpaced.yml.html + diff --git a/slides/requirements.txt b/slides/requirements.txt index e857b62a..84c55148 100644 --- a/slides/requirements.txt +++ b/slides/requirements.txt @@ -1,2 +1,3 @@ # This is for netlify PyYAML +jinja2 From c86ef7de45fc5533a5a974b063c35dfb83277fce Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Sun, 3 Jun 2018 09:55:43 -0500 Subject: [PATCH 2/2] Add 'past workshops' page and backfill 2016-2017 workshops --- .gitignore | 1 + slides/build.sh | 2 + slides/index.css | 59 ++++++++++++++++ slides/index.py | 167 +++++++++++++++++++-------------------------- slides/index.yaml | 169 +++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 292 insertions(+), 106 deletions(-) create mode 100644 slides/index.css diff --git a/.gitignore b/.gitignore index a5280d4a..3610b425 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ prepare-vms/tags slides/*.yml.html slides/autopilot/state.yaml slides/index.html +slides/past.html node_modules diff --git a/slides/build.sh b/slides/build.sh index 1261b281..ca08e19f 100755 --- a/slides/build.sh +++ b/slides/build.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e case "$1" in once) ./index.py @@ -16,6 +17,7 @@ once) ;; forever) + set +e # check if entr is installed if ! command -v entr >/dev/null; then echo >&2 "First install 'entr' with apt, brew, etc." diff --git a/slides/index.css b/slides/index.css new file mode 100644 index 00000000..c3905702 --- /dev/null +++ b/slides/index.css @@ -0,0 +1,59 @@ +body { + background-image: url("images/container-background.jpg"); + max-width: 1024px; + margin: 0 auto; +} +table { + font-size: 20px; + font-family: sans-serif; + background: white; + width: 100%; + height: 100%; + padding: 20px; +} +.header { + font-size: 300%; + font-weight: bold; +} +.title { + font-size: 150%; + font-weight: bold; +} +.details { + font-size: 80%; + font-style: italic; +} +td { + padding: 1px; + height: 1em; +} +td.spacer { + height: unset; +} +td.footer { + padding-top: 80px; + height: 100px; +} +td.title { + border-bottom: thick solid black; + padding-bottom: 2px; + padding-top: 20px; +} +a { + text-decoration: none; +} +a:hover { + background: yellow; +} +a.attend:after { + content: "📅 attend"; +} +a.slides:after { + content: "📚 slides"; +} +a.chat:after { + content: "💬 chat"; +} +a.video:after { + content: "📺 video"; +} diff --git a/slides/index.py b/slides/index.py index 4f591846..453827c1 100755 --- a/slides/index.py +++ b/slides/index.py @@ -2,135 +2,94 @@ # coding: utf-8 TEMPLATE=""" - Container Training - + {{ title }} + -
+
- + - - - + {% if coming_soon %} + {% for item in coming_soon %} - + - + {% endfor %} + {% endif %} - + {% if past_workshops %} + {% for item in past_workshops[:5] %} - + - + {% endfor %} {% if past_workshops[5:] %} - - - + + + {% endif %} - - - + {% endif %} + + {% if recorded_workshops %} + + {% for item in recorded_workshops %} - + - - + + - + {% endfor %} + {% endif %} - + {% if self_paced %} + {% for item in self_paced %} - + - + {% endfor %} + {% endif %} - + {% if all_past_workshops %} + + {% for item in all_past_workshops %} + + + + {% if item.video %} + + {% endif %} + + + + + {% endfor %} + {% endif %} - - - + + + + +
Container Training
{{ title }}
Coming soon near you
Coming soon near you
{{ item.prettydate }}: {{ item.title }} at {{ item.event }} in {{ item.city }} {% if item.slides %}{% endif %}
Past workshops
Past workshops
{{ item.prettydate }}: {{ item.title }} {% if item.event %}at {{ item.event }} {% endif %} {% if item.city %} in {{ item.city }} {% endif %} {% if item.video %}{% endif %}
... and at least {{ past_workshops[5:] | length }} more.
... and at least {{ past_workshops[5:] | length }} more.
Recorded workshops
Recorded workshops
{{ item.title }}
Delivered {{ item.prettydate }} at {{ item.event }} in {{item.city }}.
Self-paced tutorials
Self-paced tutorials
{{ item.title }}
Past workshops
{{ item.title }}
Delivered {{ item.prettydate }} at {{ item.event }} in {{item.city }}.
-
+
""".decode("utf-8") @@ -144,8 +103,8 @@ for item in items: if "date" in item: date = item["date"] suffix = { - 1: "st", 2: "nd", 3: "rd", - 21: "st", 22: "nd", 23: "rd", + 1: "st", 2: "nd", 3: "rd", + 21: "st", 22: "nd", 23: "rd", 31: "st"}.get(date.day, "th") item["prettydate"] = date.strftime("%B %e{}, %Y").format(suffix) @@ -159,4 +118,16 @@ recorded_workshops = [i for i in items if i.get("video")] template = jinja2.Template(TEMPLATE) with open("index.html", "w") as f: - f.write(template.render(coming_soon=coming_soon, past_workshops=past_workshops, self_paced=self_paced, recorded_workshops=recorded_workshops).encode("utf-8")) + f.write(template.render( + title="Container Training", + coming_soon=coming_soon, + past_workshops=past_workshops, + self_paced=self_paced, + recorded_workshops=recorded_workshops + ).encode("utf-8")) + +with open("past.html", "w") as f: + f.write(template.render( + title="Container Training", + all_past_workshops=past_workshops + ).encode("utf-8")) diff --git a/slides/index.yaml b/slides/index.yaml index c029147e..1dcde4ad 100644 --- a/slides/index.yaml +++ b/slides/index.yaml @@ -124,11 +124,19 @@ slides: http://qconsf2017intro.container.training/ video: https://www.youtube.com/playlist?list=PLBAFXs0YjviLgqTum8MkspG_8VzGl6C07 +- date: 2017-10-30 + city: San Franciso, CA + country: us + event: LISA + title: (M7) Getting Started with Docker and Containers + slides: http://lisa17m7.container.training/ -#LISA17 M7: Getting Started with Docker and Containers -#slides: http://lisa17m7.container.training/ -#LISA17 T9: Build, Ship, and Run Microservices on a Docker Swarm Cluster -#slides: http://lisa17t9.container.training/ +- date: 2017-10-31 + city: San Franciso, CA + country: us + event: LISA + title: (T9) Build, Ship, and Run Microservices on a Docker Swarm Cluster + slides: http://lisa17t9.container.training/ - date: 2017-10-26 city: Prague @@ -138,12 +146,69 @@ slides: http://osseu17.container.training/ video: https://www.youtube.com/playlist?list=PLBAFXs0YjviLrsyydCzxWrIP_1-wkcSHS +- date: 2017-10-16 + city: Copenhagen + country: dk + event: DockerCon + title: Swarm from Zero to Hero + slides: http://dc17eu.container.training/ -#DockerCon Workshop: from Zero to Hero (full day, B3 M1-2) -#slides: http://dc17eu.container.training/ +- date: 2017-10-16 + city: Copenhagen + country: dk + event: DockerCon + title: Orchestration for Advanced Users + slides: https://www.bretfisher.com/dockercon17eu -#DockerCon Workshop: Orchestration for Advanced Users (afternoon, B4 M5-6) -#slides: https://www.bretfisher.com/dockercon17eu/ +- date: 2017-07-25 + city: Minneapolis, MN + country: us + event: devopsdays + title: Deploying & Scaling microservices with Docker Swarm + video: https://www.youtube.com/watch?v=DABbqyJeG_E + +- date: 2017-06-12 + city: Berlin + country: de + event: DevOpsCon + title: Deploying and scaling containerized Microservices with Docker and Swarm + +- date: 2017-05-18 + city: Portland, OR + country: us + event: PyCon + title: Deploy and scale containers with Docker native, open source orchestration + video: https://www.youtube.com/watch?v=EuzoEaE6Cqs + +- date: 2017-05-08 + city: Austin, TX + country: us + event: OSCON + title: Deploying and scaling applications in containers with Docker + +- date: 2017-05-04 + city: Chicago, IL + country: us + event: GOTO + title: Container deployment, scaling, and orchestration with Docker Swarm + +- date: 2017-04-17 + city: Austin, TX + country: us + event: DockerCon + title: Orchestration Workshop + +- date: 2017-03-22 + city: San Jose, CA + country: us + event: Devoxx + title: Container deployment, scaling, and orchestration with Docker Swarm + +- date: 2017-03-03 + city: Pasadena, CA + country: us + event: SCALE + title: Container deployment, scaling, and orchestration with Docker Swarm - date: 2016-12-06 city: Boston, MA @@ -153,6 +218,30 @@ slides: http://lisa16t1.container.training/ video: https://www.youtube.com/playlist?list=PLBAFXs0YjviIDDhr8vIwCN1wkyNGXjbbc +- date: 2016-10-07 + city: Berlin + country: de + event: LinuxCon + title: Orchestrating Containers in Production at Scale with Docker Swarm + +- date: 2016-09-20 + city: New York, NY + country: us + event: Velocity + title: Deployment and orchestration at scale with Docker + +- date: 2016-08-25 + city: Toronto + country: ca + event: LinuxCon + title: Orchestrating Containers in Production at Scale with Docker Swarm + +- date: 2016-06-22 + city: Seattle, WA + country: us + event: DockerCon + title: Orchestration Workshop + - date: 2016-05-29 city: Portland, OR country: us @@ -161,6 +250,70 @@ slides: https://us.pycon.org/2016/site_media/media/tutorial_handouts/DockerSlides.pdf video: https://www.youtube.com/watch?v=ZVaRK10HBjo +- date: 2016-05-17 + city: Austin, TX + country: us + event: OSCON + title: Deployment and orchestration at scale with Docker Swarm + +- date: 2016-04-27 + city: Budapest + country: hu + event: CRAFT + title: Advanced Docker concepts and container orchestration + +- date: 2016-04-22 + city: Berlin + country: de + event: Neofonie + title: Orchestration Workshop + +- date: 2016-04-05 + city: Stockholm + country: se + event: Praqma + title: Orchestration Workshop + +- date: 2016-03-22 + city: Munich + country: de + event: Stylight + title: Orchestration Workshop + +- date: 2016-03-11 + city: London + country: uk + event: QCON + title: Containers in production with Docker Swarm + +- date: 2016-02-19 + city: Amsterdam + country: nl + event: Container Solutions + title: Orchestration Workshop + +- date: 2016-02-15 + city: Paris + country: fr + event: Zenika + title: Orchestration Workshop + +- date: 2016-01-22 + city: Pasadena, CA + country: us + event: SCALE + title: Advanced Docker concepts and container orchestration + +#- date: 2015-11-10 +# city: Washington DC +# country: us +# event: LISA +# title: Deploying and Scaling Applications with Docker Swarm + +#2015-09-24-strangeloop + + + - title: Introduction to Docker and Containers slides: intro-selfpaced.yml.html