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

Support for awsvpc networking mode in ECS #1246

Merged
merged 5 commits into from
Apr 19, 2021

Conversation

samuelkarp
Copy link
Contributor

@samuelkarp samuelkarp commented Dec 17, 2020

Issue number:
#1077

Description of changes:
This pull request adds support for the awsvpc networking mode to the Bottlerocket aws-ecs-1 variant.

The awsvpc networking mode is enabled through the use of several CNI plugins that are used in combination. While the CNI plugins are stored in two separate git repositories (amazon-ecs-cni-plugins and amazon-vpc-cni-plugins), they are effectively tightly coupled to the ECS agent; the ECS agent repository includes the plugins as git submodules and is only ever tested with the exact versions of the plugins included as submodules. Because of this tight coupling, the CNI plugins are included as part of the ecs-agent spec file; when any one of these source files are updated all should be.

Testing done:

  • cargo make -e BUILDSYS_VARIANT=aws-ecs-1
  • Built an AMI, ensured that the files were installed to the expected locations, and ran each of the plugins with the -version argument
  • Ran a task with awsvpc mode on a t2.micro
  • Ran 10 tasks with awsvpc mode on a c5.large, exercising ENI trunking
  • Ran ECS qualification test suite, including newly-enabled tests for awsvpc and IPv6 support

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@gregdek gregdek added the status/needs-triage Pending triage or re-evaluation label Jan 7, 2021
@tjkirch tjkirch removed the status/needs-triage Pending triage or re-evaluation label Jan 7, 2021
@samuelkarp
Copy link
Contributor Author

samuelkarp force-pushed the samuelkarp:awsvpc branch from 4941409 to d878f22

This push rebases on top of the current tip of develop and updates the CNI plugins to use the versions included in ECS agent 1.50.2's submodules.

@samuelkarp
Copy link
Contributor Author

samuelkarp force-pushed the samuelkarp:awsvpc branch from d878f22 to e07bbc9

  • Enabled awsvpc mode in the ECS agent
  • Fixed filesystem paths in the ECS agent for non-containerized operation
  • Fixed filesystem paths in the CNI plugins for non-containerized operation
  • Disabled unsupported CNI plugins (App Mesh and branch ENIs) for now
  • Successfully ran a task using awsvpc mode on a t2.micro.

@jhaynes jhaynes linked an issue Mar 31, 2021 that may be closed by this pull request
@samuelkarp samuelkarp force-pushed the awsvpc branch 2 times, most recently from 16beb8d to cd3e662 Compare April 12, 2021 22:10
@samuelkarp samuelkarp changed the title [draft] Support for awsvpc networking mode in ECS Support for awsvpc networking mode in ECS Apr 12, 2021
@samuelkarp samuelkarp marked this pull request as ready for review April 12, 2021 22:23
packages/ecs-agent/ecs-agent.spec Show resolved Hide resolved
Copy link
Member

@jahkeup jahkeup left a comment

Choose a reason for hiding this comment

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

Very cool!

I'm gonna build and test this out myself before hitting the green button 🔴 🟡 🟢 ☁️ 🚀 🐳

packages/ecs-agent/ecs-agent.spec Show resolved Hide resolved
Copy link
Member

@jahkeup jahkeup left a comment

Choose a reason for hiding this comment

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

Built and ran an instance for myself, looks great 👍🏽

@samuelkarp samuelkarp merged commit 0912ca5 into bottlerocket-os:develop Apr 19, 2021
@samuelkarp samuelkarp deleted the awsvpc branch April 19, 2021 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ECS] awsvpc mode
7 participants