Skip to content

Commit

Permalink
Publish to stable
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 28, 2024
2 parents 9805cd0 + e1e7baf commit 1335da9
Show file tree
Hide file tree
Showing 181 changed files with 1,724 additions and 732 deletions.
14 changes: 0 additions & 14 deletions .github/dependabot.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Release
on:
milestone:
types: [closed]
workflow_dispatch: {}

permissions:
id-token: write
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-util-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- main
paths:
- test/util/**
- testing/util/**

jobs:
test:
Expand All @@ -22,16 +22,16 @@ jobs:
node-version: ${{ env.node_version }}
registry-url: "https://registry.npmjs.org"
- name: Install NPM packages
working-directory: test/util
working-directory: testing/util
run: npm ci
- name: Build
working-directory: test/util
working-directory: testing/util
run: npm run build
- name: Run unit tests
working-directory: test/util
working-directory: testing/util
run: |
npm test
- name: Run test content
working-directory: test/util
working-directory: testing/util
run: |
npm run exec -- test ./test-content
7 changes: 7 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pull_request_rules:
- name: Automatically approve Renovate PRs
conditions:
- author = renovate[bot]
actions:
review:
type: APPROVE
3 changes: 2 additions & 1 deletion .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ mehta
sheetal
joshi
keda
AIML
AIML
DCGM
2 changes: 0 additions & 2 deletions CODEOWNERS

This file was deleted.

7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ There are several tools that are required to run the workshop such as `kubectl`
- Governance model: [governance/model.md](governance/model.md)
- Tenets: [governance/tenets.md](governance/tenets.md)

### Meetings

2nd Thursday every month at 8am PT (3pm UTC)

- Meeting link: [Chime Web Meeting Link](https://chime.aws/8607878433)
- Agenda, Notes, and calendar invites: [Google Doc](https://docs.google.com/document/d/1hYjhBhPvLVMf7gunooM-kE0wptMjMIORCmI2BOedCWI/edit?usp=sharing)

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
Expand Down
2 changes: 1 addition & 1 deletion docs/authoring_content.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ See `lab/Dockerfile` and `lab/scripts/installer.sh` to configure the installed u

If Terraform is needed it should be created at `./manifests/modules/<yourpath>/.workshop/terraform`. This Terraform will be automatically applied when the user runs `prepare-environment` and destroyed when they move to the next lab.

You can use the directory `manifests/template/.workshop/terraform` as a starter example. The Terraform is treated as a module and the variables in that directory must match exactly in order to meet the "contract" with the rest of the framework. See `vars.tf` and `outputs.tf`.
You can use the directory `templates/lab-manifests/.workshop/terraform` as a starter example. The Terraform is treated as a module and the variables in that directory must match exactly in order to meet the "contract" with the rest of the framework. See `vars.tf` and `outputs.tf`.

### Variables

Expand Down
12 changes: 12 additions & 0 deletions docs/style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ sidebar_custom_props: {"info": true}
---
```

To mark your module as external content, which at the moment is only used for other AWS workshops, place the following in the header of your markdown file:

```
---
...
sidebar_custom_props:
{
"explore": "https://<external link here>"
}
---
```

### Navigating the AWS console

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.
Expand Down
2 changes: 1 addition & 1 deletion hack/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ container_image='eks-workshop-test'

(cd $SCRIPT_DIR/../lab && $CONTAINER_CLI build -q -t eks-workshop-environment .)

(cd $SCRIPT_DIR/../test && $CONTAINER_CLI build -q -t $container_image .)
(cd $SCRIPT_DIR/../testing && $CONTAINER_CLI build -q -t $container_image .)

source $SCRIPT_DIR/lib/generate-aws-creds.sh

Expand Down
9 changes: 9 additions & 0 deletions lab/bin/reset-environment
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Make sure we run from a consistent directory
cd ~

mkdir -p /eks-workshop/logs
log_file=/eks-workshop/logs/action-$(date +%s).log

Expand Down Expand Up @@ -121,6 +124,11 @@ rm -rf /eks-workshop/terraform
mkdir -p /eks-workshop/terraform
cp -R $manifests_path/.workshop/terraform/* /eks-workshop/terraform

# Use a separate directory for .terraform directory
# Allows us to wipe the TF configuration every time but retain providers installed
mkdir -p /eks-workshop/terraform-data
export TF_DATA_DIR="/eks-workshop/terraform-data"

export TF_VAR_eks_cluster_id="$EKS_CLUSTER_NAME"

RESOURCES_PRECREATED=${RESOURCES_PRECREATED:-"false"}
Expand Down Expand Up @@ -226,6 +234,7 @@ fi
# Recycle workload pods in case stateful pods got restarted
kubectl delete pod -l app.kubernetes.io/created-by=eks-workshop -l app.kubernetes.io/component=service -A

# Wait for the workload pods previously recycled
kubectl wait --for=condition=Ready --timeout=240s pods -l app.kubernetes.io/created-by=eks-workshop -A

# Finished
Expand Down
3 changes: 2 additions & 1 deletion lab/iam/policies/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ Statement:
Resource: ["*"]
Condition:
StringLike:
kms:RequestAlias: "alias/${Env}*"
kms:RequestAlias: ["alias/${Env}*", "alias/eks/${Env}*"]
- Effect: Allow
Action:
- kms:CreateAlias
- kms:DeleteAlias
Resource:
- !Sub arn:aws:kms:${AWS::Region}:${AWS::AccountId}:alias/${Env}*
- !Sub arn:aws:kms:${AWS::Region}:${AWS::AccountId}:alias/eks/${Env}*
- !Sub arn:aws:kms:${AWS::Region}:${AWS::AccountId}:key/*
- Effect: Allow
Action:
Expand Down
1 change: 1 addition & 0 deletions lab/iam/policies/labs2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Statement:
Resource:
- !Sub arn:aws:events:${AWS::Region}:${AWS::AccountId}:rule/${Env}*
- !Sub arn:aws:events:${AWS::Region}:${AWS::AccountId}:rule/eks-workshop*
- !Sub arn:aws:events:${AWS::Region}:${AWS::AccountId}:rule/Karpenter*
- Effect: Allow
Action:
- vpc-lattice:List*
Expand Down
12 changes: 6 additions & 6 deletions lab/scripts/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
set -e

# renovate: depName=kubernetes/kubernetes
kubectl_version='1.30.3'
kubectl_version='1.30.4'

# renovate: depName=helm/helm
helm_version='3.15.3'
helm_version='3.15.4'

# renovate: depName=eksctl-io/eksctl
eksctl_version='0.188.0'
eksctl_version='0.190.0'

kubeseal_version='0.18.4'

# renovate: depName=mikefarah/yq
yq_version='4.44.2'
yq_version='4.44.3'

# renovate: depName=fluxcd/flux2
flux_version='2.3.0'

# renovate: depName=argoproj/argo-cd
argocd_version='2.11.7'
argocd_version='2.12.3'

# renovate: depName=hashicorp/terraform
terraform_version='1.9.3'
terraform_version='1.9.5'

# renovate: depName=aws/amazon-ec2-instance-selector
ec2_instance_selector_version='2.4.1'
Expand Down
6 changes: 3 additions & 3 deletions manifests/.workshop/terraform/base.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.61.0"
version = "5.66.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.31.0"
version = "2.32.0"
}
helm = {
source = "hashicorp/helm"
version = "2.14.0"
version = "2.15.0"
}
kubectl = {
source = "gavinbunney/kubectl"
Expand Down
8 changes: 7 additions & 1 deletion manifests/base-application/carts/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ spec:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
image: "public.ecr.aws/aws-containers/retail-store-sample-cart:0.7.0"
image: "public.ecr.aws/aws-containers/retail-store-sample-cart:0.8.0"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
protocol: TCP
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8080
initialDelaySeconds: 15
periodSeconds: 3
livenessProbe:
httpGet:
path: /actuator/health/liveness
Expand Down
35 changes: 11 additions & 24 deletions manifests/modules/aiml/chatbot/.workshop/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,30 @@

set -e

logmessage "Deleting AIML resources..."

logmessage "Deleting Gradio-UI Components..."

kubectl delete -k /eks-workshop/manifests/modules/aiml/chatbot/gradio --ignore-not-found=true
kubectl delete -k /eks-workshop/manifests/modules/aiml/chatbot/gradio --ignore-not-found

logmessage "Deleting Llama2 pods..."

kubectl delete -f https://raw.githubusercontent.com/aws-neuron/aws-neuron-sdk/v2.19.1/src/k8/k8s-neuron-device-plugin-rbac.yml --ignore-not-found
kubectl delete -f https://raw.githubusercontent.com/aws-neuron/aws-neuron-sdk/v2.19.1/src/k8/k8s-neuron-device-plugin.yml --ignore-not-found
kubectl delete -k /eks-workshop/manifests/modules/aiml/chatbot/ray-service-llama2-chatbot --ignore-not-found

logmessage "Deleting Neuron Device Plugin..."

kubectl delete -k /eks-workshop/manifests/modules/aiml/chatbot/neuron-device-plugin --ignore-not-found=true
kubectl delete -f https://raw.githubusercontent.com/aws-neuron/aws-neuron-sdk/v2.19.1/src/k8/k8s-neuron-device-plugin-rbac.yml --ignore-not-found
kubectl delete -f https://raw.githubusercontent.com/aws-neuron/aws-neuron-sdk/v2.19.1/src/k8/k8s-neuron-device-plugin.yml --ignore-not-found

logmessage "Un-installing kuberay operator..."

helm uninstall kuberay-operator

kubectl delete namespace llama2 --ignore-not-found

kubectl delete namespace gradio-llama2-inf2 --ignore-not-found
helm uninstall kuberay-operator --ignore-not-found

logmessage "Deleting Karpenter NodePool and EC2NodeClass..."
logmessage "Deleting Karpenter resources..."

delete-all-if-crd-exists nodepools.karpenter.sh
delete-all-if-crd-exists ec2nodeclasses.karpenter.k8s.aws
kubectl kustomize ~/environment/eks-workshop/modules/aiml/chatbot/nodepool \
| envsubst | kubectl delete -f-

logmessage "Waiting for Karpenter nodes to be removed..."
logmessage "Deleting llama2 and gradio-llama2-inf2 namespaces..."

EXIT_CODE=0

timeout --foreground -s TERM 30 bash -c \
'while [[ $(kubectl get nodes --selector=type=karpenter -o json | jq -r ".items | length") -gt 0 ]];\
do sleep 5;\
done' || EXIT_CODE=$?
kubectl delete namespace llama2 --ignore-not-found

if [ $EXIT_CODE -ne 0 ]; then
logmessage "Warning: Karpenter nodes did not clean up"
fi
kubectl delete namespace gradio-llama2-inf2 --ignore-not-found
Loading

0 comments on commit 1335da9

Please sign in to comment.