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 new enableExecuteCommand options for ECS service #488

Merged

Conversation

Surgo
Copy link
Contributor

@Surgo Surgo commented Mar 21, 2021

SUMMARY
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ecs_service

ADDITIONAL INFORMATION

Create ECS service with enable_execute_command option,

- name: create exec service
  ecs_service:
    state: present
    ...
    enable_execute_command: true

and we can exec ECS task

$ aws ecs execute-command --cluster xxxxx --task arn:aws:ecs:us-east-1:*****:task/webapp/***** --container xxxxx --interactive --command /bin/bash


The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.


Starting session with SessionId: ecs-execute-command-0c17f94b36227381f
root@ip-10-0-66-68:/#

@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed community_review labels Mar 21, 2021
@ansibullbot ansibullbot added community_review and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Mar 21, 2021
@ansibullbot ansibullbot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed community_review labels Apr 6, 2021
Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

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

Hi @Surgo

Thanks for taking the time to open this PR. A couple of minor tweaks.
Please also include a changelog entry https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to

plugins/modules/ecs_service.py Outdated Show resolved Hide resolved
plugins/modules/ecs_service.py Outdated Show resolved Hide resolved
plugins/modules/ecs_service.py Outdated Show resolved Hide resolved
plugins/modules/ecs_service.py Outdated Show resolved Hide resolved
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
* cloud.py re-implementation

Co-authored-by: Mark Chappell <mchappel@redhat.com>
@github-actions
Copy link

github-actions bot commented Jul 8, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jul 8, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

✔️ ansible-galaxy-importer SUCCESS in 3m 54s
✔️ build-ansible-collection SUCCESS in 5m 10s
ansible-test-sanity-docker-devel FAILURE in 11m 03s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 10m 20s
ansible-test-sanity-docker-stable-2.12 FAILURE in 11m 07s
ansible-test-sanity-docker-stable-2.13 FAILURE in 9m 14s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 5m 46s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 5m 28s
✔️ ansible-test-splitter SUCCESS in 2m 28s
✔️ integration-community.aws-1 SUCCESS in 5m 37s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 3m 44s
✔️ build-ansible-collection SUCCESS in 5m 14s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 27s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 11m 40s
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 57s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 12m 26s
✔️ ansible-test-units-community-aws-python38 SUCCESS in 6m 35s
✔️ ansible-test-units-community-aws-python39 SUCCESS in 5m 05s
✔️ ansible-test-splitter SUCCESS in 2m 29s
✔️ integration-community.aws-1 SUCCESS in 5m 17s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED

@ansibullbot ansibullbot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed community_review labels Jul 8, 2022
@tremble tremble requested a review from markuman January 31, 2023 12:54
@tremble tremble removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jan 31, 2023
@tremble
Copy link
Contributor

tremble commented Jan 31, 2023

@markuman I've just rebased this against main, could you take a look please. Looks like it should be a quick merge.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 20s
✔️ build-ansible-collection SUCCESS in 5m 54s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 39s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 13m 51s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 13s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 47s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 53s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 47s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 49s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 59s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 29s
✔️ ansible-test-changelog SUCCESS in 2m 21s
✔️ ansible-test-splitter SUCCESS in 2m 29s
✔️ integration-community.aws-1 SUCCESS in 5m 15s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble tremble added the backport-5 PR should be backported to the stable-5 branch label Mar 14, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/278805a7344e48fea231e49441643f4d

ansible-galaxy-importer FAILURE in 3m 42s
✔️ build-ansible-collection SUCCESS in 13m 06s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 45s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 34s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 39s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 25s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 12m 53s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 21s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 03s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 08s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 8m 49s
✔️ ansible-test-changelog SUCCESS in 4m 26s
✔️ ansible-test-splitter SUCCESS in 5m 03s
integration-community.aws-1 FAILURE in 15m 12s
Skipped 21 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/399b10d656d84704901d5ab0e8f0676f

ansible-galaxy-importer FAILURE in 4m 05s
✔️ build-ansible-collection SUCCESS in 12m 40s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 41s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 59s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 39s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 11m 11s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 34s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 22s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 28s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 10s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 54s
✔️ ansible-test-changelog SUCCESS in 4m 34s
✔️ ansible-test-splitter SUCCESS in 5m 04s
integration-community.aws-1 FAILURE in 17m 03s
Skipped 21 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/e84dd845f58f4818a499603e97160ba9

ansible-galaxy-importer FAILURE in 4m 06s
✔️ build-ansible-collection SUCCESS in 13m 04s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 41s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 58s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 21s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 53s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 11m 00s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 49s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 34s
ansible-test-units-amazon-aws-python39 RETRY_LIMIT in 4m 28s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 14s
✔️ ansible-test-changelog SUCCESS in 4m 34s
✔️ ansible-test-splitter SUCCESS in 5m 02s
integration-community.aws-1 FAILURE in 19m 25s
Skipped 21 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/5c95ad9a37f543d38f751838821a979f

✔️ ansible-galaxy-importer SUCCESS in 4m 15s
✔️ build-ansible-collection SUCCESS in 12m 31s
✔️ ansible-test-sanity-docker-devel SUCCESS in 11m 50s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 11m 43s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 26s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 11m 41s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 11m 27s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 8m 02s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 45s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 7m 24s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 8m 52s
✔️ ansible-test-changelog SUCCESS in 4m 20s
✔️ ansible-test-splitter SUCCESS in 4m 48s
✔️ integration-community.aws-1 SUCCESS in 18m 41s
Skipped 21 jobs

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Mar 20, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/ea10df3ad06a482e841f9cf344b97760

ansible-galaxy-importer FAILURE in 3m 53s
✔️ build-ansible-collection SUCCESS in 12m 19s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 21s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 12s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 42s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 33s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 12m 19s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 44s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 25s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 11s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 8m 01s
✔️ ansible-test-changelog SUCCESS in 4m 13s
✔️ ansible-test-splitter SUCCESS in 4m 51s
✔️ integration-community.aws-1 SUCCESS in 16m 29s
Skipped 21 jobs

@tremble
Copy link
Contributor

tremble commented Mar 20, 2023

regate

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/b7386d46bcec400597aa02eab2292b3c

✔️ ansible-galaxy-importer SUCCESS in 3m 56s
✔️ build-ansible-collection SUCCESS in 12m 21s
✔️ ansible-test-sanity-docker-devel SUCCESS in 8m 32s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 12s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 11m 34s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 02s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 11m 00s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 07s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 9m 12s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 09s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 16s
✔️ ansible-test-changelog SUCCESS in 5m 15s
✔️ ansible-test-splitter SUCCESS in 4m 38s
✔️ integration-community.aws-1 SUCCESS in 23m 23s
Skipped 21 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 3ad3b97 into ansible-collections:main Mar 20, 2023
3 checks passed
@patchback
Copy link

patchback bot commented Mar 20, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/3ad3b97fc528008f7e1cbdf9cc0cec3d093314e1/pr-488

Backported as #1752

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Mar 20, 2023
Support new enableExecuteCommand options for ECS service

SUMMARY

Support new ecs exec feature for ECS service

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ecs_service
ADDITIONAL INFORMATION

Create ECS service with enable_execute_command option,
- name: create exec service
  ecs_service:
    state: present
    ...
    enable_execute_command: true

and we can exec ECS task
$ aws ecs execute-command --cluster xxxxx --task arn:aws:ecs:us-east-1:*****:task/webapp/***** --container xxxxx --interactive --command /bin/bash

The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.

Starting session with SessionId: ecs-execute-command-0c17f94b36227381f
root@ip-10-0-66-68:/#

Reviewed-by: Mark Chappell
Reviewed-by: Alina Buzachis
(cherry picked from commit 3ad3b97)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Mar 20, 2023
…d options for ECS service (#1752)

[PR #488/3ad3b97f backport][stable-5] Support new enableExecuteCommand options for ECS service

This is a backport of PR #488 as merged into main (3ad3b97).
SUMMARY

Support new ecs exec feature for ECS service

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ecs_service
ADDITIONAL INFORMATION



Create ECS service with enable_execute_command option,
- name: create exec service
  ecs_service:
    state: present
    ...
    enable_execute_command: true

and we can exec ECS task
$ aws ecs execute-command --cluster xxxxx --task arn:aws:ecs:us-east-1:*****:task/webapp/***** --container xxxxx --interactive --command /bin/bash


The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.


Starting session with SessionId: ecs-execute-command-0c17f94b36227381f
root@ip-10-0-66-68:/#

Reviewed-by: Mark Chappell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5 PR should be backported to the stable-5 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants