Great, so you don't need to get hold of ambari-agent individually. You can
create the bootstrap request to setup the agents. Then you can go on to
create the cluster.

something like below:
'''
        Call bootstrap with host list and ssh key of root

        curl -i -u admin:admin -H 'X-Requested-By: ambari' -H
'Content-Type: application/json' -X POST -d'{
           "verbose":true,
           "sshKey":"-----BEGIN RSA PRIVATE
KEY-----\nPRIVATE-KEY-CONTENT-HERE\n----END RSA PRIVATE KEY-----\n",
           "hosts":[
              "c6401.ambari.apache.org",
              "c6402.ambari.apache.org",
              "c6403.ambari.apache.org"
           ],
           "user":"vagrant"
        }' http://localhost:8080/api/v1/bootstrap

        RESPONSE
        {"status":"OK","log":"Running Bootstrap now.","requestId":1}

        CHECK STATUS
        curl -i -uadmin:admin http://localhost:8080/api/v1/bootstrap/1

        {"status":"RUNNING","hostsStatus":[{"hostName":"
c6401.ambari.apache.org","status":"RUNNING","log":""},{"hostName":"
c6402.ambari.apache.org","status":"RUNNING","log":""},{"hostName":"
c6403.ambari.apache.org","status":"RUNNING","log":""}],"log":""}

        SUCCESS
        {"status":"SUCCESS","hostsStatus":[{"hostName":"
c6401.ambari.apache.org","status":"DONE","statusCode":"0","log":"...."}

        else FAILURE

Thanks,
Bhuvnesh Chaudhary
Email: bchau <[email protected]>[email protected]
Desk: +1-650-846-1696 | Mobile: +1-973-906-6976

On Wed, Nov 18, 2015 at 3:34 PM, Naga Vijay <[email protected]> wrote:

> Hi Bhuvnesh,
>
> I am trying out total end-to-end automation ...
>
> . Creating VMs
> . Creating a Cluster with the VMs
>
> I could get the Ambari Server {Setup,Start} as part of the automation, and
> am now stalled at the point wherein I need Ambari Agent (before doing the
> Blueprints things to create the cluster from a reference/template cluster).
>
> Thanks
> Naga
>
>
> On Wed, Nov 18, 2015 at 3:18 PM, Bhuvnesh Chaudhary <[email protected]
> > wrote:
>
>> Hello Naga,
>>
>> Could you please elaborate what you are trying to achieve ?
>> Also, when you login to Ambari UI, you essentially do not deal with
>> Ambari Agent directly. You have options related to services which are
>> available on the UI and you just trigger those which calls the backend
>> operations.
>>
>> Thanks,
>> Bhuvnesh Chaudhary
>> Email: bchau <[email protected]>[email protected]
>> Desk: +1-650-846-1696 | Mobile: +1-973-906-6976
>>
>> On Wed, Nov 18, 2015 at 3:00 PM, Naga Vijay <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> Is there a way to get hold of ambari-agent without stepping into Ambari
>>> UI?
>>>
>>> Thanks
>>> Naga
>>>
>>
>>
>

Reply via email to