Project

Profile

Help

Story #3181

As a user, I have a roles API for published distribution base paths

Added by bmbouter almost 2 years ago. Updated 12 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 36

Description

This basic implementation should create a live API at /pulp_ansible/galaxy/<distribution.base_path>/roles/ that will provide the minimum functionality for the galaxy client to discover role urls from it.

This work will probably require the addition of a new field (e.g. "url") in the galaxy api format to serve as an alternative to the github_user and github_repo fields. The galaxy cli client will probably need to be updated too.

There will have to be two pages really: one for roles and one for versions. The galaxy cli first looks up roles and then the versions for these roles.

Associated revisions

Revision 91d53969 View on GitHub
Added by daviddavis over 1 year ago

Add a compatible Galaxy v1 api that ansible-galaxy cli can use

fixes #3181
https://pulp.plan.io/issues/3181

History

#1 Updated by bmbouter almost 2 years ago

  • Blocked by Story #3180: As a user, I can mirror Galaxy roles to a local repo added

#2 Updated by daviddavis almost 2 years ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#3 Updated by daviddavis almost 2 years ago

  • Sprint/Milestone changed from 0.1 Release to 52

#4 Updated by rchan over 1 year ago

  • Sprint/Milestone changed from 52 to 53

#5 Updated by bmbouter over 1 year ago

  • Sprint/Milestone changed from 53 to 54

#6 Updated by rchan over 1 year ago

  • Sprint/Milestone changed from 54 to 56

#7 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 33

#8 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (56)

#9 Updated by daviddavis over 1 year ago

  • Description updated (diff)
  • Groomed changed from Yes to No
  • Sprint Candidate changed from Yes to No
  • Sprint deleted (Sprint 33)

#10 Updated by daviddavis over 1 year ago

  • Blocked by Story #3467: As a user, I can publish roles as tar files which I can install over http/https with the galaxy cli client. added

#11 Updated by daviddavis over 1 year ago

  • Sprint/Milestone set to 0.1 Release

#12 Updated by daviddavis over 1 year ago

  • Related to Story #3473: As a plugin writer, I have documentation on how to create live api endpoints responsibly added

#13 Updated by daviddavis over 1 year ago

  • Related to deleted (Story #3473: As a plugin writer, I have documentation on how to create live api endpoints responsibly)

#14 Updated by daviddavis over 1 year ago

  • Blocked by Story #3473: As a plugin writer, I have documentation on how to create live api endpoints responsibly added

#15 Updated by bmbouter over 1 year ago

  • Subject changed from As a user, I can publish a repository version containing Ansible roles in a Galaxy compatible format to As a user, I have a roles API for published distribution base paths
  • Description updated (diff)

rewriting based on requirements review w/ @daviddavis

#16 Updated by daviddavis over 1 year ago

  • Description updated (diff)

#17 Updated by daviddavis over 1 year ago

  • Sprint set to Sprint 35

#18 Updated by daviddavis over 1 year ago

  • Groomed changed from No to Yes

#19 Updated by daviddavis over 1 year ago

FYI, we can use GALAXY_SERVER0 in the ansible cli client config and point it to our pulp instance instead of the public galaxy server.

[0] https://github.com/ansible/ansible/blob/5b703a2a5387f7d3e5c65b92fee29d617ee15df1/lib/ansible/config/base.yml#L1306-L1312

#20 Updated by daviddavis over 1 year ago

We'll need a change to the ansible galaxy client (which lives in https://github.com/ansible/ansible) to be able to fetch roles from somewhere other than github. I'm imagining that we'll have a url field for roles in which case this should work:

diff --git a/lib/ansible/galaxy/role.py b/lib/ansible/galaxy/role.py
index c9d8ddd3eb..7d0765d84f 100644
--- a/lib/ansible/galaxy/role.py
+++ b/lib/ansible/galaxy/role.py
@@ -167,13 +167,15 @@ class GalaxyRole(object):

     def fetch(self, role_data):
         """ 
-        Downloads the archived role from github to a temp location
+        Downloads the archived role to a temp location based on role data
         """ 
         if role_data:

             # first grab the file and save it to a temp location
             if "github_user" in role_data and "github_repo" in role_data:
                 archive_url = 'https://github.com/%s/%s/archive/%s.tar.gz' % (role_data["github_user"], role_data["github_repo"], self.version)
+            elif "url" in role_data:
+                archive_url = role_data["url"]
             else:
                 archive_url = self.src

#21 Updated by amacdona@redhat.com over 1 year ago

  • Blocked by deleted (Story #3473: As a plugin writer, I have documentation on how to create live api endpoints responsibly)

#22 Updated by amacdona@redhat.com over 1 year ago

  • Blocked by Story #3473: As a plugin writer, I have documentation on how to create live api endpoints responsibly added

#23 Updated by daviddavis over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#25 Updated by rchan over 1 year ago

  • Sprint changed from Sprint 35 to Sprint 36

#26 Updated by daviddavis over 1 year ago

  • Status changed from ASSIGNED to POST

#27 Updated by daviddavis over 1 year ago

  • Status changed from POST to MODIFIED

#28 Updated by daviddavis over 1 year ago

  • % Done changed from 0 to 100

#29 Updated by bmbouter 12 months ago

  • Blocked by deleted (Story #3180: As a user, I can mirror Galaxy roles to a local repo)

#30 Updated by bmbouter 12 months ago

  • Blocked by deleted (Story #3467: As a user, I can publish roles as tar files which I can install over http/https with the galaxy cli client.)

#31 Updated by bmbouter 12 months ago

  • Blocked by deleted (Story #3473: As a plugin writer, I have documentation on how to create live api endpoints responsibly)

#32 Updated by bmbouter 12 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF