|
| 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 | + |
| 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 |
0 commit comments