Scenario-based learning (SBL) with Katacoda

Katacoda is a great solution for teams to learn and improve their skills by providing environments based on an interactive browser where they can do experiments without fear: they can break everything, it doesn’t matter.

For DevOps and Agile, Katacoda provides two great features:

  • scenario-based learning,
  • practice in playgrounds.

Multiple environments are supported and more environments can be built by yourself.

Examples of scenario-based learning

Linux OS & commands:

Git Version Control:

Docker & Containers:

Kubernetes:

Creating a Katacoda scenario

Katacoda scenarios are made up of files stored in git (Github, Gitlab or Bitbucket). The Katacoda Profile is linked to this repository. Each scenario is stored in a directory.

The project includes the following files:

  • index.json defines the settings for the scenario,
  • intro.md is the text displayed at the beginning,
  • finish.md is the text displayed at the end,
  • env-init.sh is executed in background when a user starts the scenario (courseData),
  • step<STEP>.md is the text displayed at each step of the scenario.

Example of an index.json file:

{
  "title": "My scenario",
  "description": "Learning with my scenario",
  "details": {
    "steps": [
      { "title": "Step 1", "text": "step1.md" },
      { "title": "Step 2", "text": "step2.md" },
      { "title": "Step 3", "text": "step3.md" }
    ],
    "intro": {
      "text": "intro.md",
      "courseData": "env-init.sh"
    },
    "finish": {
      "text": "finish.md"
    }
  },
  "environment": {
    "uilayout": "terminal"
  },
  "backend": {
    "imageid": "docker"
  }
}

This file defines:

  • a title (title),
  • a description (description),
  • the titles and the filename of each step (steps),
  • the intro (intro),
  • the end (finish),
  • the UI layout (uilayout): terminal (Terminal), terminal-terminal (2x Terminal Split), or terminal-editor (Terminal + Editor),
  • the backend image ID (imageid): ansible (Ansible), bash (Bash), c# (C#), coreos (CoreOS), docker (Docker), dotnet (.Net Core), go (Go), java8 (Java), kubernetes (Kubernetes), kubernetes-cluster (Kubernetes Cluster), node6 (Node.js v6), swarm (Docker Swarm), ubuntu (Ubuntu)

The markdown files have special syntaxes:

  • to execute a command: \my command``,
  • to copy/paste a text: \my text``,
  • to a content file in the editor: <pre class="file" data-filename="<SOURCE_FILENAME>" data-target="replace">Copy to editor</pre> (data-target can be replace, prepend, or append),
  • to display an image: ![My image](./assets/my-image.png).

You can display a webpage based on a port on the environment:

  • to render the port 8500: https://[[HOST_SUBDOMAIN]]-8500-[[KATACODA_HOST]].environments.katacoda.com/,
  • to render the port 80: https://[[HOST_SUBDOMAIN]]-80-[[KATACODA_HOST]].environments.katacoda.com/,
  • to display page allowing user to select port: https://[[HOST_SUBDOMAIN]]-[[KATACODA_HOST]].environments.katacoda.com/.

You can also add tabs in the environment to render ports in webpages:

"environment": {
  "showdashboard": true,
  "dashboards": [{"name": "Display port 80", "port": 80}, {"name": "Display port 8080", "port": 8080}],
}

When the git repository is modified, the scenario on Katacoda is updated a few minutes later.

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×