{"id":21889472,"url":"https://github.com/shapirov103/cdk-eks-blueprint","last_synced_at":"2025-04-15T11:24:42.397Z","repository":{"id":51255450,"uuid":"304149741","full_name":"shapirov103/cdk-eks-blueprint","owner":"shapirov103","description":" repo for CDK Software Factory","archived":false,"fork":false,"pushed_at":"2023-04-24T15:23:16.000Z","size":520,"stargazers_count":11,"open_issues_count":77,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-13T14:50:36.691Z","etag":null,"topics":["aws-eks","cdk","cdk-eks-blueprint","pipeline-bootstrapping"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shapirov103.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-14T22:26:14.000Z","updated_at":"2023-04-24T15:23:21.000Z","dependencies_parsed_at":"2024-11-28T11:39:04.550Z","dependency_job_id":null,"html_url":"https://github.com/shapirov103/cdk-eks-blueprint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapirov103%2Fcdk-eks-blueprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapirov103%2Fcdk-eks-blueprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapirov103%2Fcdk-eks-blueprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapirov103%2Fcdk-eks-blueprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shapirov103","download_url":"https://codeload.github.com/shapirov103/cdk-eks-blueprint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249059499,"owners_count":21206162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-eks","cdk","cdk-eks-blueprint","pipeline-bootstrapping"],"created_at":"2024-11-28T11:24:31.868Z","updated_at":"2025-04-15T11:24:42.364Z","avatar_url":"https://github.com/shapirov103.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e :warning: **This project has been moved over to [AWS Quickstart repository](https://github.com/aws-quickstart/quickstart-ssp-amazon-eks). All new updates are applied to the new repo.**\n\n### Project setup\n\nCreate a new CDK project. We use `typescript` for this example. \n\n```bash\ncdk init app --language typescript\n```\n\nBootstrap your environment. For more information see Bootstrapping below.  \n\n```bash\ncdk bootstrap aws://\u003cAWS_ACCOUNT_ID\u003e/\u003cAWS_REGION\u003e\n```\n\n### Usage\n\nAdd the `cdk-eks-blueprint` library as as a dependency to your CDK project. \n\n```json\n\"dependencies\": {\n  \"@shapirov/cdk-eks-blueprint\": \"0.1.6\"\n}\n```\n\nRun the following command to install the dependency to your local npm package manager - \n```\nnpm i @shapirov/cdk-eks-blueprint\n```\n\nReplace the contents of `bin/\u003cyour-main-file\u003e.ts` (where `your-main-file` by default is the name of the root project directory) with the following:\n\n```typescript\nimport 'source-map-support/register';\nimport * as cdk from '@aws-cdk/core';\nimport {\n    CdkEksBlueprintStack, \n    ArgoCDAddOn,\n    MetricsServerAddon, \n    ClusterAutoScaler, \n    ContainerInsightsAddOn, \n    NginxAddon, \n    CalicoNetworkPolicyAddon, \n    ClusterAddOn\n}  from '@shapirov/cdk-eks-blueprint';\n\nconst addOns: Array\u003cClusterAddOn\u003e = [\n  new ArgoCDAddOn,\n  new MetricsServerAddon,\n  new ClusterAutoScaler,\n  new ContainerInsightsAddOn,\n  new NginxAddon, \n  new CalicoNetworkPolicyAddon,\n];\n\nconst app = new cdk.App();\nnew CdkEksBlueprintStack(app, {id: 'east-test-1', addOns: addOns, teams: []}, {\n  env: {\n      account: 'XXXXXXXXXXXX',\n      region: 'us-east-2'\n  },\n});\n```\n\nRun the following command to confirm there are no issues with our code\n\n```\nnpm run build \n```\n\nIf there are no errors you should see the following\n```\n\u003e eks-factory-test@0.1.0 build\n\u003e tsc\n```\n\nDeploy the stack using the following command\n\n```\ncdk deploy\n```\n\n### Stack Configuration\n\nSupports context variables (specify in cdk.json, cdk.context.json or pass with -c command line option):\n\n- `instanceType`: (defaulted to \"t3.medium\") Type of instance for the EKS cluster, must be a valid instance type like t3.medium\n- `vpc`: Specifies whether to use an existing VPC (if specified) or create a new one if not specified.\n- `minSize`: Min cluster size, must be positive integer greater than 0 (default 1).\n- `maxSize`: Max cluster size, must be greater than minSize.\n- `vpcSubnets`: List of VPC subnets for cluster provisioning (unsupported yet)\n\n### Updating Clusters\n\n// Todo - Add\n\n### Upgrading Clusters\n\n// Todo - Add\n\n## Solution Details\n\n### Shared Services Platform\n\nA Shared Services Platform (SSP) is an interenal development platform that abstracts the complexities of cloud infrastrucuture from developers, and allows them to deploy workloads with ease. As SSP is typically composed of multiple AWS or open source products and services, including services for running containers, CI/CD pipelines, capturing logs/metrics, and security enforcement. The SSP packages these tools into a cohesive whole and makes them available to development teams via a simplified interface, typically a CLI, GUI, Git, or, manifest file. \n\n### Reference Architecture goals.\n\nThe goal of this project is to provide a reference implementation of a Shared Services Platform (SSP) built on top of EKS. At present the implementation provides the following functionality:\n\n  * **Cluster Management** - Provision one or many EKS clusters across one or many regions.\n  * **Add-ons** A modular approach to configuring the clusters with suite of add-ons or plugins that are needed to run workloads in a Kubernetes environment. \n    * **Custom Add-ons** Add your own add-ons by implementing a `ClusterAddon` SPI (to be extended for lifecycle management). \n  * **Tenant Onboarding** Seamless onboarding of tenants/workloads onto specific clusters via CDK configuration and Gitops.\n\n### Supported Addons\n\n| AddOn             | Description                                                                       |\n|-------------------|-----------------------------------------------------------------------------------|\n| `AppMeshAddon`           | Adds an AppMesh controller and CRDs (pending validation on the latest version of CDK) |\n| `ArgoCDAddon`            | Adds an ArgoCD controller |\n| `CalicoAddon`            | Adds the Calico 1.7.1 CNI/Network policy engine |\n| `CloudWatchAddon`        | Adds Container Insights support integrating monitoring with CloudWatch |\n| [`ClusterAutoscalerAddon`](./docs/addons/cluster-autoscaler.md) | Adds the standard cluster autoscaler ([Karpenter](https://github.com/awslabs/karpenter) is coming)|\n| `MetricsServerAddon`| Adds metrics server (pre-req for HPA and other monitoring tools)|\n| `NginxAddon`        | Adds NGINX ingress controller |\n\n### EKS Cluster Management \n\n// Todo - Add\n\n### Configuring Add-ons \n\n// Todo - Add\n\n### Creating an Add-on\n\n// Todo - Add\n\n### Onboarding Tenants\n\nIn the most generic cases clients are expected to supply implementation of the `TeamSetup` interface.\nSupport for teams configuration and authentication both for 'kubectl` access as well as console access is described in [Teams](docs/teams.md) documentation.\n\n\n### CI/CD\n\n## IaC Pipeline\n\n(work in progress)\n\nExample of IaC self-mutating pipeline based on CodePipeline can be found in the `lib/pipelineStack.ts`.\n\n## Bootstrapping\n\nEach combination of target account and region must be bootstrapped prior to deploying stacks.\nBootstrapping is an process of creating IAM roles and lambda functions that can execute some of the common CDK constructs.\n\nExample: \n```   \n  cdk bootstrap aws://\u003cAWS_ACCOUNT_ID\u003e/us-east-1\n```\nIn addition to the regular [environment bootstrapping](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html) pipeline bootstrapping for pipelines requires a new style of bootstrapping. Set `AWS_ACCOUNT` environment to your account and execute (with account admin privileges) the command in bootstrap-pipeline.sh.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshapirov103%2Fcdk-eks-blueprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshapirov103%2Fcdk-eks-blueprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshapirov103%2Fcdk-eks-blueprint/lists"}