Skip to content

Commit

Permalink
integ: validator image must support different platforms, linux vs win…
Browse files Browse the repository at this point in the history
…dows, arm vs amd

Signed-off-by: Wesley Pettit <[email protected]>
  • Loading branch information
PettitWesley committed Jun 16, 2023
1 parent 9fb760b commit 69366b1
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions buildspec_integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ phases:
commands:
# Enforce STS regional endpoints
- export AWS_STS_REGIONAL_ENDPOINTS=regional
- export CW_INTEG_VALIDATOR_IMAGE=${AWS_ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator:latest
- export S3_INTEG_VALIDATOR_IMAGE=${AWS_ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator:latest
- export CW_INTEG_VALIDATOR_IMAGE=${AWS_ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator
- export S3_INTEG_VALIDATOR_IMAGE=${AWS_ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator
# Get the default credentials and set as environment variables
- 'CREDS=`curl 169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`'
- 'export AWS_ACCESS_KEY_ID=`echo $CREDS | jq -r .AccessKeyId`'
Expand Down
4 changes: 2 additions & 2 deletions integ/run-integ.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ $env:FLUENT_BIT_IMAGE = $FluentBitImage
$env:TAG = -join ((65..90) + (97..122) | Get-Random -Count 10 | % {[char]$_})
# AWS_FOR_FLUENT_BIT_CONTAINER_NAME is the name for the fluent-bit container ran for each service.
$env:AWS_FOR_FLUENT_BIT_CONTAINER_NAME = "aws-for-fluent-bit-$($env:TAG)"
$env:CW_INTEG_VALIDATOR_IMAGE = "906394416424.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator:latest"
$env:S3_INTEG_VALIDATOR_IMAGE = "906394416424.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator:latest"
$env:CW_INTEG_VALIDATOR_IMAGE = "906394416424.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator-windows"
$env:S3_INTEG_VALIDATOR_IMAGE = "906394416424.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator-windows"

# Windows specific settings.
$env:ARCHITECTURE= "x86-64"
Expand Down
12 changes: 8 additions & 4 deletions integ/s3/updating_validator_image.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
## CW Validator Image
## S3 Validator Image

The S3 Validator image exists in our account as:

```
906394416424.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator:latest
906394416424.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator:arm64
906394416424.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator:x86_64
906394416424.dkr.ecr.us-west-2.amazonaws.com/s3-integ-validator-windows:x86_64
```

If we need to perform a change or dependency update, build the image and push it to the account with that name.

The image is set as an env var `S3_INTEG_VALIDATOR_IMAGE` in:
The base image URI is set as an env var `S3_INTEG_VALIDATOR_IMAGE` in:
- Linux: buildspec_integ.yml
- Windows: integ/run-integ.ps1
- Windows: run-integ.ps1

The tag is the value of `${ARCHITECTURE}`

The env var is used in the `docker-compose.validate-and-clean.yml` files for firehose, kinesis, and S3 tests.
2 changes: 1 addition & 1 deletion integ/test_cloudwatch/docker-compose.validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

services:
cloudwatch_validator:
image: ${CW_INTEG_VALIDATOR_IMAGE}
image: ${CW_INTEG_VALIDATOR_IMAGE}:${ARCHITECTURE}
environment:
- "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
- "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

services:
validate-s3:
image: ${S3_INTEG_VALIDATOR_IMAGE}
image: ${S3_INTEG_VALIDATOR_IMAGE}:${ARCHITECTURE}
environment:
- "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
- "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

services:
validate-s3:
image: ${S3_INTEG_VALIDATOR_IMAGE}
image: ${S3_INTEG_VALIDATOR_IMAGE}:${ARCHITECTURE}
environment:
- "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
- "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
Expand Down
2 changes: 1 addition & 1 deletion integ/test_s3/docker-compose.validate-s3-multipart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

services:
validate-s3-multipart:
image: ${S3_INTEG_VALIDATOR_IMAGE}
image: ${S3_INTEG_VALIDATOR_IMAGE}:${ARCHITECTURE}
environment:
- "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
- "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
Expand Down
2 changes: 1 addition & 1 deletion integ/test_s3/docker-compose.validate-s3-putobject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

services:
validate-s3-put-object:
image: ${S3_INTEG_VALIDATOR_IMAGE}
image: ${S3_INTEG_VALIDATOR_IMAGE}:${ARCHITECTURE}
environment:
- "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
- "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
Expand Down
14 changes: 9 additions & 5 deletions integ/validate_cloudwatch/updating_validator_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
The CW Validator image exists in our account as:

```
906394416424.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator:latest
906394416424.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator:arm64
906394416424.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator:x86_64
906394416424.dkr.ecr.us-west-2.amazonaws.com/cw-integ-validator-windows:x86_64
```

If we need to perform a change or dependency update, build the image and push it to the account with that name.
If we need to perform a change or dependency update, build the image and push it to the account with that name.

The image is set as an env var `CW_INTEG_VALIDATOR_IMAGE` in:
The base image URI is set as an env var `CW_INTEG_VALIDATOR_IMAGE` in:
- Linux: buildspec_integ.yml
- Windows: integ/run-integ.ps1
- Windows: run-integ.ps1

The env var is used in `integ/test_cloudwatch/docker-compose.validate.yml`.
The tag is the value of `${ARCHITECTURE}`

The env var is used in the `docker-compose.validate-and-clean.yml` files for firehose, kinesis, and S3 tests.

0 comments on commit 69366b1

Please sign in to comment.