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

Update Ansible version and install boto #26

Closed
wants to merge 1 commit into from

Conversation

@mtb-xt
Copy link
Contributor

commented Sep 9, 2019

Hello.

This PR updates Ansible version to the latest minor version, it also adds boto libraries which are required for every aws-related module (and for dynamic inventories too...)

@mtb-xt

This comment has been minimized.

Copy link
Contributor Author

commented Sep 9, 2019

Could anyone merge it pls?

@techknowlogick

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2019

@tboerger seems I don't have merge permissions.

@tboerger

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Updating ansible is totally fine, but I'm not sure about boto install, so far we are installing only requests via the alpine package.

In theory you could also just use the requirements attribute within drone to install dependencies for your use case in the standard requirements.txt format.

Besides that I need to check if we got a tagged release for the previous version :)

@mtb-xt

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

@tboerger ansible's aws modules are unusable without boto included.

are you saying I need to run pip install -r requirements.txt inside the plugin every time it runs?

Then this plugin is useless <_< What's the point of having only partially-working ansible plugin?

@tboerger

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

The plugin is doing the pip install automatically if you provide a path to a requirements.txt.

And this plugin is even in that case not useless as it's working pretty well. It just doesn't install all possible python modules.

The plugin isn't working partially. But how should we cover every possible dynamic inventory hacking? I'm using dynamic inventory pretty much (not on aws) without the need to install any additional module.

@mtb-xt

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

re - requirements.txt - it still means a delay and unnecessary downloads every time a step with this plugin runs.

I apologize for the tone, but really, using AWS for dynamic inventories and to manipulate AWS resources would seem a pretty common Ansible use-case, not a hacking.

I guess we can always build our own image of the plugin, but in my opinion, that makes drone much less usable.

EDIT: What's wrong with including most common python modules, that Ansible needs? Even if plugin image becomes bigger, it's downloaded once and stays in docker image cache. Installing requirements would happen every time.

@tboerger

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Generally it's encouraged to fork the plugins and add custom logic that is required for individuals.

After thinking about it I'm fine to add required dependencies for the 3 big major cloud providers aws, gcp and azure.

But instead of installing these deps via pip directly I would prefer the alpine packages for it, e.g. py-boto, similar to py-requests.

I will also soonish tag a new release and upgrade python to version 3 as 2.7 will reach eol more or less soon.

@mtb-xt

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

py-boto is boto 2 in alpine.
py3-boto3 and py3-botocore are only available in testing AFAIK

you want me to update the PR, or wait till you update it to python3?

@tboerger

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

If these modules are only packaged for python3 we should do the upgrade first.

@tboerger

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

I have tagged the current plugin as v1.3.0, now I have created a PR to upgrade python to version 3. After merging my PR I will tag it as v2.0.0: #27

@tboerger

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Ah, and after merging my PR you only got to add py3-boto behind py3-requests :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.