CircleCI-Public / aws-ecs-orb

An orb that simplifies deployment to Amazon's Elastic Container Service (ECS). Supports both EC2 and Fargate launch types.
https://circleci.com/orbs/registry/orb/circleci/aws-ecs
MIT License
51 stars 80 forks source link

Changes arch from Linux/X86_64 #147

Closed danielstravito closed 2 years ago

danielstravito commented 2 years ago

Orb version:

2.2.1

What happened:

I had a taskdef with the following, and the service was live and healthy with ARM64.

    "runtimePlatform": {
        "cpuArchitecture": "ARM64",
        "operatingSystemFamily": "LINUX"
    },

I then deployed via this orb, and now it's on Linux/X86_64 rather than ARM64.

I use the following for deploys:

- aws-ecs/update-service:
          verify-revision-is-deployed: true
          container-image-name-updates: "container=blah,tag=${CIRCLE_SHA1}"
          family: "blah-task"
          cluster-name: "blah-cluster"
          service-name: "blah-service"

Expected behavior:

Either don't touch the platform, or expose functionality that lets you control the platform.

danielstravito commented 2 years ago

This script needs to be changed:

https://github.com/CircleCI-Public/aws-ecs-orb/blob/master/src/scripts/register-new-task-def.sh

Needs a parameter for adding:

--runtime-platform=cpuArchitecture=ARM64,operatingSystemFamily=LINUX
brivu commented 2 years ago

Hey @danielstravito,

I've merged PR #155 to add the runtime-platform parameter. I'm closing this issue for now but please feel free to reopen if that doesn't work for your use case.

Thanks! Brian

danielstravito commented 2 years ago

Shouldn't this be added to the update-service? Or how does it work? Can I now update the taskdef manually to arm64 and using update-service will no longer overwrite that - or can I pass runtime-platform to update-service, or do I have to use update-task-definition? I can't see it mentioned in the documentation here:

https://circleci.com/developer/orbs/orb/circleci/aws-ecs?version=2.3.0

And that version is newer than your comment above.

Update: Verified that it doesn't touch existing platform now. Enough for me, even if it would be nice to be able to specify it as parameter to update-service.