Skip to content

Commit 2abe92a

Browse files
Publish to stable
2 parents 9044448 + d1575bc commit 2abe92a

File tree

661 files changed

+2474
-4687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

661 files changed

+2474
-4687
lines changed

.github/workflows/module-test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
glob:
1010
type: string
1111
default: "-"
12+
outputs:
13+
durations-artifact:
14+
description: "The artifact ID of the test durations file"
15+
value: ${{ jobs.run-tests.outputs.durations-artifact }}
1216

1317
permissions:
1418
id-token: write
@@ -19,6 +23,8 @@ jobs:
1923
if: github.repository == 'aws-samples/eks-workshop-v2'
2024
name: run-tests
2125
runs-on: ubuntu-latest
26+
outputs:
27+
durations-artifact: ${{ steps.upload-durations.outputs.artifact-id }}
2228
steps:
2329
- name: Check out code
2430
uses: actions/checkout@v4
@@ -67,13 +73,21 @@ jobs:
6773
env:
6874
DOCKER_BUILDKIT: 1
6975
DEV_MODE: 1
76+
GENERATE_TIMINGS: 1
77+
TEST_REPORT: /tmp/test-output.json
7078
MODULE: ${{ inputs.module }}
7179
GLOB: ${{ inputs.glob }}
7280
AWS_REGION: "${{ secrets.AWS_REGION }}"
7381
ASSUME_ROLE: "${{ secrets.AWS_ROLE_ARN }}"
82+
DOCKER_DNS_OVERRIDE: "8.8.8.8"
7483
run: |
7584
export AWS_DEFAULT_REGION="$AWS_REGION"
7685
make test environment="$CLUSTER_ID" module="$MODULE" glob="$GLOB"
86+
- uses: actions/upload-artifact@v4
87+
id: upload-durations
88+
with:
89+
name: test-durations-${{ env.CLUSTER_ID }}
90+
path: website/test-durations.json
7791
- name: Refresh AWS credentials
7892
if: always()
7993
uses: aws-actions/[email protected]

.github/workflows/pr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- name: Run website build
3232
working-directory: website
3333
run: |
34+
export LAB_TIMES_ENABLED='true'
3435
npm install
3536
npm run build
3637
@@ -53,7 +54,7 @@ jobs:
5354
- name: Setup TFLint
5455
uses: terraform-linters/setup-tflint@v4
5556
- name: Setup terraform-docs
56-
uses: jaxxstorm/action-install-gh-release@v1.11.0
57+
uses: jaxxstorm/action-install-gh-release@v1.12.0
5758
with:
5859
repo: terraform-docs/terraform-docs
5960
- uses: pre-commit/[email protected]

.github/workflows/publish-content.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Publish Content
22

33
on:
4-
workflow_call: {}
4+
push:
5+
branches:
6+
- stable
57
workflow_dispatch: {}
68

79
permissions:
@@ -15,8 +17,6 @@ jobs:
1517
steps:
1618
- name: Check out code
1719
uses: actions/checkout@v4
18-
with:
19-
ref: stable
2020
- name: Use Node.js
2121
uses: actions/setup-node@v4
2222
with:

.github/workflows/publish-snapshot.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: Publish Snapshot
22

33
on:
4-
workflow_call: {}
5-
workflow_dispatch:
6-
inputs:
7-
snapshot:
8-
description: "The snapshot to publish"
9-
required: true
10-
type: string
4+
push:
5+
branches:
6+
- "snapshot-*"
7+
workflow_dispatch: {}
118

