Skip to content

Commit 72a026f

Browse files
committed
Initial commit from template
0 parents  commit 72a026f

File tree

30 files changed

+604
-0
lines changed

30 files changed

+604
-0
lines changed

.gitignore

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# These are some examples of commonly ignored file patterns.
2+
# You should customize this list as applicable to your project.
3+
# Learn more about .gitignore:
4+
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
5+
6+
# Node artifact files
7+
node_modules/
8+
dist/
9+
10+
# Compiled Java class files
11+
*.class
12+
13+
# Compiled Python bytecode
14+
*.py[cod]
15+
__pycache__
16+
17+
# Log files
18+
*.log
19+
20+
# Package files
21+
*.jar
22+
23+
# Archive files
24+
*.zip
25+
*.tar.*
26+
27+
# Maven
28+
target/
29+
dist/
30+
31+
# JetBrains IDE
32+
.idea/
33+
34+
# Unit test reports
35+
TEST*.xml
36+
37+
# Generated by MacOS
38+
.DS_Store
39+
40+
# Generated by Windows
41+
Thumbs.db
42+
43+
# Applications
44+
*.app
45+
*.exe
46+
*.war
47+
48+
# Large media files
49+
*.mp4
50+
*.tiff
51+
*.avi
52+
*.flv
53+
*.mov
54+
*.wmv
55+
56+
# Python virtual env
57+
.venv/
58+
59+
# Original size images
60+
*.orig.png
61+
*.orig.jpg
62+
63+
#Python cache
64+
__pycache__
65+
66+
# Lab CLI Artifacts
67+
rendering
68+
build
69+
preview
70+
debug
71+
72+
.vscode
73+
74+
*.auto.tfvars
75+
*.terraform*
76+
terraform.tfstate*

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "helpers"]
2+
path = helpers
3+
url = https://github.com/cloudacademy/labs-cli-helpers.git

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v5.0.0
7+
hooks:
8+
- id: trailing-whitespace
9+
- id: end-of-file-fixer
10+
- id: check-yaml
11+
exclude: template.yaml
12+
- id: check-json
13+
- id: check-added-large-files
14+
- repo: https://github.com/odwyersoftware/brunette
15+
rev: 0.2.8
16+
hooks:
17+
- id: brunette
18+
types: [python]
19+
files: "steps/"
20+
- repo: https://github.com/crate-ci/typos
21+
rev: typos-dict-v0.12.4
22+
hooks:
23+
- id: typos
24+
- repo: https://github.com/antonbabenko/pre-commit-terraform
25+
rev: "v1.97.1"
26+
hooks:
27+
- id: terraform_fmt
28+
- id: terraform_tflint
29+
- id: terraform_validate
30+
args:
31+
- --hook-config=--mode=only-check-is-current-lockfile-cross-platform

README.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Base lab content skeleton
2+
3+
This repo contains a skeleton for lab content. You can fork and use it as a baseline for a new lab.
4+
5+
## How to import in bakery
6+
7+
For the time being Hermione is supporting repos from:
8+
9+
- GitHub
10+
- BitBucket
11+
12+
to push the content in Bakery you have to call Hermione, our import service, with a webhook,
13+
specifying the vendor of the repos adding the access token to authenticate the request.
14+
15+
https://cloudacademy.com/webhooks/hermione/{VENDOR}/?access_token={ACCESS_TOKEN}
16+
17+
### When content is imported on bakery
18+
19+
The content will be imported only when a new tag is pushed:
20+
21+
git tag v1.0.0
22+
git push --tags
23+
24+
### Vendor values:
25+
26+
- github
27+
- bitbucket
28+
29+
### Access token
30+
31+
For the time being you've to ask the lab team for it.
32+
33+
### Stage
34+
35+
If you want to test the content on stage, just point the webhook to stage:
36+
37+
38+
https://stage.cloudacademy.com/webhooks/hermione/{VENDOR}/?access_token={ACCESS_TOKEN}
39+
40+
### MarkDown version
41+
42+
At the moment is fully supported GitHub Flavored Markdown Spec
43+
44+
https://github.github.com/gfm/
45+
46+
Under the hood HTML rendering is handled by Python-Markdown with some extension:
47+
48+
https://python-markdown.github.io/
49+
50+
Thanks to its modularity we could add extensions to handle new cases or custom behaviour.
51+
52+
For example, automatic upload to S3 of the assets is managed by a custom extension.
53+
54+
55+
## Repo structure
56+
57+
58+
```
59+
.
60+
+-- config.yaml
61+
+-- description.md
62+
+-- metadata.yaml
63+
+-- assets
64+
| # all assets contained in the lab description
65+
| [...]
66+
+-- steps
67+
| +-- 1_lab_step_example
68+
| | +-- assets
69+
| | # all assets contained in the lab step
70+
| | [...]
71+
| | +-- checks
72+
| | | +-- 1_vcf_example
73+
| | | | +-- config.yaml
74+
| | | | +-- description.md
75+
| | | | +-- source.py
76+
| | | # all checks order by filesystem
77+
| | | [...]
78+
| | +-- config.yaml
79+
| | +-- description.md
80+
| | +-- documentation.md
81+
| # all steps order by filesystem
82+
| [...]
83+
+-- environments
84+
| +-- 1_env_example
85+
| | +-- config.yaml
86+
| | +-- template.yaml
87+
| | +-- security_policy
88+
| | | +-- config.yaml
89+
| | | +-- policy_body.yaml
90+
| # all environments order by filesystem
91+
| [...]
92+
93+
```
94+
95+
## Markdown Syntax Examples
96+
97+
### Test Lab Content
98+
99+
test description with GitHub Flavored Markdown
100+
101+
![](assets/image1.jpg)
102+
103+
- George Washington
104+
- John Adams
105+
- Thomas Jefferson
106+
107+
* George Washington
108+
* John Adams
109+
* Thomas Jefferson
110+
111+
112+
| Syntax | Description |
113+
| ----------- | ----------- |
114+
| Header | Title |
115+
| Paragraph | Text |
116+
117+
``` js
118+
var foo = function (bar) {
119+
return bar++;
120+
};
121+
122+
console.log(foo(5));
123+
```
124+
125+
126+
- [ ] foo
127+
- [x] bar
128+
129+
Visit www.commonmark.org.
130+
131+
~~Hi~~ Hello, world!
132+
133+
<ins>underline</ins> is accomplished with `ins` html tags
134+
135+
paragraph
136+
137+
code

