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

Replace use of boto with boto3 in awx venv (and modify its use getting region listing) #2115

Closed
wenottingham opened this issue Jul 31, 2018 · 8 comments

Comments

@wenottingham
Copy link
Contributor

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
  • API
SUMMARY

See #171

When that lands, and we start using the boto3 aws_ec2 inventory plugin, awx/main/models/inventory.py:get_ec2_region_choices should be updated to properly get regions from boto3 (and we can drop boto from the awx environment).

ENVIRONMENT
  • AWX version: current
ADDITIONAL INFORMATION
@wenottingham wenottingham changed the title de-boto-ize Tower when merging inventory plugin support de-boto-ize AWX when merging inventory plugin support Jul 31, 2018
@ryanpetrello
Copy link
Contributor

👀 @AlanCoding

@AlanCoding
Copy link
Member

It looks like we can at least close #2934 as a duplicate.

We do have boto in our main requirements, which is used for the sole purpose of getting ec2 requirements.

boto==2.47.0

properly get regions from boto3 (and we can drop boto from the awx environment).

Is this saying that we replace boto in the awx requirements with boto3?

@wenottingham
Copy link
Contributor Author

We'd need to rewrite the code that gets regions. AIUI the boto3 API is not the same.

@AlanCoding AlanCoding changed the title de-boto-ize AWX when merging inventory plugin support Replace use of boto with boto3 in awx venv (and modify its use getting region listing) Apr 29, 2019
@AlanCoding
Copy link
Member

I changed the title of the issue to reflect this conversation, let me know if I do not have this right.

@deepy
Copy link

deepy commented Nov 22, 2019

With boto 2.46.0 there's a BOTO_USE_ENDPOINT_HEURISTICS setting which might be worth looking at before this.

@ryanpetrello
Copy link
Contributor

@chrismeyersfsu similar to #8021 (comment), is this something that should just work now that we've moved to a model where users can define explicit regions themselves?

@AlanCoding
Copy link
Member

With the inventory plugin config changes, we removed the region listing. That means we're not using the boto library to produce the region listing. As far as I can see, we're not using boto anywhere else, but it's still in the requirements.

boto # replacement candidate https://github.com/ansible/awx/issues/2115

So we may be able to remove this library with no consequence.

Let me be clear that the Ansible venv certainly needs boto for inventory imports. That will have to wait a little longer to be removed from Ansible requirements, as it is migrated upstream ansible-collections/amazon.aws#125, where it will co-exist with boto3, so.. do whatever you want with it there.

ryanpetrello added a commit to ryanpetrello/awx that referenced this issue Sep 9, 2020
AlanCoding pushed a commit to AlanCoding/awx that referenced this issue Sep 10, 2020
@kdelee
Copy link
Member

kdelee commented Sep 15, 2020

aws inventory testing still passing, going to close this as verified by regression tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants