From 53d1a68765777e699a362159368fcea7a2e82eee Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Sat, 29 Sep 2018 20:15:38 -0500 Subject: [PATCH 1/3] Adapt autopilot for new deployment scripts --- slides/autopilot/autotest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slides/autopilot/autotest.py b/slides/autopilot/autotest.py index 9a85ed1e..760de79c 100755 --- a/slides/autopilot/autotest.py +++ b/slides/autopilot/autotest.py @@ -223,7 +223,7 @@ def check_exit_status(): def setup_tmux_and_ssh(): if subprocess.call(["tmux", "has-session"]): logging.error("Couldn't connect to tmux. Please setup tmux first.") - ipaddr = open("../../prepare-vms/ips.txt").read().split("\n")[0] + ipaddr = "$IPADDR" uid = os.getuid() raise Exception(""" From b6dd55b21c19601459e87dcd6cd17f39fbebc6cd Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Sat, 29 Sep 2018 20:16:35 -0500 Subject: [PATCH 2/3] Use loop4 instead of loop0 --- k8s/portworx.yaml | 6 +++--- slides/k8s/portworx.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/k8s/portworx.yaml b/k8s/portworx.yaml index 222a9a00..e968b5fe 100644 --- a/k8s/portworx.yaml +++ b/k8s/portworx.yaml @@ -1,4 +1,4 @@ -# SOURCE: https://install.portworx.com/?kbver=1.11.2&b=true&s=/dev/loop0&c=px-workshop&stork=true&lh=true +# SOURCE: https://install.portworx.com/?kbver=1.11.2&b=true&s=/dev/loop4&c=px-workshop&stork=true&lh=true apiVersion: v1 kind: ConfigMap metadata: @@ -372,7 +372,7 @@ metadata: name: portworx namespace: kube-system annotations: - portworx.com/install-source: "https://install.portworx.com/?kbver=1.11.2&b=true&s=/dev/loop0&c=px-workshop&stork=true&lh=true" + portworx.com/install-source: "https://install.portworx.com/?kbver=1.11.2&b=true&s=/dev/loop4&c=px-workshop&stork=true&lh=true" spec: minReadySeconds: 0 updateStrategy: @@ -402,7 +402,7 @@ spec: image: portworx/oci-monitor:1.4.2.2 imagePullPolicy: Always args: - ["-c", "px-workshop", "-s", "/dev/loop0", "-b", + ["-c", "px-workshop", "-s", "/dev/loop4", "-b", "-x", "kubernetes"] env: - name: "PX_TEMPLATE_VERSION" diff --git a/slides/k8s/portworx.md b/slides/k8s/portworx.md index f959416f..dfdb7b86 100644 --- a/slides/k8s/portworx.md +++ b/slides/k8s/portworx.md @@ -128,7 +128,7 @@ - Associate the file to a loop device on each node: ```bash - for N in $(seq 1 5); do ssh node$N sudo losetup /dev/loop0 /portworx.blk; done + for N in $(seq 1 5); do ssh node$N sudo losetup /dev/loop4 /portworx.blk; done ``` ] @@ -168,7 +168,7 @@ way is to use https://install.portworx.com/. FYI, this is how we obtained the YAML file used earlier: ``` KBVER=$(kubectl version -o json | jq -r .serverVersion.gitVersion) -BLKDEV=/dev/loop0 +BLKDEV=/dev/loop4 curl https://install.portworx.com/1.4/?kbver=$KBVER&b=true&s=$BLKDEV&c=px-workshop&stork=true&lh=true ``` If you want to use an external key/value store, add one of the following: From e4251cfa8fa3c7e505c7bba9e5522b07140413a7 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Sat, 29 Sep 2018 20:39:32 -0500 Subject: [PATCH 3/3] Clean up network policies We should tell people to clean up network policies at the end of the chapter, otherwise further exercises will fail. --- slides/k8s/netpol.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/slides/k8s/netpol.md b/slides/k8s/netpol.md index 54c8f0a8..2bae8155 100644 --- a/slides/k8s/netpol.md +++ b/slides/k8s/netpol.md @@ -371,6 +371,23 @@ troubleshoot easily, without having to poke holes in our firewall. --- +## Cleaning up our network policies + +- The network policies that we have installed block all traffic to the default namespace + +- We should remove them, otherwise further exercises will fail! + +.exercise[ + +- Remove all network policies: + ```bash + kubectl delete networkpolicies --all + ``` + +] + +--- + ## Protecting the control plane - Should we add network policies to block unauthorized access to the control plane?