assets/warning.png

1.35 KB
Loading

checklist.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Checklist
2+
3+
## Validation Checks
4+
5+
- [ ] Can't re-use an existing check
6+
- [ ] Does not throw exceptions
7+
- [ ] Is tolerant of student input discrepancies
8+
- [ ] Timeout appropriate (5s per API call)
9+
- [ ] Step variables are strings and are cast appropriately

config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title: Lab Test
2+
slug: lab-test
3+
short_description: Short description under 160 chars
4+
lab_features: # cloud-environment|remote-desktop|cli|code-ide
5+
- cloud-environment
6+
duration: 7600
7+
#step_variables:
8+
# - "required_step_var: This <strong>string</strong> will be substituted in lab steps with {LabStep.required_step_var} and available in VCFs."
9+
# - "?optional_step_var: Substituted in lab steps with {LabStep.?optional_step_var} and available in VCFs. Optional step variables are not required to be defined in a lab and will be substituted with nothing in that case."
10+
# - "template_output: '{{outputName|default:''waiting_for_output''}}'"
11+
difficulty: Beginner # Beginner|Intermediate|Advanced
12+
instructor: "Jun Fritz"
13+
environment_start_image: warning.png # relative to top-level assets/ directory
14+
environment_end_image: warning.png # relative to top-level assets/ directory
15+
16+
is_challenge: false
17+
is_assessment: false # at most one of is_challenge and is_assessment may be true
18+
is_playground: false
19+
# Challenge lab and lab assessment only properties (when is_challenge: true or lab marked as an assessment)
20+
#assessed_topics:
21+
# - topic1
22+
# - topic2
23+
#audiences: []
24+
#prerequisites: []
25+
26+
# The following can always be kept at their defaults
27+
startup_time: 0
28+
freezable_type: Disabled
29+
freeze_timeout: 0
30+
allow_enterprise_bridge: true
31+
# image: warning.png # relative to top-level assets/ directory

description.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
What is the topic of the lab? What is good about it?
2+
3+
Why would someone want to learn about the topic? How will they benefit?
4+
5+
What will the student do in the lab?
6+
7+
### Learning objectives
8+
9+
Upon completion of this beginner/intermediate/advanced level lab, you will be able to:
10+
11+
- A specific thing
12+
- Another specific thing
13+
- And another
14+
- Perhaps one more
15+
16+
### Intended audience
17+
18+
- Candidates for CERTIFICATION NAME
19+
- Cloud Architects
20+
- Data Engineers
21+
- DevOps Engineers
22+
- Machine Learning Engineers
23+
- Software Engineers
24+
25+
### Prerequisites
26+
27+
Familiarity with the following will be beneficial but is not required:
28+
29+
- A topic
30+
- Another topic
31+
- And another
32+
33+
The following content can be used to fulfill the prerequisites:
34+
35+
- [Content Title 1](/lab/lab-slug/)
36+
- [Content Title 2](/course/course-slug/)

environments/env1/config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
title: Lab Provisioning Block
2+
description: description
3+
type: cloud-environment # cloud-environment|remote-desktop|cli|code-ide
4+
vendor: aws # aws|azure|google|alibaba-cloud vendor is mandatory if type: cloud-environment|remote-desktop
5+
language: yaml # yaml|json|hcl2
6+
7+
# Tags can be used to specify which subsets of accounts the lab should use to enable access to restricted services
8+
#tags:
9+
#- bedrock
10+
11+
# Needed when type: cli|code-ide
12+
#workspace_docker_image_url: "421805900968.dkr.ecr.us-east-2.amazonaws.com/cloudacademy/labs-workspace/image-name" # can set tag by appending :tag
13+
#content_docker_image_name: "github.com/cloudacademy/content-repo"
14+
#content_docker_image_tag: "tag" # optional; latest used when not specified. Tag will usually be a commit ID
15+
# Can use 'github.com/cloudacademy/noop-content-image-repo' for the content image if no IDE/CLI checks are required
16+
17+
# Set the size if type: cli|code-ide
18+
#size: small|medium|large
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
title: Security Policy
2+
description: descr sec policy 1
3+
vendor: aws # aws|azure|google|alibaba-cloud
4+
#custom_policy_tags: # [optional] custom security policy tags (defined in hagrid), string of comma separated values. E.g. azure-vm.mckinsey_instances_count

0 commit comments

Comments
 (0)