diff --git a/instruqt/support-customer-configs/01-create-preflight-check/assignment.md b/instruqt/support-customer-configs/01-create-preflight-check/assignment.md new file mode 100644 index 000000000..166add4a0 --- /dev/null +++ b/instruqt/support-customer-configs/01-create-preflight-check/assignment.md @@ -0,0 +1,19 @@ +--- +slug: 01-create-preflight-check +id: +type: challenge +title: Create preflight check +teaser: Enter teaser here +notes: +- type: text + contents: Enter notes here +tabs: +- title: Shell + type: terminal + hostname: shell +difficulty: basic +timelimit: 600 +--- +Introduction +=============== +Enter challenge here... \ No newline at end of file diff --git a/instruqt/support-customer-configs/01-create-preflight-check/check-shell b/instruqt/support-customer-configs/01-create-preflight-check/check-shell new file mode 100644 index 000000000..43f81184f --- /dev/null +++ b/instruqt/support-customer-configs/01-create-preflight-check/check-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform check the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the check script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/01-create-preflight-check/cleanup-shell b/instruqt/support-customer-configs/01-create-preflight-check/cleanup-shell new file mode 100644 index 000000000..443324ac4 --- /dev/null +++ b/instruqt/support-customer-configs/01-create-preflight-check/cleanup-shell @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# This set line ensures that all failures will cause the script to error and exit +set -euxo pipefail + +# clear the tmux pane and scrollback to look like a fresh shell +tmux clear-history -t shell +tmux send-keys -t shell clear ENTER + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/01-create-preflight-check/setup-shell b/instruqt/support-customer-configs/01-create-preflight-check/setup-shell new file mode 100644 index 000000000..d06b2b5ca --- /dev/null +++ b/instruqt/support-customer-configs/01-create-preflight-check/setup-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform setup the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the setup script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/01-create-preflight-check/solve-shell b/instruqt/support-customer-configs/01-create-preflight-check/solve-shell new file mode 100644 index 000000000..b76916088 --- /dev/null +++ b/instruqt/support-customer-configs/01-create-preflight-check/solve-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform solve the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the solve script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/02-customize-support-bundle/assignment.md b/instruqt/support-customer-configs/02-customize-support-bundle/assignment.md new file mode 100644 index 000000000..ae58d36fa --- /dev/null +++ b/instruqt/support-customer-configs/02-customize-support-bundle/assignment.md @@ -0,0 +1,19 @@ +--- +slug: customize-support-bundle +id: +type: challenge +title: Customize support bundle +teaser: Enter teaser here +notes: +- type: text + contents: Enter notes here +tabs: +- title: Shell + type: terminal + hostname: shell +difficulty: basic +timelimit: 600 +--- +Introduction +=============== +Enter challenge here... \ No newline at end of file diff --git a/instruqt/support-customer-configs/02-customize-support-bundle/check-shell b/instruqt/support-customer-configs/02-customize-support-bundle/check-shell new file mode 100644 index 000000000..43f81184f --- /dev/null +++ b/instruqt/support-customer-configs/02-customize-support-bundle/check-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform check the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the check script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/02-customize-support-bundle/cleanup-shell b/instruqt/support-customer-configs/02-customize-support-bundle/cleanup-shell new file mode 100644 index 000000000..443324ac4 --- /dev/null +++ b/instruqt/support-customer-configs/02-customize-support-bundle/cleanup-shell @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# This set line ensures that all failures will cause the script to error and exit +set -euxo pipefail + +# clear the tmux pane and scrollback to look like a fresh shell +tmux clear-history -t shell +tmux send-keys -t shell clear ENTER + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/02-customize-support-bundle/setup-shell b/instruqt/support-customer-configs/02-customize-support-bundle/setup-shell new file mode 100644 index 000000000..d06b2b5ca --- /dev/null +++ b/instruqt/support-customer-configs/02-customize-support-bundle/setup-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform setup the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the setup script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/02-customize-support-bundle/solve-shell b/instruqt/support-customer-configs/02-customize-support-bundle/solve-shell new file mode 100644 index 000000000..b76916088 --- /dev/null +++ b/instruqt/support-customer-configs/02-customize-support-bundle/solve-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform solve the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the solve script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/03-repackage-helm-chart/assignment.md b/instruqt/support-customer-configs/03-repackage-helm-chart/assignment.md new file mode 100644 index 000000000..42fac018f --- /dev/null +++ b/instruqt/support-customer-configs/03-repackage-helm-chart/assignment.md @@ -0,0 +1,19 @@ +--- +slug: repackage-helm-chart +id: +type: challenge +title: Repackage Helm chart +teaser: Enter teaser here +notes: +- type: text + contents: Enter notes here +tabs: +- title: Shell + type: terminal + hostname: shell +difficulty: basic +timelimit: 600 +--- +Introduction +=============== +Enter challenge here... \ No newline at end of file diff --git a/instruqt/support-customer-configs/03-repackage-helm-chart/check-shell b/instruqt/support-customer-configs/03-repackage-helm-chart/check-shell new file mode 100644 index 000000000..43f81184f --- /dev/null +++ b/instruqt/support-customer-configs/03-repackage-helm-chart/check-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform check the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the check script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/03-repackage-helm-chart/cleanup-shell b/instruqt/support-customer-configs/03-repackage-helm-chart/cleanup-shell new file mode 100644 index 000000000..443324ac4 --- /dev/null +++ b/instruqt/support-customer-configs/03-repackage-helm-chart/cleanup-shell @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# This set line ensures that all failures will cause the script to error and exit +set -euxo pipefail + +# clear the tmux pane and scrollback to look like a fresh shell +tmux clear-history -t shell +tmux send-keys -t shell clear ENTER + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/03-repackage-helm-chart/setup-shell b/instruqt/support-customer-configs/03-repackage-helm-chart/setup-shell new file mode 100644 index 000000000..d06b2b5ca --- /dev/null +++ b/instruqt/support-customer-configs/03-repackage-helm-chart/setup-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform setup the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the setup script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/03-repackage-helm-chart/solve-shell b/instruqt/support-customer-configs/03-repackage-helm-chart/solve-shell new file mode 100644 index 000000000..b76916088 --- /dev/null +++ b/instruqt/support-customer-configs/03-repackage-helm-chart/solve-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform solve the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the solve script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/04-run-preflight-check/assignment.md b/instruqt/support-customer-configs/04-run-preflight-check/assignment.md new file mode 100644 index 000000000..bde2dd599 --- /dev/null +++ b/instruqt/support-customer-configs/04-run-preflight-check/assignment.md @@ -0,0 +1,19 @@ +--- +slug: run-preflight-check +id: +type: challenge +title: Run preflight check +teaser: Enter teaser here +notes: +- type: text + contents: Enter notes here +tabs: +- title: Shell + type: terminal + hostname: shell +difficulty: basic +timelimit: 600 +--- +Introduction +=============== +Enter challenge here... \ No newline at end of file diff --git a/instruqt/support-customer-configs/04-run-preflight-check/check-shell b/instruqt/support-customer-configs/04-run-preflight-check/check-shell new file mode 100644 index 000000000..43f81184f --- /dev/null +++ b/instruqt/support-customer-configs/04-run-preflight-check/check-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform check the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the check script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/04-run-preflight-check/cleanup-shell b/instruqt/support-customer-configs/04-run-preflight-check/cleanup-shell new file mode 100644 index 000000000..443324ac4 --- /dev/null +++ b/instruqt/support-customer-configs/04-run-preflight-check/cleanup-shell @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# This set line ensures that all failures will cause the script to error and exit +set -euxo pipefail + +# clear the tmux pane and scrollback to look like a fresh shell +tmux clear-history -t shell +tmux send-keys -t shell clear ENTER + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/04-run-preflight-check/setup-shell b/instruqt/support-customer-configs/04-run-preflight-check/setup-shell new file mode 100644 index 000000000..d06b2b5ca --- /dev/null +++ b/instruqt/support-customer-configs/04-run-preflight-check/setup-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform setup the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the setup script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/04-run-preflight-check/solve-shell b/instruqt/support-customer-configs/04-run-preflight-check/solve-shell new file mode 100644 index 000000000..b76916088 --- /dev/null +++ b/instruqt/support-customer-configs/04-run-preflight-check/solve-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform solve the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the solve script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/05-create-support-bundle/assignment.md b/instruqt/support-customer-configs/05-create-support-bundle/assignment.md new file mode 100644 index 000000000..795d24da2 --- /dev/null +++ b/instruqt/support-customer-configs/05-create-support-bundle/assignment.md @@ -0,0 +1,19 @@ +--- +slug: create-support-bundle +id: +type: challenge +title: Create support bundle +teaser: Enter teaser here +notes: +- type: text + contents: Enter notes here +tabs: +- title: Shell + type: terminal + hostname: shell +difficulty: basic +timelimit: 600 +--- +Introduction +=============== +Enter challenge here... \ No newline at end of file diff --git a/instruqt/support-customer-configs/05-create-support-bundle/check-shell b/instruqt/support-customer-configs/05-create-support-bundle/check-shell new file mode 100644 index 000000000..43f81184f --- /dev/null +++ b/instruqt/support-customer-configs/05-create-support-bundle/check-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform check the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the check script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/05-create-support-bundle/cleanup-shell b/instruqt/support-customer-configs/05-create-support-bundle/cleanup-shell new file mode 100644 index 000000000..443324ac4 --- /dev/null +++ b/instruqt/support-customer-configs/05-create-support-bundle/cleanup-shell @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# This set line ensures that all failures will cause the script to error and exit +set -euxo pipefail + +# clear the tmux pane and scrollback to look like a fresh shell +tmux clear-history -t shell +tmux send-keys -t shell clear ENTER + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/05-create-support-bundle/setup-shell b/instruqt/support-customer-configs/05-create-support-bundle/setup-shell new file mode 100644 index 000000000..d06b2b5ca --- /dev/null +++ b/instruqt/support-customer-configs/05-create-support-bundle/setup-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform setup the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the setup script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/05-create-support-bundle/solve-shell b/instruqt/support-customer-configs/05-create-support-bundle/solve-shell new file mode 100644 index 000000000..b76916088 --- /dev/null +++ b/instruqt/support-customer-configs/05-create-support-bundle/solve-shell @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This script runs when the platform solve the challenge. +# +# The platform determines if the script was successful using the exit code of this +# script. If the exit code is not 0, the script fails. +# + +echo "This is the solve script" + +exit 0 \ No newline at end of file diff --git a/instruqt/support-customer-configs/config.yml b/instruqt/support-customer-configs/config.yml new file mode 100644 index 000000000..83aae0c66 --- /dev/null +++ b/instruqt/support-customer-configs/config.yml @@ -0,0 +1,14 @@ +version: "3" +containers: +- name: shell + image: gcr.io/kots-field-labs/shell:instruqt-feature-tmux-template + shell: tmux new-session -A -s shell su - replicant +virtualmachines: +- name: cluster + image: instruqt/k3s-v1-27-1 + shell: /bin/bash + machine_type: n1-standard-1 + allow_external_ingress: + - http + - https + - high-ports \ No newline at end of file diff --git a/instruqt/support-customer-configs/track-scripts/setup-cluster b/instruqt/support-customer-configs/track-scripts/setup-cluster new file mode 100644 index 000000000..3c2847388 --- /dev/null +++ b/instruqt/support-customer-configs/track-scripts/setup-cluster @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# This set line ensures that all failures will cause the script to error and exit +set -euxo pipefail + +# simple SSH client setup so we can SSH to/from the shell + +cat <> "$HOME/.ssh/config" +Host * + StrictHostKeyChecking no + UserKnownHostsFile /dev/null + PubkeyAcceptedKeyTypes +ssh-rsa +EOF + +while ! ssh shell true; do + echo "Waiting for container SSH to be available..." + sleep 1 +done + +ssh shell "mkdir /home/replicant/.kube" + +while ! [[ -f /etc/rancher/k3s/k3s.yaml ]]; do + echo "Waiting for Rancher kubernetes configuration to be available..." + sleep 1 +done + +scp /etc/rancher/k3s/k3s.yaml shell:/home/replicant/.kube/config \ No newline at end of file diff --git a/instruqt/support-customer-configs/track-scripts/setup-shell b/instruqt/support-customer-configs/track-scripts/setup-shell new file mode 100644 index 000000000..8be9f2c94 --- /dev/null +++ b/instruqt/support-customer-configs/track-scripts/setup-shell @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# This set line ensures that all failures will cause the script to error and exit +set -euxo pipefail + +# simple SSH client setup so we can SSH to/from the shell + +cat <> "$HOME/.ssh/config" +Host * + StrictHostKeyChecking no + UserKnownHostsFile /dev/null +EOF + +# assure an RSA key for Dropbear +ssh-keygen -t rsa -f /etc/dropbear/dropbear_rsa_host_key -N '' + +# change the cluster URI +yq -i '.clusters[0].cluster.server = "https://cluster:6443"' /home/replicant/.kube/config +chown -R replicant /home/replicant/.kube \ No newline at end of file diff --git a/instruqt/support-customer-configs/track.yml b/instruqt/support-customer-configs/track.yml new file mode 100644 index 000000000..3e68a4319 --- /dev/null +++ b/instruqt/support-customer-configs/track.yml @@ -0,0 +1,21 @@ +slug: support-customer-configs +id: +title: Adapting Preflights and Support Bundles to Customer Configurations +teaser: |- + Enter teaser here +description: |- + Enter description here +icon: https://storage.googleapis.com/shared-lab-assets/icons/red/appslug.png +level: beginner +tags: +- builders-plan +- sdk +- helm +owner: replicated +developers: +- jackee@replicated.com +lab_config: + overlay: false + width: 33 + position: right +checksum: "11216567145031576492" \ No newline at end of file diff --git a/instruqt/support-customer-configs/vendor/vendor.json b/instruqt/support-customer-configs/vendor/vendor.json new file mode 100644 index 000000000..86de17d94 --- /dev/null +++ b/instruqt/support-customer-configs/vendor/vendor.json @@ -0,0 +1,7 @@ +{ + "name": "Harbor", + "slug": "harbor", + "customer": "Omozan", + "yaml_dir": "", + "k8s_installer_yaml_path": "" +} \ No newline at end of file