Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 2.61 KB

README.md

File metadata and controls

52 lines (34 loc) · 2.61 KB

OpenSearch Build Artifact Stack

Deployment configuration for artifacts associated with the build, bundle, and test validation workflow.

Build Artifact System

While creating an OpenSearch distribution all of the OpenSearch components are built, then bundled together, and finally tested. The intermediate components should always be available for repeatability and to make sure that a build node death is recoverable.

System Diagram

Diagram Uml

Overall System

Artifacts should all be available via ci.opensearch.org to connect them via a single domain a CI instance specific identifier added to the url and traffic directed from the central CDN.

CDN Diagram

Diagram Uml

Getting Started

  • Requires an IAM Role for the context of the build agent
  • Requires NPM to be installed
  • Install CDK using npm install -g aws-cdk
  • Install project dependencies using npm install from this project directory
  • Configure aws credentials
  • Deploy with cdk deploy

Useful commands

  • npm run build compile typescript to js, run lint, run tests
  • npm run watch watch for changes and compile
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

Stack Deploy Details

Standard deployment for fresh accounts can be done with cdk deploy BuildArtifactDev --parameters buildAgentRoleArn=arn:aws:iam::336984078605:role/JenkinsStackDev-MainNodeInstanceRole6FA3C5C9-1PQFWOWDYN42U

If the account needs migration from the cloudformation script that was previously used, cdk deploy ExistingBuildArtifact --parameters buildAgentRoleArn={ROLE_ARN} --parameters buildBucketArn={BUCKET_ARN}. During that deployment the existing roles will be updated and there will be manual follow up steps, see the cloudformation output.

  • Parameters:
    • buildAgentPrincipleArn [string] The principle arn of the build agent
    • buildBucketArn [string] If there was an existing S3 bucket, the bucket name