From 64ef9afa8e42f8cc57e9dd6d2ac47f2d844ea3f0 Mon Sep 17 00:00:00 2001 From: Elamaran Shanmugam Date: Tue, 23 Apr 2024 21:06:37 -0400 Subject: [PATCH 1/4] Introducing Dev Containers to Patterns Repo --- .devcontainer/devcontainer.json | 19 +++++++++++++++++++ .devcontainer/postCreateCommand.sh | 21 +++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..c2f37d1e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,19 @@ +{ + "image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu", + "features": { + "ghcr.io/devcontainers/features/node:1": {}, + "ghcr.io/devcontainers/features/aws-cli:1": {}, + "ghcr.io/devcontainers-contrib/features/aws-cdk:2": { + "version": "2.133.0" + } + }, + "postCreateCommand": ".devcontainer/postCreateCommand.sh", + "workspaceFolder": "/home/vscode/cdk-eks-blueprints", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/cdk-eks-blueprints,type=bind", + "hostRequirements": { + "cpus": 2 + }, + "remoteEnv": { + "PATH": "${containerEnv:PATH}:/home/vscode/cdk-eks-blueprints" + } +} \ No newline at end of file diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 00000000..8e4d73db --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# For Kubectl AMD64 / x86_64 +[ $(uname -m) = x86_64 ] && curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" +# For Kubectl ARM64 +[ $(uname -m) = aarch64 ] && curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" +chmod +x ./kubectl +sudo mv ./kubectl /usr/local/bin/kubectl + +# For Helm +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 +chmod 700 get_helm.sh +echo "Installing 'helm' utility ..." +./get_helm.sh +rm -rf get_helm.sh + +# setup autocomplete for kubectl and alias k +mkdir $HOME/.kube +echo "source <(kubectl completion bash)" >> $HOME/.bashrc +echo "alias k=kubectl" >> $HOME/.bashrc +echo "complete -F __start_kubectl k" >> $HOME/.bashrc From ac67dce962b43fc7e7d7a29bbe644ae4e867a0c6 Mon Sep 17 00:00:00 2001 From: Elamaran Shanmugam Date: Wed, 24 Apr 2024 16:00:58 -0400 Subject: [PATCH 2/4] Introducing Dev Containers to Patterns Repo --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index e803e4dd..dffe7e8f 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,12 @@ Before proceeding, make sure [AWS CLI](https://docs.aws.amazon.com/cli/latest/us To use the eks-blueprints and patterns module, you must have [Node.js](https://nodejs.org/en/) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed. You will also use `make` and `brew` to simplify build and other common actions. +## Workstation Setup Options + +### DevContainer Setup + +Users can choose this option, if you dont want to run this solution on a mac or ubuntu machine. Please use the dev container configuration in the `.devcontainer` folder with [devpod](devpod.sh) or any other dev container environment to create a development environment with dependencies such as Node, NPM, aws-cli, aws-cdk, kubectl, helm dependencies for your local development with `cdk-eks-blueprints-patterns` solution. + ### RHEL Setup Follow the below steps to setup and leverage `eks-blueprints` and `eks-blueprints-patterns` in your Amazon Linux/CentOS/RHEL Linux machine. From 2e34fce0be9435975115193ee834f2730959452c Mon Sep 17 00:00:00 2001 From: Elamaran Shanmugam Date: Wed, 24 Apr 2024 16:05:11 -0400 Subject: [PATCH 3/4] Remove stale link --- docs/patterns/kubeflow.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/patterns/kubeflow.md b/docs/patterns/kubeflow.md index f9344447..6f5b5663 100644 --- a/docs/patterns/kubeflow.md +++ b/docs/patterns/kubeflow.md @@ -86,6 +86,3 @@ cdk destroy kubeflow-blueprint ## Disclaimer This pattern relies on an open source NPM package eks-blueprints-cdk-kubeflow-ext. Please refer to the package npm site for more information. https://www.npmjs.com/package/eks-blueprints-cdk-kubeflow-ext - -If you have any questions about the npm package or find any defect, please post in the source repo at -https://github.com/season1946/eks-blueprints-cdk-kubeflow-extension From d4df9f037bff88dadc60e45b43f35e756cd4517a Mon Sep 17 00:00:00 2001 From: Elamaran Shanmugam Date: Wed, 24 Apr 2024 16:57:23 -0400 Subject: [PATCH 4/4] Remove stale link --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c2f37d1e..745de4c6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,12 +8,12 @@ } }, "postCreateCommand": ".devcontainer/postCreateCommand.sh", - "workspaceFolder": "/home/vscode/cdk-eks-blueprints", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/cdk-eks-blueprints,type=bind", + "workspaceFolder": "/home/vscode/cdk-eks-blueprints-patterns", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/cdk-eks-blueprints-patterns,type=bind", "hostRequirements": { "cpus": 2 }, "remoteEnv": { - "PATH": "${containerEnv:PATH}:/home/vscode/cdk-eks-blueprints" + "PATH": "${containerEnv:PATH}:/home/vscode/cdk-eks-blueprints-patterns" } } \ No newline at end of file