Skip to content

feat: parallelize EKS integ pipeline, extract shared Jenkins functions, fix public domain access policy - #2678

Merged
AndreKurait merged 4 commits into
mainfrom
public-aos-parallel-bootstrap
Apr 14, 2026
Merged

AndreKurait merged 4 commits into
mainfrom
public-aos-parallel-bootstrap

Conversation

@AndreKurait

@AndreKurait AndreKurait commented Apr 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Deploys AOS domains as public (internet-facing) endpoints so they no longer share a VPC with the EKS cluster. This eliminates the sequential dependency between cluster deployment and MA bootstrap, running both deploy and cleanup in parallel. Also extracts 4 shared Jenkins library functions, adds a --kubectl-context flag to the bootstrap script, and fixes the access policy for public domains to use account-scoped SigV4 instead of open access.

Before

graph LR
    A[Checkout] --> B[Build]
    B --> C["Deploy Clusters<br/>(CDK: VPC + AOS)<br/>~25 min"]
    C --> D["Bootstrap MA<br/>(import VPC)<br/>~25 min"]
    D --> E[Setup]
    E --> F[Tests]
    F --> G["CDK Destroy<br/>~15 min"]
    G --> H["Delete MA Stack<br/>~15 min"]
    style C fill:#f96
    style D fill:#f96
    style G fill:#f96
    style H fill:#f96
Loading

After

graph LR
    A[Checkout] --> B[Build]
    B --> C["Deploy Clusters<br/>(public AOS, no VPC)"]
    B --> D["Bootstrap MA<br/>(create-vpc-cfn)"]
    C --> E[Setup]
    D --> E
    E --> F[Tests]
    F --> G[CDK Destroy]
    F --> H[Delete MA Stack]
    style C fill:#6c6
    style D fill:#6c6
    style G fill:#6c6
    style H fill:#6c6
Loading

New Shared Jenkins Functions

Function Replaces Used by
withMigrationsTestAccount 15+ copies of withCredentials + withAWS wrapper eksInteg, eksBYOS, eksAOSS, deployClustersStep
bootstrapMA ~30-line bootstrap + export parsing block eksInteg, eksBYOS, eksAOSS
parseCfnExports ~15-line CFN export string parsing eksInteg, eksBYOS, eksAOSS (via bootstrapMA)
expandVersionString Duplicated static method eksInteg, eksBYOS

All shared functions validate required parameters and fail with clear error messages.

All Changes

File Change
test/awsDeployCluster.sh Bump sample CDK to v0.3.10
deployment/k8s/aws/aws-bootstrap.sh Add --kubectl-context flag, add -x test to cdkSynthMinified gradle call
vars/withMigrationsTestAccount.groovy New — shared credentials/role wrapper
vars/bootstrapMA.groovy New — shared bootstrap deploy + export capture
vars/parseCfnExports.groovy New — shared CFN export parsing
vars/expandVersionString.groovy New — shared version string expansion
vars/deployClustersStep.groovy Use withMigrationsTestAccount, account-scoped SigV4 policy for public domains
vars/eksIntegPipeline.groovy Parallelize deploy+bootstrap and cleanup, use all shared functions, skipTestImages
vars/eksBYOSIntegPipeline.groovy Use withMigrationsTestAccount, bootstrapMA, expandVersionString
vars/eksAOSSIntegPipeline.groovy Use withMigrationsTestAccount, bootstrapMA, skipTestImages

Key Fixes

  • Public domain access policy: Public AOS domains now use an account-scoped SigV4 access policy (arn:aws:iam::<account>:root) instead of openAccessPolicyEnabled which AWS rejects on public domains
  • kubectl context: bootstrapMA passes --kubectl-context to the bootstrap script — single source of truth instead of convention-based name alignment
  • Skip test images: All EKS pipelines now pass skipTestImages: true to avoid building test-only Docker images
  • Skip tests in CDK synth: Added -x test to the cdkSynthMinified gradle call in the bootstrap script

Impact

  • ~50% faster infra provisioning — parallel deploy
  • ~50% faster cleanup — parallel teardown
  • Eliminates DELETE_FAILED cascade — no shared VPC
  • -13 net lines (345 added in shared functions + fixes, 358 removed from pipelines)

@codecov

