Looking for help and guidance on an a PR to Ansible Galaxy Project

Hi Guys,

I have been learning and starting to love Ansible for quite awhile, and I am wanting to contribute back to the opensource project as an appreciation of loving, and open community in Ansible.

One particular help, I want to look into is support different Git Backend Systems (Bitbucket, Gitlab) in Ansible Galaxy project. This would benefit us, in our future projects I have with my current company.

Obviously, just from the quick scan of the code this seems like a pretty major change, as there are a lot of references to the Github API. I’m afraid my skills aren’t really at a stage where I can architect a whole solution around it, but I would love to help out esp if someone was willing to guide me, or work together on getting something like this working.

Thanks,
Sriram

I know that folks from the OpenStack project have been talking about Gitlab support for Galaxy – maybe some of those folks could speak up here.

It will be an invasive change, of course. If/when such a change lands, it may not be enabled in the downstream Galaxy because the primary purpose of downstream Galaxy is to be an index of publicly available content, and by far the largest collection of that content is on Github. But for private Galaxy installs, it could certainly make sense.

–g

The ansible-galaxy command line already supports installing from them, so no changes needed there.

I concur.
We at OpenStack use galaxy to install roles from our Git server git.openstack.org just fine.
I’m curious what exact support Galaxy is lacking on other Git implementations.

@Ricardo, on the galaxy.ansible.com (galaxy-server) side, it only allows importing roles from github.com as well as requires github.com accounts.

I believe they want to extend the server software to allow for other ‘origins’ both for accounts and for shared roles.

I see, that makes sense, thanks.

This is one of the issues of overloading the name “Galaxy”.

Galaxy is two things, a server and a client.

The Galaxy server is a mechanism for indexing roles, and making them available to the Galaxy client. Github isn’t great at providing searchability and metadata for content. Galaxy isn’t great either, but it’s improving. :slight_smile:

The Galaxy Client downloads from the Galaxy server by default, but can be set to download from any Git repo. This isn’t always clear to users, so we need to do a better job of surfacing this capability.

–g

Hi All,

Thanks for the reply.

To clarify/summarize here are some thoughts and problems:

Yes, I know the the galaxy client supports using other git backend systems via the git protocol. We are currently doing this, but I will like to avoid it. Each time we reference a git repo with the ansible galaxy we need to find a way to get a credential to the server fetching the roles so that it can be downloaded by the ansible-galaxy command. (Obviously we can use public repos but that isn’t the point)

Another major reason why I would like the galaxy server to host different git backed systems is so that it discovery of roles, and dependancy management of roles (where roles depend on other roles) can be quite completed to manage without something like Ansible Galaxy Server understanding meta.yml and composing these dependancies for you.

Another big reason this is useful, is it helps us have a registry of roles, this makes our development faster as we can don’t have to repeat ourselves, if we can easily discover roles that have been created by other teams (the whole point of Ansible Galaxy). This registry is important for me, as I would like to use it to make self service systems easier to make, as the user can pick and chose roles that have been created, and deploy these to a machine.

@Greg
In respect of your comment before. Yes, I agree it will be an invasive change. I think it its sill useful in the downstream Galaxy. This is because some companies may have their git systems public, and may want to use the public ansible galaxy system, and not have to maintain a mirror in public Github.

I was thinking (again, I’m not super good at architecting a solution like this) that if the ImportRoles task was an interface , and we implement each type of git backend system (GithubImportRoles, BitbucketImportRoles, GitlabImportRoles, etc etc) then we can interface this. The problem might be with migration of data from old to new due to model/db changes.

Yes, the naming super confusing. As mentioned, here: https://github.com/ansible/galaxy-issues/issues/201

Thanks,
Sriram

Hi,

So how would I go about starting this? Should I just start coding it or would I need to create a proposal forit.

Thanks,
Sriram