Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Decorator for Architecture Type for all Addons and Graviton Builder Classes && Gen AI Builder and Team #846

Merged
merged 31 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e2a2fcc
Generative AI and Graviton Builder Classes
elamaran11 Sep 21, 2023
495ca4e
Adding support for Architectures
elamaran11 Sep 26, 2023
7322f48
Adding support for Architectures
elamaran11 Sep 26, 2023
0e09aaa
Adding support for Architectures
elamaran11 Sep 26, 2023
fefcab2
Adding support for Architectures
elamaran11 Sep 26, 2023
426ac8d
Adding support for Architectures - PR Issues
elamaran11 Sep 27, 2023
74e89c0
Adding support for Architectures - PR Issues
elamaran11 Sep 27, 2023
6ba7d09
Adding support for Architectures - PR Issues
elamaran11 Sep 27, 2023
d03cc3e
Adding support for Architectures - PR Issues
elamaran11 Sep 27, 2023
113fd4b
Changing to Class Decorator
elamaran11 Sep 28, 2023
94d1fbc
Generative AI and Graviton Builder Classes
elamaran11 Sep 28, 2023
ea75e7b
Generative AI and Graviton Builder Classes
elamaran11 Sep 29, 2023
f8979cf
Generative AI and Graviton Builder Classes
elamaran11 Sep 29, 2023
cb48788
Generative AI and Graviton Builder Classes
elamaran11 Sep 29, 2023
63c8012
Generative AI and Graviton Builder Classes - PR
elamaran11 Oct 2, 2023
fe166ea
Generative AI and Graviton Builder Classes - PR
elamaran11 Oct 3, 2023
57f2a8f
Generative AI and Graviton Builder Classes - PR
elamaran11 Oct 3, 2023
b096546
Removing Gen AI Builder class and doc
elamaran11 Oct 3, 2023
318efc0
Removing Gen AI Builder class and doc
elamaran11 Oct 3, 2023
d308154
Adding Gen AI Builder class and doc
elamaran11 Oct 3, 2023
cf0130f
Adding Gen AI Builder class and doc
elamaran11 Oct 3, 2023
8069405
Adding Gen AI Builder class and doc
elamaran11 Oct 3, 2023
f4f68ae
Adding Gen AI Builder class and doc
elamaran11 Oct 3, 2023
c0ffd50
Adding Gen AI Builder class and doc
elamaran11 Oct 3, 2023
fb01aac
Generative AI and Graviton Builder Classes
elamaran11 Oct 3, 2023
d84b9ab
Generative AI and Graviton Builder Classes PR Comments
elamaran11 Oct 4, 2023
571dbea
Generative AI and Graviton Builder Classes PR Comments
elamaran11 Oct 4, 2023
f48ffd8
Generative AI and Graviton Builder Classes PR Comments
elamaran11 Oct 4, 2023
1cdfec4
Generative AI and Graviton Builder Classes PR Comments
elamaran11 Oct 4, 2023
885f22c
PR Fix for addBedRockTeam()
elamaran11 Oct 5, 2023
78d12cb
Adding Gen AI Builder class and doc
elamaran11 Oct 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/builders/genai-builder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generative AI Builder

The `GenAIBuilder` allows you to get started with a builder class to configure required addons as you prepare a blueprint for setting up Generative AI EKS cluster.

The `GenAIBuilder` creates the following:

- An EKS Cluster` with passed k8s version and cluster tags.
- A nodegroup to schedule Gen AI workloads with parameters passed.

### Generative AI on EKS Cluster

The below usage helps you with a demonstration to use `GenAIBuilder` to setup required addons as you prepare a blueprint for setting up Generative AI on a new EKS cluster.

```typescript
import { Construct } from 'constructs';
import * as blueprints from '@aws-quickstart/eks-blueprints';
import { GenAIBuilder } from '@aws-quickstart/eks-blueprints';

export default class GenAIShowcase {
elamaran11 marked this conversation as resolved.
Show resolved Hide resolved
constructor(scope: Construct, id: string) {
const stackId = `${id}-genai-accelerator`;

const account = process.env.COA_ACCOUNT_ID! || process.env.CDK_DEFAULT_ACCOUNT!;
const region = process.env.COA_AWS_REGION! || process.env.CDK_DEFAULT_REGION!;
const genAITeam: blueprints.GenAITeam = {
namespace: 'bedrock',
createNamespace: true,
serviceAccountName: 'bedrock-service-account',
};

GenAIBuilder.builder()
.account(account)
.region(region)
.teams(new blueprints.GenAITeam(genAITeam))
.build(scope, stackId);
}
}
```
6 changes: 3 additions & 3 deletions docs/builders/gpu-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The `GpuBuilder` allows you to get started with a builder class to configure wit

The `GpuBuilder` creates the following:
- An EKS Cluster` with passed k8s version and cluster tags.
- A nodegroup to schedule windows workloads with parameters passed.
- A nodegroup to schedule GPU workloads with parameters passed.

## Input Parameters

Expand All @@ -13,7 +13,7 @@ The `GpuBuilder` creates the following:
- `kubernetesVersion` : Required field, Kubernetes version to use for the cluster
- `instanceClass`: Required field, Instance class to use for the cluster
- `instanceSize`: Required field, Instance size to use for the cluster
- `nodeRole`: optional, Node IAM Role to be attached to Windows and Non-windows nodes.
- `nodeRole`: optional, Node IAM Role to be attached to nodes.
- `gpuAmiType`: Required field, AMI Type for GPU Nodes. For example `AL2_X86_64_GPU`.
- `desiredNodeSize`: Optional field, Desired number of nodes to use for the cluster
- `minNodeSize`: Optional field, Minimum number of nodes to use for the cluster
Expand All @@ -24,7 +24,7 @@ The `GpuBuilder` creates the following:

