Configuring teams

Configure groups

  1. In the previous section, we created both Applications and Platform team templates.

    • Add the following code to the template // lib/pipeline.ts
// lib/pipeline.ts
import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as blueprints from '@aws-quickstart/eks-blueprints';
import { KubernetesVersion } from 'aws-cdk-lib/aws-eks';

import { TeamPlatform, TeamApplication } from '../teams'; // HERE WE IMPORT TEAMS

export default class PipelineConstruct extends Construct {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id)

    const account = props?.env?.account!;
    const region = props?.env?.region!;

    const blueprint = blueprints.EksBlueprint.builder()
      .account(account)
      .region(region)
      .clusterProvider(
        new blueprints.GenericClusterProvider({
          version: 'auto',
        })
      )
      .addOns()
      .teams(new TeamPlatform(account), new TeamApplication('burnham',account)); // HERE WE USE TEAMS

    blueprints.CodePipelineStack.builder()
      .name("eks-blueprints-workshop-pipeline")
      .owner("your-github-username")
      .repository({
          repoUrl: 'your-repo-name',
          credentialsSecretName: 'github-token',
          targetRevision: 'main'
      })
      .wave({
        id: "envs",
        stages: [
          { id: "dev", stackBuilder: blueprint.clone('ap-southeast-1') }
        ]
      })
      .build(scope, id + '-stack', props);
  }
}

Deployment Pipeline

  1. Push changes to remote repository Github
cd ..
git add .
git commit -m "adding teams"
git push https://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@github.com/AWS-First-Cloud-Journey/my-eks-blueprints.git

Deployment Pipeline

  1. Wait about 15 minutes for Succeeded

Deployment Pipeline

  1. Successfully deployed Deployment Pipeline

  2. Perform test

kubectl get ns
  • You will notice that team-burnham is in namespace

Deployment Pipeline