<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Use cURL to make an API call to change base URL repository for Ambari Blueprints deployment? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96859#M10399</link>
    <description>&lt;P&gt;UPDATE: I finally ran across this issue, which at least explains why the process is not working:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://issues.apache.org/jira/browse/AMBARI-12811"&gt;https://issues.apache.org/jira/browse/AMBARI-12811&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The question now, then, becomes "How do I update the repo_version table prior to a blueprint-based installation?" &lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2015 13:01:55 GMT</pubDate>
    <dc:creator>jeden</dc:creator>
    <dc:date>2015-11-11T13:01:55Z</dc:date>
    <item>
      <title>Use cURL to make an API call to change base URL repository for Ambari Blueprints deployment?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96858#M10398</link>
      <description>&lt;P&gt;I have successfully uploaded a blueprint to an Ambari server. I am trying now to configure default repositories for HDP installation in our classroom lab environment, as per instructions here:
&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Blueprints#Blueprints-Step4:SetupStackRepositories%28Optional%29" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Blueprints#Blueprints-Step4:SetupStackRepositories%28Optional%29" rel="nofollow noopener noreferrer" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Blueprints#Blueprints-Step4:SetupStackRepositories%28Optional%29&lt;/A&gt;&lt;/P&gt;I have created the a file, named HDPRepo.test, per the instructions.

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="446-hdprepo.png" style="width: 495px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23995i349EF987378CA584/image-size/medium?v=v2&amp;amp;px=400" role="button" title="446-hdprepo.png" alt="446-hdprepo.png" /&gt;&lt;/span&gt;&lt;/P&gt;
The command I am using is based on what worked for the blueprint upload, but pointed at the repo URI per the instructions:

&lt;PRE&gt;curl -u admin:admin -i -H 
"X-Requested-By: jedentest1" -X POST -d @HDPRepo.test 
&lt;A href="http://node1:8080/api/v1/stacks/HDP/versions/2.3/operating_systems/redhat6/repositories/HDP-2.3/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://node1:8080/api/v1/stacks/HDP/versions/2.3/operating_systems/redhat6/repositories/HDP-2.3/&lt;/A&gt;
&lt;/PRE&gt;
I can't find this demo'd anywhere on the web, so I'm 
flying a bit blind. The error being returned is:

{  "status" : 500,  "message" : "Cannot create repositories."}

My suspicion is that the 
documentation is missing some minor piece (possibly a cURL add-on, or perhaps the API URI isn't quite right) that makes 
this update of the base_url value work. Has anyone actually done this that can point out what I need to modify in my command? Thanks!</description>
      <pubDate>Fri, 16 Sep 2022 09:48:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96858#M10398</guid>
      <dc:creator>jeden</dc:creator>
      <dc:date>2022-09-16T09:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use cURL to make an API call to change base URL repository for Ambari Blueprints deployment?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96859#M10399</link>
      <description>&lt;P&gt;UPDATE: I finally ran across this issue, which at least explains why the process is not working:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://issues.apache.org/jira/browse/AMBARI-12811"&gt;https://issues.apache.org/jira/browse/AMBARI-12811&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The question now, then, becomes "How do I update the repo_version table prior to a blueprint-based installation?" &lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 13:01:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96859#M10399</guid>
      <dc:creator>jeden</dc:creator>
      <dc:date>2015-11-11T13:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use cURL to make an API call to change base URL repository for Ambari Blueprints deployment?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96860#M10400</link>
      <description>&lt;P&gt;And remember, I am writing a publicly available training course, so please, no answers that require hacking that you would not suggest the average administrator to attempt. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 13:04:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96860#M10400</guid>
      <dc:creator>jeden</dc:creator>
      <dc:date>2015-11-11T13:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Use cURL to make an API call to change base URL repository for Ambari Blueprints deployment?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96861#M10401</link>
      <description>&lt;P&gt;You are using a &lt;EM&gt;POST-&lt;/EM&gt;request, I think that is the reason why its not working, try PUT. I usually follow these steps when I install my cluster with blueprints&lt;/P&gt;&lt;P&gt;1.Upload blueprint&lt;/P&gt;&lt;P&gt;2.Update repositories&lt;/P&gt;&lt;P&gt;3.Create cluster (upload host mapping)&lt;/P&gt;&lt;P&gt;To update the repositories you can use the following commands.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HDP Utils:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -H "X-Requested-By: ambari" -X PUT -u admin:&amp;lt;PASSWORD&amp;gt; &lt;A href="http://c6601.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/operating_systems/redhat6/repositories/HDP-UTILS-1.1.0.20" target="_blank"&gt;http://c6601.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/operating_systems/redhat6/repositories/HDP-UTILS-1.1.0.20&lt;/A&gt; -d @repo_payload&lt;/PRE&gt;&lt;P&gt;Payload&lt;/P&gt;&lt;PRE&gt;{
	"Repositories": {
		"base_url": "http://c6601.ambari.apache.org/HDP-UTILS-1.1.0.20/repos/centos6",
		"verify_base_url": true
	}
}
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;HDP:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;curl -H "X-Requested-By: ambari" -X PUT -u admin:&amp;lt;PASSWORD&amp;gt; &lt;A href="http://c6601.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/operating_systems/redhat6/repositories/HDP-2.2" target="_blank"&gt;http://c6601.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/operating_systems/redhat6/repositories/HDP-2.2&lt;/A&gt; -d @repo_payload
&lt;/PRE&gt;&lt;P&gt;Payload&lt;/P&gt;&lt;PRE&gt;{
	"Repositories": {
		"base_url": "http://c6601.ambari.apache.org/HDP/centos6/2.x/updates/2.2.4.2",
		"verify_base_url": true
	}
}
&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Nov 2015 14:20:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96861#M10401</guid>
      <dc:creator>jstraub</dc:creator>
      <dc:date>2015-11-11T14:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Use cURL to make an API call to change base URL repository for Ambari Blueprints deployment?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96862#M10402</link>
      <description>&lt;P&gt;That was it! Thanks Jonas!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 22:12:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Use-cURL-to-make-an-API-call-to-change-base-URL-repository/m-p/96862#M10402</guid>
      <dc:creator>jeden</dc:creator>
      <dc:date>2015-11-11T22:12:52Z</dc:date>
    </item>
  </channel>
</rss>

