Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools - Weathertop: Update plugin stacks to include EnvVars #6948

Merged
merged 20 commits into from
Oct 9, 2024

Conversation

ford-at-aws
Copy link
Contributor

@ford-at-aws ford-at-aws commented Oct 2, 2024

This PR updates all Weathertop plugin stacks so that a new environment variable is available as a part of all Job Definitions.

NOTE: As part of testing, this change has been deployed to all plugin environments.

Docs on using custom EnvVars in AWS Batch Fargate using ContainerProperties

Here is an example of the new Job Def, presented here in JSON format bc the EnvVar is not visible in the Console:

{
  "jobDefinitionName": "JobDefn-xxxxxx",
  "jobDefinitionArn": "arn:aws:batch:us-east-1:xxxxxxx:job-definition/JobDefn-xxxxx:3",
  "revision": 3,
  "status": "ACTIVE",
  "type": "container",
  "parameters": {},
  "containerProperties": {
    "image": "808326389482.dkr.ecr.us-east-1.amazonaws.com/cpp:latest",
    "command": [],
    "jobRoleArn": "arn:aws:iam::770244195820:role/BatchExecutionRole-cpp",
    "executionRoleArn": "arn:aws:iam::770244195820:role/BatchExecutionRole-cpp",
    "volumes": [],
    "environment": [
      {
        "name": "S3_BUCKET_NAME_PREFIX",
        "value": "sdk-example-code"
      }
    ],
    "mountPoints": [],
    "ulimits": [],
    "resourceRequirements": [
      {
        "value": "4",
        "type": "VCPU"
      },
      {
        "value": "16384",
        "type": "MEMORY"
      }
    ],
    "secrets": [],
    "networkConfiguration": {
      "assignPublicIp": "ENABLED",
      "interfaceConfigurations": []
    },
    "fargatePlatformConfiguration": {
      "platformVersion": "LATEST"
    }
  },
  "tags": {},
  "propagateTags": false,
  "platformCapabilities": [
    "FARGATE"
  ],
  "containerOrchestrationType": "ECS"
}

@ford-at-aws ford-at-aws self-assigned this Oct 2, 2024
@github-actions github-actions bot added the Tools This issue relates to a custom tooling to streamline development tasks label Oct 2, 2024
@ford-at-aws ford-at-aws changed the title Update Weathertop to include env Vars Tools - Weathertop: Update plugin stacks to include env Vars Oct 2, 2024
@ford-at-aws ford-at-aws changed the title Tools - Weathertop: Update plugin stacks to include env Vars Tools - Weathertop: Update plugin stacks to include EnvVars Oct 2, 2024
@ford-at-aws ford-at-aws added the Task A general update to the code base for language clarification, missing actions, tests, etc. label Oct 2, 2024
Copy link
Contributor

@cpyle0819 cpyle0819 left a comment

Choose a reason for hiding this comment

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

Recommending creating a variables.json file that can be read, parsed, and passed directly to the batch env vars instead of doing the extra processing.

.tools/test/stacks/plugin/typescript/plugin_stack.ts Outdated Show resolved Hide resolved
.tools/test/stacks/config/variables.json Outdated Show resolved Hide resolved
@ford-at-aws ford-at-aws added the On Call Review needed This work needs an on-call review label Oct 9, 2024
@DavidSouther DavidSouther added On Call Review complete On call review complete and removed On Call Review needed This work needs an on-call review labels Oct 9, 2024
@DavidSouther DavidSouther merged commit 659f9fc into awsdocs:main Oct 9, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Call Review complete On call review complete Task A general update to the code base for language clarification, missing actions, tests, etc. Tools This issue relates to a custom tooling to streamline development tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants