diff --git a/README.md b/README.md index e9b48909..306c2407 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,38 @@ # AWS Observability Accelerator for CDK -Welcome to the AWS Observability Accelerator for CDK! +Welcome to the `AWS Observability Accelerator for CDK`! + +![GitHub](https://img.shields.io/github/license/aws-quickstart/cdk-eks-blueprints) +![Build](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiTWxBQzVUcTBvdSsvbE9mR0ZWeTJjbi96OUpBREorSG51UjMzQ1UyNXdmUzZ2dUJoTkhIODFJWjN2QjRGcnhWS0pYLzFQRU5uOThiUEp1WjEzS0htbUpVPSIsIml2UGFyYW1ldGVyU3BlYyI6IlRkUFRoTWtjdElBMkR5NEMiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main) The AWS Observability Accelerator for CDK is a set of opinionated modules to help you set up observability for your AWS environments with AWS Native services and AWS-managed observability services such as Amazon Managed Service for Prometheus,Amazon Managed Grafana, AWS Distro for OpenTelemetry (ADOT) and Amazon CloudWatch. -We provide curated metrics, logs, traces collection, cloudwatch dashboard, alerting rules and Grafana dashboards for your EKS infrastructure, Java/JMX, NGINX based workloads and your custom applications. +AWS Observability Accelerator for CDK provides patterns with: + +- [x] Curated metrics with CloudWatch Container Insights +- [x] Curated metrics with ADOT and Amazon Service for Prometheus Exporter +- [x] Logs using FluentBit and ADOT Exporter +- [x] Traces collection with XRAY Daemon +- [x] Traces collection with ADOT XRAY Exporter +- [x] Amazon Cloudwatch dashboards +- [x] Amazon Managed Grafana Dashboards +- [x] Amazon Managed Service for Prometheus - Alerting rules +- [x] Amazon Managed Service for Prometheus - Recording rules +- [x] GPU Infrastructure and Workload monitoring +- [x] Java/JMX Workload monitoring +- [x] NGINX monitoring +- [x] Istio Service Mesh monitoring +- [x] ADOT Collector monitoring +- [x] Cost monitoring (Coming Soon!) ## Single EKS Cluster AWS Native Observability Accelerator -![AWSNative-Architecture](https://github.com/aws-observability/cdk-aws-observability-accelerator/blob/main/docs/images/cloud-native-arch.png?raw=true) +![AWSNative-Architecture](./docs/images/cloud-native-architecture.png) ## Single EKS Cluster Open Source Observability Accelerator -![OpenSource-Architecture](https://raw.githubusercontent.com/aws-observability/cdk-aws-observability-accelerator/811ec42307d41f35f2fec95f2f2b8a20bddc7646/docs/images/CDK_Architecture_diagram.png) +![OpenSource-Architecture](./docs/images/oss-architecture.png) ## Patterns diff --git a/docs/images/cloud-native-architecture.png b/docs/images/cloud-native-architecture.png new file mode 100644 index 00000000..1cfe38a9 Binary files /dev/null and b/docs/images/cloud-native-architecture.png differ diff --git a/docs/images/oss-architecture.png b/docs/images/oss-architecture.png new file mode 100644 index 00000000..0f7372f7 Binary files /dev/null and b/docs/images/oss-architecture.png differ diff --git a/lib/common/resources/otel-collector-config.yml b/lib/common/resources/otel-collector-config.yml index 14b76d04..179b49d5 100644 --- a/lib/common/resources/otel-collector-config.yml +++ b/lib/common/resources/otel-collector-config.yml @@ -44,7 +44,7 @@ spec: external_labels: cluster: "{{clusterName}}" scrape_configs: - {{ start enableAdotMetricsCollectionJob}} + {{ start enableAdotMetricsCollectionJob }} - job_name: otel-collector-metrics scrape_interval: 10s static_configs: diff --git a/lib/existing-eks-opensource-observability-pattern/index.ts b/lib/existing-eks-opensource-observability-pattern/index.ts index 923630c2..1a137282 100644 --- a/lib/existing-eks-opensource-observability-pattern/index.ts +++ b/lib/existing-eks-opensource-observability-pattern/index.ts @@ -7,8 +7,6 @@ import { ObservabilityBuilder } from '@aws-quickstart/eks-blueprints'; import * as cdk from "aws-cdk-lib"; import * as eks from 'aws-cdk-lib/aws-eks'; import * as fs from 'fs'; -import { IstioIngressGatewayHelmAddon } from '../single-new-eks-opensource-observability-pattern/istio/istioIngressGatewayAddon'; -import { IstioCniHelmAddon } from '../single-new-eks-opensource-observability-pattern/istio/istiocniAddon'; export default class ExistingEksOpenSourceobservabilityPattern { async buildAsync(scope: cdk.App, id: string) { @@ -88,7 +86,7 @@ export default class ExistingEksOpenSourceobservabilityPattern { ); doc = utils.changeTextBetweenTokens( doc, - "{{ start enableAdotMetricsCollectionJob}}", + "{{ start enableAdotMetricsCollectionJob }}", "{{ stop enableAdotMetricsCollectionJob }}", jsonStringnew.context["adotcollectormetrics.pattern.enabled"] ); @@ -169,8 +167,13 @@ export default class ExistingEksOpenSourceobservabilityPattern { addOns.push(new blueprints.addons.IstioControlPlaneAddOn({ version: "1.18.2" })); - addOns.push(new IstioIngressGatewayHelmAddon); - addOns.push(new IstioCniHelmAddon); + addOns.push(new blueprints.addons.IstioIngressGatewayAddon({ + version: "1.18.2" + })); + + addOns.push(new blueprints.addons.IstioCniAddon({ + version: "1.18.2" + })); } ObservabilityBuilder.builder() diff --git a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts index 5a95ad70..a14bb1a5 100644 --- a/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts +++ b/lib/single-new-eks-awsnative-fargate-observability-construct/index.ts @@ -39,7 +39,7 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider : blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("1.28") + version: eks.KubernetesVersion.V1_29 }); const certManagerAddOnProps : blueprints.CertManagerAddOnProps = { @@ -50,7 +50,6 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct { }; const coreDnsAddOnProps : blueprints.CoreDnsAddOnProps = { - version:"v1.10.1-eksbuild.6", configurationValues:{ computeType: "Fargate" } diff --git a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts index 897588c9..4e57461a 100644 --- a/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts +++ b/lib/single-new-eks-fargate-opensource-observability-pattern/index.ts @@ -60,7 +60,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { ); doc = utils.changeTextBetweenTokens( doc, - "{{ start enableAdotMetricsCollectionJob}}", + "{{ start enableAdotMetricsCollectionJob }}", "{{ stop enableAdotMetricsCollectionJob }}", jsonStringnew.context["adotcollectormetrics.pattern.enabled"] ); @@ -122,8 +122,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { Reflect.defineMetadata("ordered", true, blueprints.addons.GrafanaOperatorAddon); const addOns: Array = [ new blueprints.addons.VpcCniAddOn(), - new blueprints.addons.CoreDnsAddOn({ - version: "v1.10.1-eksbuild.6", + new blueprints.addons.CoreDnsAddOn("auto",{ configurationValues: { computeType: "Fargate" } }), new blueprints.addons.KubeProxyAddOn(), @@ -172,7 +171,7 @@ export default class SingleNewEksFargateOpenSourceObservabilityConstruct { // Define fargate cluster provider and pass the profile options const fargateClusterProvider: blueprints.FargateClusterProvider = new blueprints.FargateClusterProvider({ fargateProfiles, - version: eks.KubernetesVersion.of("1.28"), + version: eks.KubernetesVersion.V1_29 }); diff --git a/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts b/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts index b3df4473..db1b86b5 100644 --- a/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts +++ b/lib/single-new-eks-opensource-observability-pattern/graviton-index.ts @@ -7,8 +7,6 @@ import * as eks from 'aws-cdk-lib/aws-eks'; import * as ec2 from 'aws-cdk-lib/aws-ec2'; import { ObservabilityBuilder } from '@aws-quickstart/eks-blueprints'; import * as fs from 'fs'; -import { IstioIngressGatewayHelmAddon } from './istio/istioIngressGatewayAddon'; -import { IstioCniHelmAddon } from './istio/istiocniAddon'; export default class SingleNewEksGravitonOpenSourceObservabilityPattern { constructor(scope: Construct, id: string) { @@ -69,7 +67,7 @@ export default class SingleNewEksGravitonOpenSourceObservabilityPattern { ); doc = utils.changeTextBetweenTokens( doc, - "{{ start enableAdotMetricsCollectionJob}}", + "{{ start enableAdotMetricsCollectionJob }}", "{{ stop enableAdotMetricsCollectionJob }}", jsonStringnew.context["adotcollectormetrics.pattern.enabled"] ); @@ -170,12 +168,17 @@ export default class SingleNewEksGravitonOpenSourceObservabilityPattern { addOns.push(new blueprints.addons.IstioControlPlaneAddOn({ version: "1.18.2" })); - addOns.push(new IstioIngressGatewayHelmAddon); - addOns.push(new IstioCniHelmAddon); + addOns.push(new blueprints.addons.IstioIngressGatewayAddon({ + version: "1.18.2" + })); + + addOns.push(new blueprints.addons.IstioCniAddon({ + version: "1.18.2" + })); } const mngProps: blueprints.MngClusterProviderProps = { - version: eks.KubernetesVersion.of("1.27"), + version: eks.KubernetesVersion.V1_29, instanceTypes: [new ec2.InstanceType("m7g.large")], amiType: eks.NodegroupAmiType.AL2_ARM_64, desiredSize: 2, diff --git a/lib/single-new-eks-opensource-observability-pattern/index.ts b/lib/single-new-eks-opensource-observability-pattern/index.ts index 1cd739b2..29b3402c 100644 --- a/lib/single-new-eks-opensource-observability-pattern/index.ts +++ b/lib/single-new-eks-opensource-observability-pattern/index.ts @@ -7,8 +7,6 @@ import * as ec2 from 'aws-cdk-lib/aws-ec2'; import * as amp from 'aws-cdk-lib/aws-aps'; import { ObservabilityBuilder } from '@aws-quickstart/eks-blueprints'; import * as fs from 'fs'; -import { IstioIngressGatewayHelmAddon } from './istio/istioIngressGatewayAddon'; -import { IstioCniHelmAddon } from './istio/istiocniAddon'; export default class SingleNewEksOpenSourceobservabilityPattern { constructor(scope: Construct, id: string) { @@ -72,7 +70,7 @@ export default class SingleNewEksOpenSourceobservabilityPattern { ); doc = utils.changeTextBetweenTokens( doc, - "{{ start enableAdotMetricsCollectionJob}}", + "{{ start enableAdotMetricsCollectionJob }}", "{{ stop enableAdotMetricsCollectionJob }}", jsonStringnew.context["adotcollectormetrics.pattern.enabled"] ); @@ -173,12 +171,17 @@ export default class SingleNewEksOpenSourceobservabilityPattern { addOns.push(new blueprints.addons.IstioControlPlaneAddOn({ version: "1.18.2" })); - addOns.push(new IstioIngressGatewayHelmAddon); - addOns.push(new IstioCniHelmAddon); + addOns.push(new blueprints.addons.IstioIngressGatewayAddon({ + version: "1.18.2" + })); + + addOns.push(new blueprints.addons.IstioCniAddon({ + version: "1.18.2" + })); } const mngProps: blueprints.MngClusterProviderProps = { - version: eks.KubernetesVersion.of("1.28"), + version: eks.KubernetesVersion.V1_29, instanceTypes: [new ec2.InstanceType("m5.2xlarge")], amiType: eks.NodegroupAmiType.AL2_X86_64, desiredSize: 2, diff --git a/lib/single-new-eks-opensource-observability-pattern/istio/istioIngressGatewayAddon.ts b/lib/single-new-eks-opensource-observability-pattern/istio/istioIngressGatewayAddon.ts deleted file mode 100644 index 3387ccbd..00000000 --- a/lib/single-new-eks-opensource-observability-pattern/istio/istioIngressGatewayAddon.ts +++ /dev/null @@ -1,26 +0,0 @@ -import 'source-map-support/register'; -import * as blueprints from '@aws-quickstart/eks-blueprints'; -import { Construct } from 'constructs'; -import { dependable } from '@aws-quickstart/eks-blueprints/dist/utils'; - -const defaultProps: blueprints.HelmAddOnProps = { - name: 'istio-ingressgateway', - release: 'ingressgateway', - namespace: 'istio-system', - chart: 'gateway', - version: '1.18.2', - repository: 'https://istio-release.storage.googleapis.com/charts', - values: {}, -}; - -export class IstioIngressGatewayHelmAddon extends blueprints.HelmAddOn { - - constructor() { - super({...defaultProps}); - } - @dependable(blueprints.addons.IstioBaseAddOn.name,blueprints.addons.IstioControlPlaneAddOn.name) - deploy(clusterInfo: blueprints.ClusterInfo): void | Promise { - const chart = this.addHelmChart(clusterInfo, this.props.values); - return Promise.resolve(chart); - } -} \ No newline at end of file diff --git a/lib/single-new-eks-opensource-observability-pattern/istio/istiocniAddon.ts b/lib/single-new-eks-opensource-observability-pattern/istio/istiocniAddon.ts deleted file mode 100644 index 30aae5b6..00000000 --- a/lib/single-new-eks-opensource-observability-pattern/istio/istiocniAddon.ts +++ /dev/null @@ -1,26 +0,0 @@ -import 'source-map-support/register'; -import * as blueprints from '@aws-quickstart/eks-blueprints'; -import { Construct } from 'constructs'; -import { dependable } from '@aws-quickstart/eks-blueprints/dist/utils'; - -const defaultProps: blueprints.HelmAddOnProps = { - name: 'istio-cni', - release: 'cni', - namespace: 'istio-system', - chart: 'cni', - version: '1.18.2', - repository: 'https://istio-release.storage.googleapis.com/charts', - values: {}, -}; - -export class IstioCniHelmAddon extends blueprints.HelmAddOn { - - constructor() { - super({...defaultProps}); - } - @dependable(blueprints.addons.IstioBaseAddOn.name,blueprints.addons.IstioControlPlaneAddOn.name) - deploy(clusterInfo: blueprints.ClusterInfo): void | Promise { - const chart = this.addHelmChart(clusterInfo, this.props.values); - return Promise.resolve(chart); - } -} \ No newline at end of file diff --git a/package.json b/package.json index 36567de9..f1f29c5d 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,12 @@ "lint": "npx eslint . --ext .js,.jsx,.ts,.tsx" }, "devDependencies": { - "@aws-quickstart/eks-blueprints": "^1.13.1", + "@aws-quickstart/eks-blueprints": "1.14.1", "@types/jest": "^29.5.11", "@types/node": "^20.10.4", "@typescript-eslint/eslint-plugin": "^6.14.0", "@typescript-eslint/parser": "^6.14.0", - "aws-cdk": "2.114.1", + "aws-cdk": "2.133.0", "copyfiles": "^2.4.1", "eslint": "^8.55.0", "jest": "^29.7.0", @@ -24,16 +24,16 @@ "typescript": "^5.3.3" }, "dependencies": { - "@aws-quickstart/eks-blueprints": "^1.13.1", - "aws-cdk": "2.114.1", + "@aws-quickstart/eks-blueprints": "1.14.1", + "aws-cdk": "2.133.0", "aws-sdk": "^2.1455.0", "constructs": "^10.3.0", "eks-blueprints-cdk-kubeflow-ext": "0.1.9", "source-map-support": "^0.5.21" }, "overrides": { - "@aws-quickstart/eks-blueprints": "^1.13.1", - "aws-cdk": "2.114.1", + "@aws-quickstart/eks-blueprints": "1.14.1", + "aws-cdk": "2.133.0", "xml2js": "0.5.0" } } \ No newline at end of file