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

Init to agent #3141

Merged
merged 556 commits into from
Mar 8, 2022
Merged

Init to agent #3141

merged 556 commits into from
Mar 8, 2022

Conversation

fierlion
Copy link
Member

@fierlion fierlion commented Mar 7, 2022

Summary

This is the initial commit to begin integrating ECS Init into ECS Agent; we'll be building the rest of our init integrations on top of this PR's changes, but we want to merge the present changes to allow for future rebases against dev branch.
See the proposal here: aws/amazon-ecs-init#482

Note that the Commit SHAs in the history are not changed and that the Agent and Init commits are interleaved by date.

Implementation details

To create this PR, I cloned https://github.com/aws/amazon-ecs-init.git and checked out the dev branch.
(For safety, I deleted the remote using git remote rm origin).
I renamed/removed the following set of files from init as they collided with existing files in agent:

    both added:      .github/ISSUE_TEMPLATE.md
    both added:      .github/PULL_REQUEST_TEMPLATE.md
    both added:      .github/workflows/gitsecrets.yml
    both added:      .gitignore
    both added:      .gitallowed
    both added:      CHANGELOG.md
    both added:      CONTRIBUTING.md
    both added:      Makefile
    both added:      NOTICE
    both added:      README.md
    both added:      THIRD-PARTY
    both added:      scripts/analyze-cover-profile

I then cleaned the init repo:

git reset --hard
git gc --aggressive 
git prune
git clean -fd

I cloned https://github.com/aws/amazon-ecs-agent.git and checked out the dev branch
I set the ecs-init repo as a remote git remote add init-repo ../amazon-ecs-init/ and pulled the changes from my init branch into agent with included history: git pull init-repo initIntegration --allow-unrelated-histories.

Description for the changelog

Base changes to integrate ECS Init into ECS Agent.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

fierlion and others added 30 commits January 16, 2019 17:10
This is needed as the aws-appmesh cni plugin needs to invoke `iptables` command.
The ECS agent container doesn't have the necessary lib and binary paths to invoke this command.
The additional volume mounts /sbin, /usr/lib64, /lib64 help with that.
Add binding for agent container to be able to run iptables.
iptables also relies on these libraries in order to execute successfully
Adding "/lib" and "/usr/lib" to the binds
Some usages of agent will require the agent container to have permissions
elevated beyond cap NET_ADMIN. This can now be accessed by modifying the
following environment variable and invoking ecs-init:

` export ECS_AGENT_RUN_PRIVILEGED=true `

This is not recommended for general use and may be removed in future versions
of ecs-init.
* Cache agent 1.26.1
Merge master back to dev after 1.28.0 release
User existing backoff package

Change Info log message to Warn

add variable names to NewBackoff arguments
* Adding in the ability to set container tags

* removed an unused variable

* Change the lables ENV value.
No value will not give a default error.
Added tests for no lables or blank.

* Change the lables ENV value.
No value will not give a default error.
Added tests for no lables or blank.

* Corrected the spelling of labels
Realmonia and others added 19 commits December 29, 2021 12:59
This lets us use the command `make rpm-in-docker` to build locally. This
is a good approximation of an authorative build that we can use to test
changes to init.
* Include amazon-ecs-volume-plugin and startup scripts in Debian Package (aws#450)

* add amazon-ecs-volume-plugin to rpm generic package (aws#462)

* Fix the issue that potentially curl target not present in bucket during release

* Update copyrights

Co-authored-by: Dennis Conrad <dennis.conrad@sainsburys.co.uk>
@@ -0,0 +1,14 @@
language: go
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we actually run travis in ecs-init anymore do we? since it's not setup in agent repo this wont work will it?

Copy link
Member Author

@fierlion fierlion Mar 8, 2022

Choose a reason for hiding this comment

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

I should have clarified -- We'll have a feature branch to integrate the makefiles and clean up all the remaining stuff left over from init. This PR is meant to be as much a wholesale snapshot merge of the two code bases.

So the travis stuff will go away as part of the integration feature branch.

That will give the feature branch a clear diff against the current (dev) head of ecs-init.

Copy link
Member Author

Choose a reason for hiding this comment

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

about the github workflow steps:
https://github.com/aws/amazon-ecs-init/blob/master/.github/workflows/gitsecrets.yml is merged into the agent workflows but I removed the init build.yml and will integrate it into the feature branch.

@sparrc
Copy link
Contributor

sparrc commented Mar 8, 2022

I don't know if maybe github is not showing me when I search, but what happened to all the github workflow checks?

@fierlion fierlion merged commit 234dfda into aws:dev Mar 8, 2022
@fierlion fierlion deleted the initToAgent branch March 8, 2022 18:23
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.