This repository has been archived by the owner on Aug 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 675ff07
Showing
6 changed files
with
1,321 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
errors | ||
cdk.out | ||
cdk.context.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"app": "npx ts-node main.ts", | ||
"context": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import * as blueprints from '@aws-quickstart/eks-blueprints'; | ||
import { GlobalResources, utils, ImportHostedZoneProvider} from '@aws-quickstart/eks-blueprints'; | ||
import { Construct } from 'constructs'; | ||
//import * as team from '../teams'; | ||
|
||
const burnhamManifestDir = './lib/teams/team-burnham/' | ||
const rikerManifestDir = './lib/teams/team-riker/' | ||
//const teamManifestDirList = [burnhamManifestDir, rikerManifestDir] | ||
|
||
const accountID = process.env.CDK_DEFAULT_ACCOUNT!; | ||
const gitUrl = 'https://github.com/aws-samples/eks-blueprints-workloads.git'; | ||
|
||
|
||
/** | ||
* See docs/patterns/nginx.md for mode details on the setup. | ||
*/ | ||
export default class DevCluster { | ||
|
||
async buildAsync(scope: Construct, id: string) { | ||
/* | ||
const teams: Array<blueprints.Team> = [ | ||
new team.TeamPlatform(accountID), | ||
new team.TeamTroiSetup, | ||
new team.TeamRikerSetup(scope, teamManifestDirList[1]), | ||
new team.TeamBurnhamSetup(scope, teamManifestDirList[0]) | ||
]; | ||
*/ | ||
|
||
const subdomain: string = utils.valueFromContext(scope, "dev.marketplace", "sys.garden"); | ||
|
||
blueprints.HelmAddOn.validateHelmVersions = false; | ||
|
||
await blueprints.EksBlueprint.builder() | ||
.account("049586690729") | ||
.region("eu-central-1") | ||
//.teams(...teams) | ||
.resourceProvider(GlobalResources.HostedZone ,new ImportHostedZoneProvider('Z028702323WOQ31QJAJJP', subdomain)) | ||
.resourceProvider(GlobalResources.Certificate, new blueprints.CreateCertificateProvider('wildcard-cert', `*.${subdomain}`, "dev.marketplace.sys.garden")) | ||
.addOns( | ||
new blueprints.VpcCniAddOn(), | ||
new blueprints.CoreDnsAddOn(), | ||
new blueprints.CertManagerAddOn, | ||
new blueprints.AwsLoadBalancerControllerAddOn, | ||
new blueprints.ExternalDnsAddOn({ | ||
hostedZoneResources: [blueprints.GlobalResources.HostedZone] // you can add more if you register resource providers | ||
}), | ||
new blueprints.NginxAddOn({ | ||
internetFacing: true, | ||
backendProtocol: "tcp", | ||
externalDnsHostname: subdomain, | ||
crossZoneEnabled: false, | ||
certificateResourceName: GlobalResources.Certificate | ||
}), | ||
new blueprints.SecretsStoreAddOn({ rotationPollInterval: "120s" }), | ||
new blueprints.ClusterAutoScalerAddOn) | ||
.buildAsync(scope, `${id}-blueprint`); | ||
|
||
blueprints.HelmAddOn.validateHelmVersions = false; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as cdk from 'aws-cdk-lib'; | ||
import { logger } from '@aws-quickstart/eks-blueprints/dist/utils'; | ||
import { HelmAddOn } from '@aws-quickstart/eks-blueprints'; | ||
|
||
const app = new cdk.App(); | ||
const account = "049586690729"; | ||
const region = "eu-central-1"; | ||
const env: cdk.Environment = { account: account, region: region }; | ||
HelmAddOn.validateHelmVersions = false; | ||
|
||
import DevCluster from './cluster'; | ||
new DevCluster().buildAsync(app, 'dev-cluster').catch(() => { | ||
logger.info("Error setting up dev cluster"); | ||
}); |
Oops, something went wrong.