-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quick Hit Lab for CMX (initial skeleton) (#314)
TL;DR ----- Sketches out an initial skeleton for a fast CMX lab Details ------- Creates the track structure and first challenge for a quick lab on CMX to use at Kubecon. This PR just gets those files in place to simplify working with the lab setup as the lab gets full developed.
- Loading branch information
Showing
9 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
instruqt/trying-out-cmx/01-create-a-test-cluster/assignment.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
slug: create-a-test-cluster | ||
id: znzkrjto96nr | ||
type: challenge | ||
title: Create a Test Cluster | ||
teaser: A short description of the challenge. | ||
notes: | ||
- type: text | ||
contents: Replace this text with your own text | ||
tabs: | ||
- title: Vendor Portal | ||
type: website | ||
url: https://vendor.replicated.com/compatibility-matrix/clusters | ||
new_window: true | ||
difficulty: basic | ||
timelimit: 300 | ||
--- | ||
|
||
|
||
👋 Introducing the Comptibility Matrix | ||
====================================== | ||
|
||
The Replicated Compatibility Matrix is a service for quickly and easily | ||
spinning up ephemeral clusters for testing your application. You can manage | ||
your clusters using the Replicated Vendor Portal. We also provide a command-line | ||
interface and a series of GitHub actions to facilitate Continuous Delivery. | ||
|
||
Clusters Available | ||
================== | ||
|
||
Let's use the Replicated Vendor Portal to understand the types of clusters | ||
you can create for you testing. Click the "Vendor Portal" tab and log in with | ||
the following credentials | ||
|
||
Username: `[[ Instruqt-Var key="USERNAME" hostname="shell" ]]`<br/> | ||
Password: `[[ Instruqt-Var key="PASSWORD" hostname="shell" ]]` | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
instruqt/trying-out-cmx/01-create-a-test-cluster/check-shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
11 changes: 11 additions & 0 deletions
11
instruqt/trying-out-cmx/01-create-a-test-cluster/cleanup-shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# | ||
# This script runs when the platform cleanup 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 cleanup script" | ||
|
||
exit 0 |
19 changes: 19 additions & 0 deletions
19
instruqt/trying-out-cmx/01-create-a-test-cluster/setup-shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
HOME_DIR=/home/replicant | ||
|
||
# Wait for Instruqt bootstrap to be complete | ||
while [ ! -f /opt/instruqt/bootstrap/host-bootstrap-completed ] | ||
do | ||
echo "Waiting for Instruqt to finish booting the VM" | ||
sleep 1 | ||
done | ||
|
||
# convenience library for Replicated lab lifecycle scripts | ||
source /etc/profile.d/header.sh | ||
|
||
agent variable set USERNAME $(get_username) | ||
agent variable set PASSWORD $(get_password) |
11 changes: 11 additions & 0 deletions
11
instruqt/trying-out-cmx/01-create-a-test-cluster/solve-shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: "3" | ||
containers: | ||
- name: shell | ||
image: gcr.io/kots-field-labs/shell:latest | ||
shell: tmux new-session -A -s shell su - replicant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
slug: trying-out-cmx | ||
id: 1gpba3eivmb4 | ||
title: Trying Out the Replicated Compability Matrix | ||
teaser: |- | ||
Learn how the Replicated Platform helps you prevent cluster compatibility | ||
issue before you release to your customers | ||
description: |2- | ||
What if you could automatically test your new releases on truly | ||
customer-representative environments—same cloud provider, same Kubernetes | ||
distribution and version, and even the same entitlements and configuration? | ||
With the [Compatibility Matrix](https://www.replicated.com/test-compatibility-in-customer-representative-environments), | ||
you can. | ||
icon: https://storage.googleapis.com/shared-lab-assets/icons/red/connect.png | ||
tags: | ||
- prod | ||
- builders-plan | ||
- compatibility-matrix | ||
- helm | ||
owner: replicated | ||
developers: | ||
- [email protected] | ||
lab_config: | ||
overlay: false | ||
width: 33 | ||
position: right | ||
checksum: "16262887100161909657" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/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 <<EOF >> "$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 '' | ||
|
||
# use our shared libary in setup scripts | ||
curl -s -o /etc/profile.d/header.sh https://raw.githubusercontent.com/replicatedhq/kots-field-labs/main/libs/header.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "Harbor", | ||
"slug": "harbor", | ||
"customer": "Omozan", | ||
"yaml_dir": "", | ||
"k8s_installer_yaml_path": "" | ||
} |