129
permissions:
1310
id-token: write
@@ -20,8 +17,6 @@ jobs:
2017
steps:
2118
- name: Check out code
2219
uses: actions/checkout@v4
23-
with:
24-
ref: snapshot-${{ inputs.snapshot }}
2520
- name: Use Node.js
2621
uses: actions/setup-node@v4
2722
with:
@@ -42,10 +37,14 @@ jobs:
4237
role-duration-seconds: 900
4338
aws-region: ${{ secrets.AWS_REGION }}
4439
role-session-name: GithubActionsSession-publish
40+
- name: Extract branch name
41+
shell: bash
42+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
43+
id: extract_branch
4544
- name: Run publish
4645
env:
4746
SNAPSHOT_BUCKET: "${{ secrets.SNAPSHOT_BUCKET }}"
4847
SNAPSHOT_CLOUDFRONT: "${{ secrets.SNAPSHOT_CLOUDFRONT }}"
49-
BRANCH: snapshot-${{ inputs.snapshot }}
48+
BRANCH: ${{ steps.extract_branch.outputs.branch }}
5049
run: |
5150
bash hack/publish-snapshot.sh

.spelling

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,5 @@ weaveworks
124124
nirmal
125125
mehta
126126
sheetal
127-
joshi
127+
joshi
128+
keda

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
# Amazon Elastic Kubernetes Service Workshop
1+
<div align="center">
2+
<a href="https://eksworkshop.com" target="_blank" rel="noopener noreferrer">
3+
<picture>
4+
<img width="160" src="docs/images/eks.png" alt="Amazon Elastic Kubernetes Service logo">
5+
</picture>
6+
</a>
7+
8+
<br/>
9+
10+
<div align="center">
11+
12+
[![Stars](https://img.shields.io/github/stars/aws-samples/eks-workshop-v2)](LICENSE)
13+
[![License](https://img.shields.io/github/license/aws-samples/eks-workshop-v2)](LICENSE)
14+
15+
</div>
16+
17+
<strong>
18+
<h2>Amazon Elastic Kubernetes Service Workshop</h2>
19+
</strong>
20+
</div>
221

322
Welcome to the repository for the [Amazon Elastic Kubernetes Services workshop](https://eksworkshop.com). This contains the source for the website content as well as the accompanying infrastructure-as-code to set up a workshop lab environment in your AWS account. Please review the [Introduction](https://www.eksworkshop.com/docs/introduction/) chapter of the workshop for more details.
423

cluster/eksctl/cluster.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ availabilityZones:
77
metadata:
88
name: ${EKS_CLUSTER_NAME}
99
region: ${AWS_REGION}
10-
version: "1.29"
10+
version: "1.30"
1111
tags:
1212
karpenter.sh/discovery: ${EKS_CLUSTER_NAME}
1313
created-by: eks-workshop-v2
@@ -31,7 +31,7 @@ managedNodeGroups:
3131
maxSize: 6
3232
instanceType: m5.large
3333
privateNetworking: true
34-
releaseVersion: "1.29.0-20240129"
34+
releaseVersion: "1.30.0-20240625"
3535
updateConfig:
3636
maxUnavailablePercentage: 50
3737
labels:

cluster/terraform/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ variable "cluster_name" {
77
variable "cluster_version" {
88
description = "EKS cluster version."
99
type = string
10-
default = "1.29"
10+
default = "1.30"
1111
}
1212

1313
variable "ami_release_version" {
1414
description = "Default EKS AMI release version for node groups"
1515
type = string
16-
default = "1.29.0-20240129"
16+
default = "1.30.0-20240625"
1717
}
1818

1919
variable "vpc_cidr" {

cspell.config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ patterns:
55
pattern: "/`(.*)`/g"
66
- name: browser_block
77
pattern: "/<Browser.*>[\\s\\S]*?^\\s*<\\/Browser>/gm"
8+
- name: yaml_block
9+
pattern: "/::yaml.*/g"
810
languageSettings:
911
- languageId: markdown
1012
ignoreRegExpList:
1113
- markdown_code_block
1214
- markdown_code_snippet
1315
- browser_block
16+
- yaml_block
1417
dictionaries:
1518
- custom-words
1619
dictionaryDefinitions:

docs/eks_version_upgrades.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ There are various places that reference the Kubernetes versions (Kubernetes, kub
4141
1. eksctl: `cluster/eksctl/cluster.yaml`
4242
1. Terraform: `cluster/terraform/variables.tf`
4343
1. Common kubectl: `hack/lib/kubectl-version.sh`
44+
1. Renovatebot version constraints: `renovate.json`

docs/images/console-button.png

5.79 KB
Loading

docs/images/eks.png

15.1 KB
Loading

docs/images/yaml-annotations.png

183 KB
Loading

docs/images/yaml-plain.png

99.7 KB
Loading

docs/reviewer_checklist.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ See style guide for expanded explanations.
3535

3636
- [ ] Generated lab timing has been created (new lab) or updated (updated lab) if needed
3737
- [ ] All Terraform resources created have dynamic names
38+
- [ ] Images should be in `webp` format

docs/style_guide.md

Lines changed: 58 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,64 @@
22

33
This document provides a style guide that should be used when creating or modifying content for the workshop in order to maintain a consistent experience throughout the content.
44

5+
## General content
6+
7+
### Use admonitions
8+
9+
Use appropriate [Docusaurus admonitions](https://docusaurus.io/docs/markdown-features/admonitions) to call out relevant information.
10+
11+
```markdown
12+
:::info
13+
Use info blocks for additional information
14+
:::
15+
16+
:::caution
17+
Caution blocks also available
18+
:::
19+
20+
:::note
21+
Note blocks are available
22+
:::
23+
```
24+
25+
### Badges
26+
27+
To mark your module as an independent module that users can begin with, place the following in the header of your markdown file:
28+
29+
```
30+
---
31+
...
32+
sidebar_custom_props: {"module": true}
33+
---
34+
```
35+
36+
To mark your module as informational, with no actionable steps, place the following in the header of your markdown file:
37+
38+
```
39+
---
40+
...
41+
sidebar_custom_props: {"info": true}
42+
---
43+
```
44+
45+
### Navigating the AWS console
46+
47+
There are instances where the user needs to navigate to specific screens in the AWS console. It is preferable to provide a link to the exact screen if possible, or a close as can be done.
48+
49+
For example to link to the EKS console you can use a link like this:
50+
51+
```
52+
https://console.aws.amazon.com/eks/home#/clusters
53+
```
54+
55+
> Note that this has had the region information removed, the link as shown in the browser would be: `https://us-west-2.console.aws.amazon.com/eks/home?region=us-west-2#/clusters`. The region must be removed to allow the content to be portable.
56+
57+
These links should be displayed to the user with the [Console button component](./ui_components.md) for consistency.
58+
59+
### Screenshots
60+
61+
Use of screenshots should be limited to only wherever necessary. Where possible command-line output should be used as it is more maintainable and testable. When screenshots are necessary only the relevant section of the screen should be included as it reduces image size and makes the images more legible, especially for users with limited screen resolution. Screenshots should be cropped to display only the necessary details.
62+
563
## Scripts/Commands
664

765
This section provides guidelines related to the commands and scripts learners are instructed to use during the workshop content.
@@ -177,37 +235,3 @@ An example of using this would look like so:
177235
```
178236
$ aws eks describe-cluster --name $EKS_CLUSTER_NAME
179237
```
180-
181-
### Info and Caution Blocks
182-
183-
:::Info
184-
Use info blocks for additional information
185-
:::
186-
187-
:::Caution
188-
Caution blocks also available
189-
:::
190-
191-
:::Note
192-
Note blocks are available
193-
:::
194-
195-
### Badges
196-
197-
To mark your module as an independent module that users can begin with, place the following in the header of your markdown file:
198-
199-
```
200-
---
201-
...
202-
sidebar_custom_props: {"module": true}
203-
---
204-
```
205-
206-
To mark your module as informational, with no actionable steps, place the following in the header of your markdown file:
207-
208-
```
209-
---
210-
...
211-
sidebar_custom_props: {"info": true}
212-
---
213-
```

docs/ui_components.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,79 @@ this is output
3434
```
3535
````
3636

37+
Multiple commands can be displayed in the same terminal window:
38+
39+
````
40+
```bash
41+
$ first command
42+
output of the first command
43+
$ second command
44+
output of the second command
45+
```
46+
````
47+
48+
## YAML file
49+
50+
![Plain YAML file](images/yaml-plain.png)
51+
52+
Working with Kubernetes involves a lot of YAML and this can be challenging to explain to a participant, especially for larger blocks of YAML. The YAML file component is intended to provide a mechanism to make this easier for content authors both in terms of breaking down complex YAML as well as for maintainability.
53+
54+
The above screenshot would be accomplish with something like this:
55+
56+
```bash
57+
::yaml{file="manifests/modules/autoscaling/compute/karpenter/nodepool/nodepool.yaml" paths="spec.disruption"}
58+
```
59+
60+
This consists of two parts:
61+
62+
1. The `file` attribute is file path to an existing YAML file somewhere in the project
63+
2. The `paths` attribute a YAML path within the file to lookup one or more parts of the file, it can be comma-separated
64+
65+
The paths attribute can display individual fields, sections or items in an array, see these examples related to the above YAML:
66+
67+
1. `paths="spec.disruption.consolidationPolicy"` would only highlight the `consolidationPolicy` field instead of the entire `disruption` block
68+
2. `paths="spec.template.spec.requirements[0]"` would highlight the first element of the requirements array
69+
3. `paths="spec.template.spec.requirements[0].values"` would highlight the `values` field of the first element of the requirements array
70+
71+
Using the `paths` attribute has several advantanges over the typical Docusaurus highlighting:
72+
73+
1. Using hard-coded line numbers can become out-of-sync with the content of a file if it is changed
74+
2. Using comments in the YAML file pollutes the file itself, and makes it harder for the participant to inspect the file on their own
75+
76+
You can optionally provide "annotations" for the respective `paths` to provide call-outs to explain each path that is highlights:
77+
78+
![Annotated YAML file](images/yaml-annotations.png)
79+
80+
This is done by adding an ordered markdown list immediately after the `::yaml` directive:
81+
82+
```
83+
::yaml{file="manifests/modules/autoscaling/compute/karpenter/nodepool/nodepool.yaml" paths="spec.template.metadata.labels,spec.template.spec.requirements, spec.limits"}
84+
85+
1. We're asking the `NodePool` to start all new nodes with a Kubernetes label `type: karpenter`, which will allow us to specifically target Karpenter nodes with pods for demonstration purposes
86+
2. The [NodePool CRD](https://karpenter.sh/docs/concepts/nodepools/) supports defining node properties like instance type and zone. In this example, we're setting the `karpenter.sh/capacity-type` to initially limit Karpenter to provisioning On-Demand instances, as well as `node.kubernetes.io/instance-type` to limit to a subset of specific instance types. You can learn which other properties are [available here](https://karpenter.sh/docs/concepts/scheduling/#selecting-nodes). We'll work on a few more during the workshop.
87+
3. A `NodePool` can define a limit on the amount of CPU and memory managed by it. Once this limit is reached Karpenter will not provision additional capacity associated with that particular `NodePool`, providing a cap on the total compute.
88+
```
89+
90+
If using annotations then all paths should have a corresponding list entry, and the code lines will always be annotated in the order of the paths as listed in the attribute.
91+
92+
## Console button
93+
94+
![Console button](images/console-button.png)
95+
96+
The console button component is designed to provide a consistent way to link to the AWS console.
97+
98+
The component is used like so:
99+
100+
```jsx
101+
<ConsoleButton
102+
url="https://console.aws.amazon.com/cloudwatch/home#dashboards"
103+
service="cloudwatch"
104+
label="Open CloudWatch console"
105+
/>
106+
```
107+
108+
The `service` parameter dictates the icon that is shown, and the corresponding image must exist in `website/static/img/services`.
109+
37110
## Browser Window
38111

39112
![Browser Window](images/browser-window.png)

0 commit comments

Comments
 (0)