Project

Profile

Help

Story #3181

closed

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

Added by bmbouter about 7 years ago. Updated about 6 years ago.

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

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 36
Quarter:

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.

Actions #1

Updated by bmbouter about 7 years ago

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

Updated by daviddavis about 7 years ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes
Actions #3

Updated by daviddavis about 7 years ago

  • Sprint/Milestone changed from 0.1 Release to 52
Actions #4

Updated by rchan almost 7 years ago

  • Sprint/Milestone changed from 52 to 53
Actions #5

Updated by bmbouter almost 7 years ago

  • Sprint/Milestone changed from 53 to 54
Actions #6

Updated by rchan almost 7 years ago

  • Sprint/Milestone changed from 54 to 56
Actions #7

Updated by bmbouter almost 7 years ago

  • Sprint set to Sprint 33
Actions #8

Updated by bmbouter almost 7 years ago

  • Sprint/Milestone deleted (56)
Actions #9

Updated by daviddavis almost 7 years ago

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

Updated by daviddavis almost 7 years 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
Actions #11

Updated by daviddavis over 6 years ago

  • Sprint/Milestone set to 0.1 Release
Actions #12

Updated by daviddavis over 6 years ago

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

Updated by daviddavis over 6 years ago

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

Updated by daviddavis over 6 years ago

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

Updated by bmbouter over 6 years 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

Actions #16

Updated by daviddavis over 6 years ago

  • Description updated (diff)
Actions #17

Updated by daviddavis over 6 years ago

  • Sprint set to Sprint 35
Actions #18

Updated by daviddavis over 6 years ago

  • Groomed changed from No to Yes
Actions #19

Updated by daviddavis over 6 years ago

FYI, we can use GALAXY_SERVER[0] 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

Actions #20

Updated by daviddavis over 6 years 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
Actions #21

Updated by amacdona@redhat.com over 6 years ago

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

Updated by amacdona@redhat.com over 6 years ago

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

Updated by daviddavis over 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #25

Updated by rchan over 6 years ago

  • Sprint changed from Sprint 35 to Sprint 36
Actions #26

Updated by daviddavis over 6 years ago

  • Status changed from ASSIGNED to POST

Added by daviddavis over 6 years ago

Revision 91d53969 | View on GitHub

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

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

Actions #27

Updated by daviddavis over 6 years ago

  • Status changed from POST to MODIFIED
Actions #28

Updated by daviddavis over 6 years ago

  • % Done changed from 0 to 100
Actions #29

Updated by bmbouter about 6 years ago

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

Updated by bmbouter about 6 years 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.)
Actions #31

Updated by bmbouter about 6 years ago

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

Updated by bmbouter about 6 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF