diff --git a/prepare-vms/lib/ips-txt-to-html.py b/prepare-vms/lib/ips-txt-to-html.py index fd576afc..5bc1873c 100755 --- a/prepare-vms/lib/ips-txt-to-html.py +++ b/prepare-vms/lib/ips-txt-to-html.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys import yaml diff --git a/prepare-vms/settings/admin-dmuc.yaml b/prepare-vms/settings/admin-dmuc.yaml index 70ac6ec6..a7d776a8 100644 --- a/prepare-vms/settings/admin-dmuc.yaml +++ b/prepare-vms/settings/admin-dmuc.yaml @@ -5,7 +5,7 @@ clustersize: 1 clusterprefix: dmuc # Jinja2 template to use to generate ready-to-cut cards -cards_template: admin.html +cards_template: cards.html # Use "Letter" in the US, and "A4" everywhere else paper_size: A4 diff --git a/prepare-vms/settings/admin-kubenet.yaml b/prepare-vms/settings/admin-kubenet.yaml index 8256fc65..52046831 100644 --- a/prepare-vms/settings/admin-kubenet.yaml +++ b/prepare-vms/settings/admin-kubenet.yaml @@ -5,7 +5,7 @@ clustersize: 3 clusterprefix: kubenet # Jinja2 template to use to generate ready-to-cut cards -cards_template: admin.html +cards_template: cards.html # Use "Letter" in the US, and "A4" everywhere else paper_size: A4 diff --git a/prepare-vms/settings/admin-kuberouter.yaml b/prepare-vms/settings/admin-kuberouter.yaml index 3f903065..f894c5f4 100644 --- a/prepare-vms/settings/admin-kuberouter.yaml +++ b/prepare-vms/settings/admin-kuberouter.yaml @@ -5,7 +5,7 @@ clustersize: 3 clusterprefix: kuberouter # Jinja2 template to use to generate ready-to-cut cards -cards_template: admin.html +cards_template: cards.html # Use "Letter" in the US, and "A4" everywhere else paper_size: A4 diff --git a/prepare-vms/settings/admin-test.yaml b/prepare-vms/settings/admin-test.yaml index ac9679be..57d1339b 100644 --- a/prepare-vms/settings/admin-test.yaml +++ b/prepare-vms/settings/admin-test.yaml @@ -5,7 +5,7 @@ clustersize: 3 clusterprefix: test # Jinja2 template to use to generate ready-to-cut cards -cards_template: admin.html +cards_template: cards.html # Use "Letter" in the US, and "A4" everywhere else paper_size: A4 diff --git a/prepare-vms/settings/enix.yaml b/prepare-vms/settings/enix.yaml deleted file mode 100644 index 075efb34..00000000 --- a/prepare-vms/settings/enix.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Number of VMs per cluster -clustersize: 1 - -# The hostname of each node will be clusterprefix + a number -clusterprefix: node - -# Jinja2 template to use to generate ready-to-cut cards -cards_template: enix.html - -# Use "Letter" in the US, and "A4" everywhere else -paper_size: A4 - -# 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.1 -machine_version: 0.14.0 - -# Password used to connect with the "docker user" -docker_user_password: training - diff --git a/prepare-vms/settings/jerome.yaml b/prepare-vms/settings/jerome.yaml index 62e8a08f..78014b55 100644 --- a/prepare-vms/settings/jerome.yaml +++ b/prepare-vms/settings/jerome.yaml @@ -5,7 +5,7 @@ clustersize: 4 clusterprefix: node # Jinja2 template to use to generate ready-to-cut cards -cards_template: jerome.html +cards_template: cards.html # Use "Letter" in the US, and "A4" everywhere else paper_size: Letter diff --git a/prepare-vms/settings/kube101.yaml b/prepare-vms/settings/kube101.yaml index 8f742e54..4f89305c 100644 --- a/prepare-vms/settings/kube101.yaml +++ b/prepare-vms/settings/kube101.yaml @@ -7,7 +7,7 @@ clustersize: 3 clusterprefix: node # Jinja2 template to use to generate ready-to-cut cards -cards_template: kube101.html +cards_template: cards.html # Use "Letter" in the US, and "A4" everywhere else paper_size: Letter diff --git a/prepare-vms/setup-admin-clusters.sh b/prepare-vms/setup-admin-clusters.sh index b93f0da3..a4719d7a 100755 --- a/prepare-vms/setup-admin-clusters.sh +++ b/prepare-vms/setup-admin-clusters.sh @@ -1,15 +1,20 @@ #!/bin/sh set -e -INFRA=infra/aws-eu-west-3 +export AWS_INSTANCE_TYPE=t3a.small + +INFRA=infra/aws-us-west-2 STUDENTS=2 -TAG=admin-dmuc +PREFIX=$(date +%Y-%m-%d-%H-%M) + +SETTINGS=admin-dmuc +TAG=$PREFIX-$SETTINGS ./workshopctl start \ --tag $TAG \ --infra $INFRA \ - --settings settings/$TAG.yaml \ + --settings settings/$SETTINGS.yaml \ --count $STUDENTS ./workshopctl deploy $TAG @@ -17,11 +22,12 @@ TAG=admin-dmuc ./workshopctl kubebins $TAG ./workshopctl cards $TAG -TAG=admin-kubenet +SETTINGS=admin-kubenet +TAG=$PREFIX-$SETTINGS ./workshopctl start \ --tag $TAG \ --infra $INFRA \ - --settings settings/$TAG.yaml \ + --settings settings/$SETTINGS.yaml \ --count $((3*$STUDENTS)) ./workshopctl deploy $TAG @@ -29,11 +35,12 @@ TAG=admin-kubenet ./workshopctl disableaddrchecks $TAG ./workshopctl cards $TAG -TAG=admin-kuberouter +SETTINGS=admin-kuberouter +TAG=$PREFIX-$SETTINGS ./workshopctl start \ --tag $TAG \ --infra $INFRA \ - --settings settings/$TAG.yaml \ + --settings settings/$SETTINGS.yaml \ --count $((3*$STUDENTS)) ./workshopctl deploy $TAG @@ -41,11 +48,12 @@ TAG=admin-kuberouter ./workshopctl disableaddrchecks $TAG ./workshopctl cards $TAG -TAG=admin-test +SETTINGS=admin-test +TAG=$PREFIX-$SETTINGS ./workshopctl start \ --tag $TAG \ --infra $INFRA \ - --settings settings/$TAG.yaml \ + --settings settings/$SETTINGS.yaml \ --count $((3*$STUDENTS)) ./workshopctl deploy $TAG diff --git a/prepare-vms/templates/admin.html b/prepare-vms/templates/admin.html deleted file mode 100644 index 9684a55c..00000000 --- a/prepare-vms/templates/admin.html +++ /dev/null @@ -1,124 +0,0 @@ -{# Feel free to customize or override anything in there! #} -{%- set url = "http://FIXME.container.training" -%} -{%- set pagesize = 9 -%} -{%- if clustersize == 1 -%} - {%- set workshop_name = "Docker workshop" -%} - {%- set cluster_or_machine = "machine virtuelle" -%} - {%- set this_or_each = "cette" -%} - {%- set plural = "" -%} - {%- set image_src = "https://s3-us-west-2.amazonaws.com/www.breadware.com/integrations/docker.png" -%} -{%- else -%} - {%- set workshop_name = "Kubernetes workshop" -%} - {%- set cluster_or_machine = "cluster" -%} - {%- set this_or_each = "chaque" -%} - {%- set plural = "s" -%} - {%- set image_src_swarm = "https://cdn.wp.nginx.com/wp-content/uploads/2016/07/docker-swarm-hero2.png" -%} - {%- set image_src_kube = "https://avatars1.githubusercontent.com/u/13629408" -%} - {%- set image_src = image_src_kube -%} -{%- endif -%} - - - - -{% for cluster in clusters %} - {% if loop.index0>0 and loop.index0%pagesize==0 %} - - {% endif %} -
- -

