https://pulp.plan.io/https://pulp.plan.io/favicon.ico2016-01-26T10:16:05ZPulpPuppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=81822016-01-26T10:16:05Zlastmikoilastmikoi+pulp@lastmikoi.net
<ul></ul><p>I second this request as Librarian-puppet, which uses the /v3/modules API endpoint, is currently unable to use a pulp_puppet-powered forge.</p>
<p>This issue, combined with <a href="https://pulp.plan.io/issues/945" class="external">https://pulp.plan.io/issues/945</a> effectively makes it impossible to use pulp_puppet in a production environment where multiple module versions are to be used from a same repository.</p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=82002016-01-26T19:08:47Zetpartonericp@arin.net
<ul></ul><p>I’ve been looking into this issue as well, and it turns out that the “/v3/files/whatever.tar.gz” endpoint isn’t a part of the forge api; it’s just the location that the official Puppetlabs puppet forge hosts their module archive files. The json response from the releases endpoint contains a “file_uri” property which the PuppetForge gem can use to download the file:</p>
<pre><code class="json syntaxhl" data-language="json"><span class="p">{</span><span class="w">
</span><span class="nl">"file_md5"</span><span class="p">:</span><span class="w"> </span><span class="s2">"74b0f2e2282c35c02b91d40911b7835e"</span><span class="p">,</span><span class="w">
</span><span class="nl">"file_uri"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/pulp/puppet/test/system/releases/c/camptocamp/camptocamp-postfix-1.2.14.tar.gz"</span><span class="p">,</span><span class="w">
</span><span class="nl">"metadata"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="nl">"dependencies"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"puppetlabs/stdlib"</span><span class="p">,</span><span class="w">
</span><span class="nl">"version_requirement"</span><span class="p">:</span><span class="w"> </span><span class="s2">">=3.2.0 <5.0.0"</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"camptocamp/augeas"</span><span class="p">,</span><span class="w">
</span><span class="nl">"version_requirement"</span><span class="p">:</span><span class="w"> </span><span class="s2">">=1.0.0 <2.0.0"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"camptocamp/postfix"</span><span class="p">,</span><span class="w">
</span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.2.14"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>I submitted a pull request (<a href="https://github.com/puppetlabs/forge-ruby/pull/24" class="external">https://github.com/puppetlabs/forge-ruby/pull/24</a>) to have the PuppetForge gem use the file_uri property instead of the hardcoded “/v3/files/” uri and one of their developers just merged it and cut a new release which will be automatically included in the current version of r10k.</p>
<p>I've also submitted a pull request (<a href="https://github.com/pulp/pulp_puppet/pull/207" class="external">https://github.com/pulp/pulp_puppet/pull/207</a>) for an implementation of the "/v3/releases/user-module-version” endpoint to the pulp-puppet repo. I’ve been testing the latest version of r10k with my Pulp development server that has the code from the pull request installed and it all works together perfectly.</p>
<p>The only caveat is that r10k requires the module api to download modules whose versions have not been not specified at all (it defaults to the latest version in this case). And as lastmikoi said earlier, librarian-puppet requires the module api in order to download anything.</p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=82382016-01-28T04:21:40Ztarrantmarshall
<ul></ul><p>etparton wrote:</p>
<blockquote>
<p>I submitted a pull request (<a href="https://github.com/puppetlabs/forge-ruby/pull/24" class="external">https://github.com/puppetlabs/forge-ruby/pull/24</a>) to have the PuppetForge gem use the file_uri property instead of the hardcoded “/v3/files/” uri and one of their developers just merged it and cut a new release which will be automatically included in the current version of r10k.</p>
</blockquote>
<p>Ah. I coded a work around on my branch to basically return a HTTP REDIRECT to the actual file. PuppetForge gem follows it correctly.</p>
<blockquote>
<p>I've also submitted a pull request (<a href="https://github.com/pulp/pulp_puppet/pull/207" class="external">https://github.com/pulp/pulp_puppet/pull/207</a>) for an implementation of the "/v3/releases/user-module-version” endpoint to the pulp-puppet repo. I’ve been testing the latest version of r10k with my Pulp development server that has the code from the pull request installed and it all works together perfectly.</p>
</blockquote>
<p>Awesome! I was yet to code this part.</p>
<blockquote>
<p>The only caveat is that r10k requires the module api to download modules whose versions have not been not specified at all (it defaults to the latest version in this case). And as lastmikoi said earlier, librarian-puppet requires the module api in order to download anything.</p>
</blockquote>
<p>I have, for the most part, done the /modules part of the API and started on some unit tests. I'm not sure i'll have time in the next 10 days to complete it though.</p>
<p><a href="https://github.com/aeria/pulp_puppet/commit/b509c05b2cdca26ed91347116d9ca9f6637eed3a" class="external">https://github.com/aeria/pulp_puppet/commit/b509c05b2cdca26ed91347116d9ca9f6637eed3a</a></p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=95122016-03-02T19:42:44ZAnonymous
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>MODIFIED</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Added support for the /releases/{user}-{module}-{version} endpoint of the Puppet Forge v3 API ht..." href="https://pulp.plan.io/projects/pulp_puppet/repository/11/revisions/ba207e5aef6524d2b6da7a8e65243982abea3f45">ba207e5aef6524d2b6da7a8e65243982abea3f45</a>.</p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=95422016-03-03T15:21:17Zdkliban@redhat.com
<ul><li><strong>Status</strong> changed from <i>MODIFIED</i> to <i>5</i></li><li><strong>Platform Release</strong> set to <i>2.8.0</i></li></ul> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=100162016-03-23T18:13:33Zdkliban@redhat.com
<ul><li><strong>Status</strong> changed from <i>5</i> to <i>CLOSED - CURRENTRELEASE</i></li></ul> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=108162016-04-15T15:08:57Zlastmikoilastmikoi+pulp@lastmikoi.net
<ul></ul><p>I believe this issue should be re-opened, as <a href="https://github.com/pulp/pulp_puppet/pull/207" class="external">https://github.com/pulp/pulp_puppet/pull/207</a> implemented the `/v3/releases/module-name` endpoint but both the `/v3/files` (apparently used by r10k) and `/v3/modules` (used in my setup of librarian-puppet) are still missing from the API.</p>
<p>I don't know if r10k is able to use pulp_puppet as of now, but my librarian-puppet setup is failing because of the missing `/v3/modules` endpoint.</p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=108262016-04-15T15:31:25Zetpartonericp@arin.net
<ul></ul><p>lastmikoi wrote:</p>
<blockquote>
<p>I believe this issue should be re-opened, as <a href="https://github.com/pulp/pulp_puppet/pull/207" class="external">https://github.com/pulp/pulp_puppet/pull/207</a> implemented the `/v3/releases/module-name` endpoint but both the `/v3/files` (apparently used by r10k) and `/v3/modules` (used in my setup of librarian-puppet) are still missing from the API.</p>
<p>I don't know if r10k is able to use pulp_puppet as of now, but my librarian-puppet setup is failing because of the missing `/v3/modules` endpoint.</p>
</blockquote>
<p>Fortunately, r10k no longer requires the unofficial files api to download modules, so it is able to work with the version of pulp-puppet that includes the pull request that you mentioned. I totally agree that the modules api should be implemented, but it might make sense to open a new issue with a more relevant name.</p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=108312016-04-15T15:33:40Zlastmikoilastmikoi+pulp@lastmikoi.net
<ul></ul><p>etparton wrote:</p>
<blockquote>
<p>Fortunately, r10k no longer requires the unofficial files api to download modules, so it is able to work with the version of pulp-puppet that includes the pull request that you mentioned. I totally agree that the modules api should be implemented, but it might make sense to open a new issue with a more relevant name.</p>
</blockquote>
<p>Fair enough, I'll file a new feature request for the `/v3/modules` API endpoint then.</p>
<p>Thanks for the clarification over r10k.</p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=108382016-04-15T15:45:36Zlastmikoilastmikoi+pulp@lastmikoi.net
<ul></ul><p>lastmikoi wrote:</p>
<blockquote>
<p>Fair enough, I'll file a new feature request for the `/v3/modules` API endpoint then.</p>
</blockquote>
<p>I filed <a href="https://pulp.plan.io/issues/1848" class="external">https://pulp.plan.io/issues/1848</a> accordingly.</p> Puppet Support - Story #1536: As a user I would like support for v3/files API so that r10k may workhttps://pulp.plan.io/issues/1536?journal_id=392942019-04-15T20:38:02Zbmbouterbmbouter@redhat.com
<ul><li><strong>Tags</strong> <i>Pulp 2</i> added</li></ul>