### Demonstration - Running GPUs on EKS Cluster

The below usage helps you with a demonstration to use `GpuBuilder` to configure a required setup as you prepare a blueprint for setting up windows nodes on a new EKS cluster.
The below usage helps you with a demonstration to use `GpuBuilder` to configure a required setup as you prepare a blueprint for setting up GPU nodes on a new EKS cluster.

```typescript
import * as blueprints from "@aws-quickstart/eks-blueprints";
Expand Down
92 changes: 92 additions & 0 deletions docs/builders/graviton-builder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# GPU Builder

The `GravitonBuilder` allows you to get started with a builder class to configure with required setup as you prepare a blueprint for setting up EKS cluster with Graviton worker nodes to run your ARM64 workloads.

The `GravitonBuilder` creates the following:

- An EKS Cluster` with passed k8s version and cluster tags.
- A nodegroup to schedule ARM64 workloads with parameters passed.

## Input Parameters

`Partial<MngClusterProviderProps>` parameters can be used as inputs to `GravitonBuilder`. Few parameters shown below:

- `version` : Kubernetes version to use for the cluster
- `instanceTypes`: Instance Type to use for the cluster

### Demonstration - Running Graviton Nodes on EKS Cluster

The below usage helps you with a demonstration to use `GravitonBuilder` to configure a required setup as you prepare a blueprint for setting up Graviton nodes on a new EKS cluster.

```typescript
import * as blueprints from "@aws-quickstart/eks-blueprints";
import { GravitonBuilder } from "@aws-quickstart/eks-blueprints";
import { CfnWorkspace } from "aws-cdk-lib/aws-aps";
import * as ec2 from "aws-cdk-lib/aws-ec2";
import * as eks from "aws-cdk-lib/aws-eks";
import { Construct } from "constructs";

export default class GravitonConstruct {
build(scope: Construct, id: string) {
const account = process.env.CDK_DEFAULT_ACCOUNT!;
const region = process.env.CDK_DEFAULT_REGION!;
const stackID = `${id}-blueprint`;

const ampWorkspaceName = "graviton-amp-workspaces";
const ampWorkspace: CfnWorkspace =
blueprints.getNamedResource(ampWorkspaceName);

const options: Partial<blueprints.MngClusterProviderProps> = {
version: eks.KubernetesVersion.of("1.27"),
instanceTypes: [ec2.InstanceType.of(ec2.InstanceClass.M7G, ec2.InstanceSize.XLARGE)],
desiredSize: 3,
minSize: 2,
maxSize: 5,
};

GravitonBuilder.builder(options)
.account(account)
.region(region)
.resourceProvider(
blueprints.GlobalResources.Vpc,
new blueprints.VpcProvider()
)
.resourceProvider(
"efs-file-system",
new blueprints.CreateEfsFileSystemProvider({
name: "efs-file-systems",
})
)
.resourceProvider(
ampWorkspaceName,
new blueprints.CreateAmpProvider(
ampWorkspaceName,
ampWorkspaceName
)
)
.addOns(
new blueprints.addons.IstioBaseAddOn(),
new blueprints.addons.IstioControlPlaneAddOn(),
new blueprints.addons.KubeStateMetricsAddOn(),
new blueprints.addons.MetricsServerAddOn(),
new blueprints.addons.PrometheusNodeExporterAddOn(),
new blueprints.addons.ExternalsSecretsAddOn(),
new blueprints.addons.SecretsStoreAddOn(),
new blueprints.addons.CalicoOperatorAddOn(),
new blueprints.addons.CertManagerAddOn(),
new blueprints.addons.AdotCollectorAddOn(),
new blueprints.addons.AmpAddOn({
ampPrometheusEndpoint: ampWorkspace.attrPrometheusEndpoint
}),
new blueprints.addons.CloudWatchLogsAddon({
logGroupPrefix: "/aws/eks/graviton-blueprint",
}),
new blueprints.addons.EfsCsiDriverAddOn(),
new blueprints.addons.FluxCDAddOn(),
new blueprints.addons.GrafanaOperatorAddon(),
new blueprints.addons.XrayAdotAddOn()
)
.build(scope, stackID);
}
}
```
6 changes: 5 additions & 1 deletion docs/builders/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ The framework currently provides support for the following Builders:

| Builder | Description |
|-------------------|-----------------------------------------------------------------------------------|
| [`ObservabilityBuilder`](./observability-builder.md) | Allows you to get started with a builder class to configure required addons as you prepare a blueprint for setting up Observability on an existing EKS cluster or a new EKS cluster.
| [`GenAIBuilder`](./genai-builder.md) | The `GenAIBuilder` allows you to get started with a builder class to configure required addons as you prepare a blueprint for setting up Generative AI EKS cluster.
| [`GpuBuilder`](./gpu-builder.md) | The `GpuBuilder` allows you to get started with a builder class to configure with required setup as you prepare a blueprint for setting up EKS cluster with GPU Operator to run your GPU workloads.
| [`GravitonBuilder`](./graviton-builder.md) | The `GravitonBuilder` allows you to get started with a builder class to configure with required setup as you prepare a blueprint for setting up EKS cluster with Graviton worker nodes to run your ARM64 workloads.
| [`ObservabilityBuilder`](./observability-builder.md) | The `ObservabilityBuilder` allows you to get started with a builder class to configure required addons as you prepare a blueprint for setting up Observability on an existing EKS cluster or a new EKS cluster.
| [`WindowsBuilder`](./windows-builder.md) | The `WindowsBuilder` allows you to get started with a builder class to configure with required setup as you prepare a blueprint for setting up EKS cluster with windows to run your windows workloads.

Loading
Loading