- Voici les informations permettant de se connecter à un - des environnements utilisés pour cette formation. - Vous pouvez vous connecter à {{ this_or_each }} machine - virtuelle avec n'importe quel client SSH. -

- -

- - - - - - - - -
cluster:
{{ clusterprefix }}
identifiant:
docker
mot de passe:
{{ docker_user_password }}
-

- -

- Adresse{{ plural }} IP : - - - {% for node in cluster %} - - {% endfor %} -
{{ clusterprefix }}{{ loop.index }}:{{ node }}
-

-

Le support de formation est à l'adresse suivante : -

{{ url }}
-

-
-{% endfor %} - - diff --git a/prepare-vms/templates/cards.html b/prepare-vms/templates/cards.html index dc977b65..1f58b8f6 100644 --- a/prepare-vms/templates/cards.html +++ b/prepare-vms/templates/cards.html @@ -1,29 +1,88 @@ {# Feel free to customize or override anything in there! #} -{%- set url = "http://container.training/" -%} -{%- set pagesize = 12 -%} -{%- if clustersize == 1 -%} - {%- set workshop_name = "Docker workshop" -%} - {%- set cluster_or_machine = "machine" -%} - {%- set this_or_each = "this" -%} - {%- set machine_is_or_machines_are = "machine is" -%} - {%- set image_src = "https://s3-us-west-2.amazonaws.com/www.breadware.com/integrations/docker.png" -%} -{%- else -%} - {%- set workshop_name = "orchestration workshop" -%} - {%- set cluster_or_machine = "cluster" -%} - {%- set this_or_each = "each" -%} - {%- set machine_is_or_machines_are = "machines are" -%} - {%- set image_src_swarm = "https://cdn.wp.nginx.com/wp-content/uploads/2016/07/docker-swarm-hero2.png" -%} - {%- set image_src_kube = "https://avatars1.githubusercontent.com/u/13629408" -%} - {%- set image_src = image_src_swarm -%} + +{%- set url = "http://FIXME.container.training/" -%} +{%- set pagesize = 9 -%} +{%- set lang = "en" -%} +{%- set event = "training session" -%} +{%- set backside = False -%} +{%- set image = "kube" -%} +{%- set clusternumber = 100 -%} + +{%- set image_src = { + "docker": "https://s3-us-west-2.amazonaws.com/www.breadware.com/integrations/docker.png", + "swarm": "https://cdn.wp.nginx.com/wp-content/uploads/2016/07/docker-swarm-hero2.png", + "kube": "https://avatars1.githubusercontent.com/u/13629408", + "enix": "https://enix.io/static/img/logos/logo-domain-cropped.png", + }[image] -%} +{%- if lang == "en" and clustersize == 1 -%} + {%- set intro -%} + Here is the connection information to your very own + machine for this {{ event }}. + You can connect to this VM with any SSH client. + {%- endset -%} + {%- set listhead -%} + Your machine is: + {%- endset -%} +{%- endif -%} +{%- if lang == "en" and clustersize != 1 -%} + {%- set intro -%} + Here is the connection information to your very own + cluster for this {{ event }}. + You can connect to each VM with any SSH client. + {%- endset -%} + {%- set listhead -%} + Your machines are: + {%- endset -%} +{%- endif -%} +{%- if lang == "fr" and clustersize == 1 -%} + {%- set intro -%} + Voici les informations permettant de se connecter à votre + machine pour cette formation. + Vous pouvez vous connecter à cette machine virtuelle + avec n'importe quel client SSH. + {%- endset -%} + {%- set listhead -%} + Adresse IP: + {%- endset -%} +{%- endif -%} +{%- if lang == "en" and clusterprefix != "node" -%} + {%- set intro -%} + Here is the connection information for the + {{ clusterprefix }} environment. + {%- endset -%} +{%- endif -%} +{%- if lang == "fr" and clustersize != 1 -%} + {%- set intro -%} + Voici les informations permettant de se connecter à votre + cluster pour cette formation. + Vous pouvez vous connecter à chaque machine virtuelle + avec n'importe quel client SSH. + {%- endset -%} + {%- set listhead -%} + Adresses IP: + {%- endset -%} +{%- endif -%} +{%- if lang == "en" -%} + {%- set slides_are_at -%} + You can find the slides at: + {%- endset -%} +{%- endif -%} +{%- if lang == "fr" -%} + {%- set slides_are_at -%} + Le support de formation est à l'adresse suivante : + {%- endset -%} {%- endif -%} {% for cluster in clusters %} - {% if loop.index0>0 and loop.index0%pagesize==0 %} - - {% endif %}
- -

- Here is the connection information to your very own - {{ cluster_or_machine }} for this {{ workshop_name }}. - You can connect to {{ this_or_each }} VM with any SSH client. -

+

{{ intro }}

+ {% if clusternumber != None %} + + + {% endif %} @@ -90,17 +175,44 @@ img {

- Your {{ machine_is_or_machines_are }}: + {{ listhead }}

cluster:
{{ clusternumber + loop.index }}
login:
docker
password:
{% for node in cluster %} - + + + + {% endfor %}
node{{ loop.index }}:{{ node }}
{{ clusterprefix }}{{ loop.index }}:{{ node }}

-

You can find the slides at: + +

+ {{ slides_are_at }}

{{ url }}

+ {% if loop.index%pagesize==0 or loop.last %} + + {% if backside %} + {% for x in range(pagesize) %} +
+
+

You got this at the workshop + "Getting Started With Kubernetes and Container Orchestration" + during QCON London (March 2019).

+

If you liked that workshop, + I can train your team or organization + on Docker, container, and Kubernetes, + with curriculums of 1 to 5 days. +

+

Interested? Contact me at:

+

jerome.petazzoni@gmail.com

+

Thank you!

+
+ {% endfor %} + + {% endif %} + {% endif %} {% endfor %} diff --git a/prepare-vms/templates/enix.html b/prepare-vms/templates/enix.html deleted file mode 100644 index e84c0d7c..00000000 --- a/prepare-vms/templates/enix.html +++ /dev/null @@ -1,121 +0,0 @@ -{# Feel free to customize or override anything in there! #} -{%- set url = "http://FIXME.container.training" -%} -{%- set pagesize = 9 -%} -{%- if clustersize == 1 -%} - {%- set workshop_name = "Docker workshop" -%} - {%- set cluster_or_machine = "machine virtuelle" -%} - {%- set this_or_each = "cette" -%} - {%- set plural = "" -%} - {%- set image_src = "https://s3-us-west-2.amazonaws.com/www.breadware.com/integrations/docker.png" -%} -{%- else -%} - {%- set workshop_name = "Kubernetes workshop" -%} - {%- set cluster_or_machine = "cluster" -%} - {%- set this_or_each = "chaque" -%} - {%- set plural = "s" -%} - {%- set image_src_swarm = "https://cdn.wp.nginx.com/wp-content/uploads/2016/07/docker-swarm-hero2.png" -%} - {%- set image_src_kube = "https://avatars1.githubusercontent.com/u/13629408" -%} - {%- set image_src = image_src_kube -%} -{%- endif -%} - - - - -{% for cluster in clusters %} - {% if loop.index0>0 and loop.index0%pagesize==0 %} - - {% endif %} -
- -

- Voici les informations permettant de se connecter à votre - {{ cluster_or_machine }} pour cette formation. - Vous pouvez vous connecter à {{ this_or_each }} machine virtuelle - avec n'importe quel client SSH. -

-

- - - - - - -
identifiant:
docker
mot de passe:
{{ docker_user_password }}
- -

-

- Adresse{{ plural }} IP : - - - {% for node in cluster %} - - {% endfor %} -
node{{ loop.index }}:{{ node }}
-

-

Le support de formation est à l'adresse suivante : -

{{ url }}
-

-
-{% endfor %} - - diff --git a/prepare-vms/templates/jerome.html b/prepare-vms/templates/jerome.html deleted file mode 100644 index 9f0263b8..00000000 --- a/prepare-vms/templates/jerome.html +++ /dev/null @@ -1,134 +0,0 @@ -{# Feel free to customize or override anything in there! #} -{%- set url = "http://qconuk2019.container.training/" -%} -{%- set pagesize = 9 -%} -{%- if clustersize == 1 -%} - {%- set workshop_name = "Docker workshop" -%} - {%- set cluster_or_machine = "machine" -%} - {%- set this_or_each = "this" -%} - {%- set machine_is_or_machines_are = "machine is" -%} - {%- set image_src = "https://s3-us-west-2.amazonaws.com/www.breadware.com/integrations/docker.png" -%} -{%- else -%} - {%- set workshop_name = "Kubernetes workshop" -%} - {%- set cluster_or_machine = "cluster" -%} - {%- set this_or_each = "each" -%} - {%- set machine_is_or_machines_are = "machines are" -%} - {%- set image_src_swarm = "https://cdn.wp.nginx.com/wp-content/uploads/2016/07/docker-swarm-hero2.png" -%} - {%- set image_src_kube = "https://avatars1.githubusercontent.com/u/13629408" -%} - {%- set image_src = image_src_kube -%} -{%- endif -%} - - - - -{% for cluster in clusters %} -
- -

- Here is the connection information to your very own - {{ cluster_or_machine }} for this {{ workshop_name }}. - You can connect to {{ this_or_each }} VM with any SSH client. -

-

- - - - - - -
login:
docker
password:
{{ docker_user_password }}
- -

-

- Your {{ machine_is_or_machines_are }}: - - {% for node in cluster %} - - {% endfor %} -
node{{ loop.index }}:{{ node }}
-

-

You can find the slides at: -

{{ url }}
-

-
- {% if loop.index%pagesize==0 or loop.last %} - - {% for x in range(pagesize) %} -
-
-

You got this at the workshop - "Getting Started With Kubernetes and Container Orchestration" - during QCON London (March 2019).

-

If you liked that workshop, - I can train your team or organization - on Docker, container, and Kubernetes, - with curriculums of 1 to 5 days. -

-

Interested? Contact me at:

-

jerome.petazzoni@gmail.com

-

Thank you!

-
- {% endfor %} - - {% endif %} -{% endfor %} - - diff --git a/prepare-vms/templates/kube101.html b/prepare-vms/templates/kube101.html deleted file mode 100644 index 1a937818..00000000 --- a/prepare-vms/templates/kube101.html +++ /dev/null @@ -1,106 +0,0 @@ -{# Feel free to customize or override anything in there! #} -{%- set url = "http://container.training/" -%} -{%- set pagesize = 12 -%} -{%- if clustersize == 1 -%} - {%- set workshop_name = "Docker workshop" -%} - {%- set cluster_or_machine = "machine" -%} - {%- set this_or_each = "this" -%} - {%- set machine_is_or_machines_are = "machine is" -%} - {%- set image_src = "https://s3-us-west-2.amazonaws.com/www.breadware.com/integrations/docker.png" -%} -{%- else -%} - {%- set workshop_name = "Kubernetes workshop" -%} - {%- set cluster_or_machine = "cluster" -%} - {%- set this_or_each = "each" -%} - {%- set machine_is_or_machines_are = "machines are" -%} - {%- set image_src_swarm = "https://cdn.wp.nginx.com/wp-content/uploads/2016/07/docker-swarm-hero2.png" -%} - {%- set image_src_kube = "https://avatars1.githubusercontent.com/u/13629408" -%} - {%- set image_src = image_src_kube -%} -{%- endif -%} - - - - -{% for cluster in clusters %} - {% if loop.index0>0 and loop.index0%pagesize==0 %} - - {% endif %} -
- -

- Here is the connection information to your very own - {{ cluster_or_machine }} for this {{ workshop_name }}. - You can connect to {{ this_or_each }} VM with any SSH client. -

-

- - - - - - -
login:
docker
password:
{{ docker_user_password }}
- -

-

- Your {{ machine_is_or_machines_are }}: - - {% for node in cluster %} - - {% endfor %} -
node{{ loop.index }}:{{ node }}
-

-

You can find the slides at: -

{{ url }}
-

-
-{% endfor %} - -