-
Notifications
You must be signed in to change notification settings - Fork 89
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
Process collection python requirements metadata #22
Comments
For metadata, at first glance could we not use the top level requirement.txt files that python projects use? Either by default or some way to reference an external file? This would avoid the need to cut down on managing 2 places for dependencies. For example, https://github.com/ansible-collections/ansible.netcommon/blob/master/requirements.txt Additional, for system packages, we'd been using bindep for the last few years to help manage those: https://docs.openstack.org/infra/bindep/readme.html It is a project born out of openstack that has been working well for the last 5 years on helping projects in CI work, bootstrap things needed for creating images for testing. Could we consider using it or again allow reference of that file. We have a lot of tooling in place today, on CI side for creating custom environments, it would be awesome to maybe see if we can keep using that. |
@pabelanger +1 to your idea of just using a requirements file. I had this as a hand-wavy example of what the execution environment definition side might look like:
I hadn't considered bindep for usage here, but I will spend some time familiarizing myself with it to have an informed opinion. Thanks for all the feedback. |
In the sniffer script I was using I was looking at In the near-term, I might try to re-jigger my script to make branches in the collections that simply reference requirements.txt. |
In openstack, we have almost the same idea. The ability to take any python project and create a docker container from it. The goal, was to try and keep each project dockerfile small, while parenting to a common base. Almost creating an API for other Dockerfile to use. is an example for how pip / OS packages are installed. While the code is different, we are almost taking about the same idea. https://wiki.openstack.org/wiki/Giftwrap was another idea around this, that eventually died off. Some of the tricks done are around 2 stage builds, as not to pull in development libraries into production images, that is why we install wheels from outside the container. |
@pabelanger Do you know if bindep is available for usage downstream anywhere? I just checked dist-git and I'm not seeing it there anywhere. |
I'd have to look, we likely could work with rdoproject to package it if missing. |
Will be naming branches https://github.com/ansible-collections/azure/compare/dev...AlanCoding:ee_req?expand=1 I anticipate this to be used in the proof-of-concept. In this example, I don't think we miss anything this way. |
Tried this out given the azure example:
then I did Let's get this in an integration test case when we decide where those are going to be |
Example
execution-environment.yml
where the file
scm_metadata.yml
contains:Just to link it, this references the tree https://github.com/AlanCoding/azure/tree/ee which importantly contains:
https://github.com/AlanCoding/azure/blob/ee/meta/execution-environment.yml
Building that should produce an image with those python requirements, which should run
azure.azcollection
modules inside of playbooks.The text was updated successfully, but these errors were encountered: