Skip to content

Commit ad44f1b

Browse files
authored
Merge pull request #1 from lftraining/feature/howtos
Feature/howtos
2 parents 28f6452 + 8a41cf7 commit ad44f1b

12 files changed

+184
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# HOW TO Add Instructions to a Lab
2+
3+
This guide explains how to add instructions to your lab after creating the compute environment.
4+
5+
## Prerequisites
6+
7+
Before you begin, ensure you:
8+
9+
- Have access to the `lftraining` GitHub Organization
10+
- Are a member of the `lab-authors` team
11+
- Have created a compute environment using [this HOW TO ](create-a-compute-environment-using-templates.md)
12+
13+
14+
## Adding Instructions Using GitHub Web Interface
15+
16+
![Writing Instructions](../img/writing-instructions.gif)
17+
18+
1. Navigate to your Pull Request created by the workflow
19+
2. Click the feature branch `feature/implement-<your-compute-environment>`
20+
2. Locate the `compute-environments/available/<your-compute-environment>` directory
21+
3. Find `instructions.en.md` in this directory
22+
4. Click the edit button (pencil icon) to modify the file
23+
24+
### Writing Instructions
25+
26+
The file uses standard Markdown syntax. When rendered in the lab UI:
27+
28+
- Code blocks get syntax highlighting
29+
- A copy button appears next to code blocks for easy copying
30+
31+
### Saving Your Changes
32+
33+
After editing the instructions:
34+
35+
1. Click the `Commit changes...` button
36+
2. Add a meaningful commit message (e.g., "feat: add lab instructions")
37+
3. Click "Sign off and commit changes"
38+
39+
40+
!!!note "Working Locally"
41+
If you prefer to work locally, you can clone the repository and edit the files in your preferred editor.
42+
43+
### Automated Environment Creation
44+
45+
After committing your changes:
46+
47+
1. Return to your Pull Request in GitHub
48+
2. Look for a new comment containing the staging environment URL
49+
3. Use this URL to preview and test your lab instructions in the actual lab as a student would
50+
51+
![Automated Environment Creation](../img/automated-environment-creation.gif)
52+
53+
!!!tip "Testing Your Lab"
54+
The staging environment is a complete copy of your lab, allowing you to verify that:
55+
56+
- Instructions render correctly
57+
- Code blocks work as expected
58+
- The environment matches your requirements
59+
60+
61+
!!!tip "Skipping Environment Creation"
62+
Add `[skip ci]` to your commit message body to skip environment creation. This is useful when:
63+
64+
- Making minor text corrections
65+
- Fixing typos
66+
- Making multiple small changes before testing
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# HOW TO Create a new Lab Compute Environment
2+
3+
This guide explains how to create a new compute environment using our automated GitHub workflow.
4+
5+
## Prerequisites
6+
7+
Before you begin, ensure you:
8+
9+
- Have access to the `lftraining` GitHub Organization
10+
- You are a member of the `lab-authors` team
11+
12+
## Creating a New Compute Environment
13+
1. Open the lab repository in your browser
14+
2. Navigate to the Actions tab in the repository
15+
3. Locate and select the `New Compute Environment` workflow
16+
4. Click `Run workflow` and fill in the following parameters:
17+
18+
![Repository Actions](../img/create-lab-compute-environment.gif)
19+
20+
21+
### Workflow Parameters
22+
23+
- **Environment Template** (required)
24+
Choose one of the following templates:
25+
26+
- `k8s-single-node`: Single node Kubernetes environment
27+
- `k8s-multi-node`: Multi-node Kubernetes environment
28+
- `linux-single`: Single Linux host environment
29+
- `linux-dual`: Dual Linux host environment
30+
31+
- **Compute Environment** (required)
32+
- Enter the prefix for your compute environment (e.g., "LFS25800")
33+
34+
- **Use Workstation** (required)
35+
- Choose whether to include a workstation VM for the student
36+
- Defaults to `true`
37+
38+
### Template Configurations
39+
40+
Each template creates different VM configurations:
41+
42+
#### k8s-single-node
43+
- 1 control plane node
44+
- Optional workstation
45+
46+
#### k8s-multi-node
47+
- 1 control plane node
48+
- 1 worker node
49+
- Optional workstation
50+
51+
#### linux-single
52+
- 1 Linux host
53+
- Optional workstation
54+
55+
#### linux-dual
56+
- 2 Linux hosts
57+
- Optional workstation
58+
59+
## What Happens Next
60+
61+
After triggering the workflow:
62+
63+
1. A new feature branch is created (`feature/implement-<compute-environment>`)
64+
2. The necessary template files are generated based on your selection
65+
3. A draft pull request is automatically created
66+
4. You can then customize the environment further by working on the created branch
67+
68+
!!!note "Next Steps"
69+
After the workflow completes, review the generated pull request and make any necessary customizations to the environment configuration.
70+
71+
### Finding Your Pull Request
72+
73+
1. Navigate to the Pull Requests tab in the repository
74+
2. Look for a PR titled `Implement <your-compute-environment>`
75+
3. Open the PR to review the generated files
76+
77+
![Finding your PR](../img/finding-your-pr.gif)
78+
79+
### Working on the Environment Locally
80+
81+
1. Navigate to your local repository
82+
2. In the PR, click the `Code` dropdown button
83+
3. Copy the command under "Checkout with GitHub CLI"
84+
4. Paste and run the command in your terminal:
85+
```bash
86+
gh pr checkout <PR-NUMBER>
87+
```
88+
89+
![Working locally](../img/working-locally.gif)

docs/img/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.gif filter=lfs diff=lfs merge=lfs -text
2+
*.png filter=lfs diff=lfs merge=lfs -text
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

docs/img/finding-your-pr.gif

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

docs/img/repository-actions.png

Lines changed: 3 additions & 0 deletions
Loading

docs/img/run-workflow.png

Lines changed: 3 additions & 0 deletions
Loading

docs/img/working-locally.gif

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)