codecov Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.55%. Comparing base (b27788c) to head (9a4c5b6).
⚠️ Report is 105 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2678      +/-   ##
============================================
- Coverage     72.60%   72.55%   -0.05%     
  Complexity       90       90              
============================================
  Files           711      711              
  Lines         33058    33058              
  Branches       2842     2839       -3     
============================================
- Hits          24002    23986      -16     
- Misses         7778     7793      +15     
- Partials       1278     1279       +1     
Flag Coverage Δ
gradle 68.80% <ø> (-0.08%) ⬇️
node 92.64% <ø> (ø)
python 76.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AndreKurait
AndreKurait force-pushed the public-aos-parallel-bootstrap branch from dbcd1c1 to f1e5ddd Compare April 10, 2026 16:42
@AndreKurait
AndreKurait force-pushed the public-aos-parallel-bootstrap branch from f1e5ddd to e41f26e Compare April 10, 2026 16:54
@AndreKurait
AndreKurait force-pushed the public-aos-parallel-bootstrap branch from e41f26e to e566a01 Compare April 10, 2026 16:56
@AndreKurait
AndreKurait force-pushed the public-aos-parallel-bootstrap branch from e566a01 to 722db09 Compare April 10, 2026 16:57
@AndreKurait
AndreKurait force-pushed the public-aos-parallel-bootstrap branch from 722db09 to b661ac5 Compare April 10, 2026 17:16
@AndreKurait
AndreKurait force-pushed the public-aos-parallel-bootstrap branch from b661ac5 to 41aac29 Compare April 10, 2026 17:20
…eline

Deploy AOS domains as public (internet-facing) endpoints so they no
longer share a VPC with the EKS cluster. This eliminates the sequential
dependency between 'Deploy Clusters' and 'Deploy & Bootstrap MA',
running them in parallel and cutting infrastructure provisioning time
roughly in half.

Changes:
- awsDeployCluster.sh: bump sample CDK to v0.3.9 (publicAccess support)
- deployClustersStep.groovy: pass publicAccess to cluster configs
- eksIntegPipeline.groovy: parallelize deploy + bootstrap, switch from
  Import-VPC to Create-VPC CFN, remove SG cross-linking (not needed
  for public domains)
- Extract shared Jenkins functions:
  - parseCfnExports.groovy: CFN export string parsing (was duplicated
    in eksInteg, eksBYOS, eksAOSS)
  - expandVersionString.groovy: version string expansion (was duplicated
    in eksInteg, eksBYOS)
- Update eksBYOS and eksAOSS pipelines to use shared functions

Signed-off-by: Andre Kurait <[email protected]>
@AndreKurait
AndreKurait force-pushed the public-aos-parallel-bootstrap branch from a3c0743 to 138b88f Compare April 10, 2026 17:51
@AndreKurait AndreKurait added run-eks-byos-tests run-aoss-tests To trigger jenkins job runs for AOSS related pipelines from the "pr-checks/" folder run-cfn-tests To run deploy-cfn jobs from your PR labels Apr 10, 2026
Comment on lines 223 to 227
// 2. Clean up EKS resources (namespace, instance profiles, security groups)
eksCleanupStep(
stackName: env.STACK_NAME,
eksClusterName: eksClusterName
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eksCleanupStep defaults kubeContext to eksClusterName when not provided. But bootstrapMA sets env.eksKubeContext to "migration-eks-${maStageName}", which is different from the EKS cluster name

We should pass in kubeContext: env.eksKubeContext over here just like eksIntegPipeline and eksBYOSIntegPipeline

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed in d101c09 — now passing kubeContext: env.eksKubeContext to match the other pipelines.

AndreKurait and others added 2 commits April 13, 2026 17:23
eksCleanupStep defaults kubeContext to eksClusterName when not provided,
but bootstrapMA sets env.eksKubeContext to a different value. Pass it
explicitly to match eksIntegPipeline and eksBYOSIntegPipeline.

Signed-off-by: Andre Kurait <[email protected]>

Signed-off-by: Andre Kurait <[email protected]>

This branch had an error being deployed

1 failed deployment
migrations-cicd — 9a4c5b6c Deployed Apr 14, 2026 by AndreKurait via eks-aoss-vector-integ-test #7976
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-aoss-tests To trigger jenkins job runs for AOSS related pipelines from the "pr-checks/" folder run-cfn-tests To run deploy-cfn jobs from your PR run-eks-byos-tests run-eks-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants