<?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: how to install service by API or by other auto way in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193885#M71162</link>
    <description>&lt;P&gt;hi aditye regarding the - &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services&lt;/A&gt;. , can you show me please the full approach ( full syntax )&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2017 20:59:01 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2017-11-10T20:59:01Z</dc:date>
    <item>
      <title>how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193883#M71160</link>
      <description>&lt;P&gt;in my Ambari cluster we have some services that not installed yet&lt;/P&gt;&lt;P&gt;as  graphite service as described here ( in the picture )&lt;/P&gt;&lt;P&gt;what are the API commands that required in order to identify which service is/are available to install &lt;/P&gt;&lt;P&gt;and the API that install the service&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43557-capture1.png" style="width: 1130px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18163iCC5E7B33C9544E65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43557-capture1.png" alt="43557-capture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 06:55:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193883#M71160</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-18T06:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193884#M71161</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can use this API to get all the available services. &lt;/P&gt;&lt;PRE&gt;&lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/repository_versions/{repository-version-no}" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/repository_versions/{repository-version-no}&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Hit the above API and parse "RepositoryVersions -&amp;gt; services" array&lt;/P&gt;&lt;P&gt;To check list of installed services you can use &lt;/P&gt;&lt;PRE&gt;&lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services&lt;/A&gt;.&lt;/PRE&gt;&lt;P&gt;Check the diff between two to find out the services which are not installed&lt;/P&gt;&lt;P&gt;To install the service use&lt;/P&gt;&lt;PRE&gt;curl -u &amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -i -X PUT -d '{"ServiceInfo": {"state" : "INSTALLED"}}'  &lt;A href="http://&amp;lt;ambari-server-host&amp;gt;:{port}/api/v1/clusters/&amp;lt;cluster-name&amp;gt;/services/&amp;lt;service-name&amp;gt;" target="_blank"&gt;http://&amp;lt;ambari-server-host&amp;gt;:{port}/api/v1/clusters/&amp;lt;cluster-name&amp;gt;/services/&amp;lt;service-name&amp;gt;&lt;/A&gt;;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 20:53:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193884#M71161</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-10T20:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193885#M71162</link>
      <description>&lt;P&gt;hi aditye regarding the - &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services&lt;/A&gt;. , can you show me please the full approach ( full syntax )&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 20:59:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193885#M71162</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-10T20:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193886#M71163</link>
      <description>&lt;P&gt;&lt;STRONG&gt;get list of available services&lt;/STRONG&gt; : curl -k -u {username}:{password} -H "X-Requested-By:ambari" -i -X GET  &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/repository_versions/{repository-version-no}" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/repository_versions/{repository-version-no}&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Get list of installed services&lt;/STRONG&gt;: curl -k -u {username}:{password} -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To get the {stack-version-no} you can hit below API and see the available stack versions&lt;/P&gt;&lt;PRE&gt;curl -k -u {username}:{password} -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Similarly to get {repository-version-no}, get {stack-version-no} from above call and hit below url&lt;/P&gt;&lt;PRE&gt;curl -k -u {username}:{password} -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;replace the placeholders with your values&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 21:03:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193886#M71163</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-10T21:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193887#M71164</link>
      <description>&lt;P&gt;hi aditye , can you give me real example for the first API &lt;/P&gt;&lt;P&gt;second how to get these values ? &lt;/P&gt;&lt;P&gt;stack_versions&lt;/P&gt;&lt;P&gt;{stack-version-no}&lt;/P&gt;&lt;P&gt;repository_versions&lt;/P&gt;&lt;P&gt;{repository-version-no}&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 21:07:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193887#M71164</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-10T21:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193888#M71165</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;To get the {stack-version-no} , hit below API &lt;/P&gt;&lt;PRE&gt;curl -k -u {username}:{password} -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/&lt;/A&gt;

ex: curl -k -u admin:admin -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://172.31.192.200:8080/api/v1/clusters/cl1/stack_versions" target="_blank"&gt;http://172.31.192.200:8080/api/v1/clusters/cl1/stack_versions&lt;/A&gt;

{
  "href" : "http://172.31.192.200:8080/api/v1/clusters/cl1/stack_versions",
  "items" : [
    {
      "href" : "http://172.31.192.200:8080/api/v1/clusters/cl1/stack_versions/1",  --&amp;gt; stack version no
      "ClusterStackVersions" : {
        "cluster_name" : "cl1",
        "id" : 1,
        "repository_version" : 1,
        "stack" : "HDP",
        "version" : "2.6"
      }
    }
  ]
}
&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;To get {repository-version-no} , hit below API &lt;/P&gt;&lt;PRE&gt;curl -k -u {username}:{password} -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}&lt;/A&gt;

ex: curl -k -u admin:admin -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://172.31.192.200:8080/api/v1/clusters/cl1/stack_versions/1" target="_blank"&gt;http://172.31.192.200:8080/api/v1/clusters/cl1/stack_versions/1&lt;/A&gt;

{
  "href" : "http://x.x.x.x:8080/api/v1/clusters/cl1/stack_versions/1/",
  "ClusterStackVersions" : {
    "cluster_name" : "cl1",
    "id" : 1,
    "repository_version" : 1,
    "stack" : "HDP",
    "state" : "CURRENT",
    "version" : "2.6",
    "host_states" : {
      "CURRENT" : [
        "hbase-migration-repro-4.novalocal",
        "hbase-migration-repro-1.novalocal",
        "hbase-migration-repro-3.novalocal",
        "hbase-migration-repro-2.novalocal"
      ],
      "INIT" : [ ],
      "INSTALLED" : [ ],
      "INSTALLING" : [ ],
      "INSTALL_FAILED" : [ ],
      "NOT_REQUIRED" : [ ],
      "OUT_OF_SYNC" : [ ]
    }
  },
  "repository_versions" : [
    {
      "href" : "http://x.x.x.x:8080/api/v1/clusters/hbasetest/stack_versions/1/repository_versions/51", --- &amp;gt; repository version no
      "RepositoryVersions" : {
        "id" : 51,
        "stack_name" : "HDP",
        "stack_version" : "2.6"
      }
    }
  ]
}
&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;Then you can hit the final API&lt;/P&gt;&lt;PRE&gt;curl -k -u {username}:{password} -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/repository_versions/{repository-version-no}" target="_blank"&gt;http://{ambari-server}:{port}/api/v1/clusters/{clustername}/stack_versions/{stack-version-no}/repository_versions/{repository-version-no}&lt;/A&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Nov 2017 21:15:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193888#M71165</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-10T21:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193889#M71166</link>
      <description>&lt;P&gt;hi aditya , everything was great until I intend to install the service &lt;/P&gt;&lt;P&gt;for this example we try to install the service - Knox&lt;/P&gt;&lt;P&gt;I try this:&lt;/P&gt;&lt;P&gt;curl -u xxxx:xxxx -i -X PUT -d '{"ServiceInfo": {"state" : "INSTALLED"}}'  &lt;A href="http://182.243.5.12" target="_blank"&gt;http://182.243.5.12&lt;/A&gt; :8080/api/v1/clusters/HDP101/services/Knox&lt;/P&gt;&lt;P&gt;HTTP/1.1 400 Bad Request
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: no-store
Pragma: no-cache
Set-Cookie: AMBARISESSIONID=13q980rkix8lh1ewku7n3xlhfh;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
User: admin
Content-Type: text/plain
Content-Length: 107
Server: Jetty(8.1.19.v20160209)&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 03:09:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193889#M71166</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-12T03:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193890#M71167</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="43571-capture.png" style="width: 422px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18162i0CADAE8E19CFAAAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="43571-capture.png" alt="43571-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is how I check the service name&lt;/P&gt;&lt;P&gt;curl -k -u xxxxx:xxxx -H "X-Requested-By:ambari" -i -X GET &lt;A href="http://182.243.5.12" target="_blank" rel="nofollow noopener noreferrer"&gt;http://182.243.5.12&lt;/A&gt;&lt;BR /&gt; :8080/api/v1/clusters/HDP101/stack_versions/1/repository_versions/1 | grep display_name | grep -i knox &lt;/P&gt;&lt;P&gt;  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11316  100 11316    0     0   603k      0 --:--:-- --:--:-- --:--:--  613k
        "display_name" : "Knox",&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 06:55:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193890#M71167</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-18T06:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193891#M71168</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I thought it was only an install. If you want to add a service and install the service, there are series of steps which you need to do.&lt;/P&gt;&lt;P&gt;This doc will help you. Currently I do not have configuration for knox which is required in Step 3.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 14:28:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193891#M71168</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-12T14:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193892#M71169</link>
      <description>&lt;P&gt;hi Aditya , just to be clear the status for now is that , from ambari GUI when I go to actions --&amp;gt; add service , then I see the Knox service but it is  uncheck in the checkbox  !  , so what are the steps from here ? , do we need in this case to do  ( add service and install service ? )&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 17:03:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193892#M71169</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-12T17:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to install service by API or by other auto way</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193893#M71170</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Yes. You need to add the service -&amp;gt; install the service and start the service. If you do it from Ambari , it will take care of all these after "Configure services" step &lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 18:07:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-install-service-by-API-or-by-other-auto-way/m-p/193893#M71170</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2017-11-12T18:07:34Z</dc:date>
    </item>
  </channel>
</rss>

