You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Sudharshan Krishnamurthy <sk...@hexiscyber.com> on 2014/07/29 01:23:04 UTC

RestAPI for pushing a configuration to a component in 1.2.4

Hello

Is there any rest API currently as part of  1.2.4 server stack to push configuration in the form of Json or a file to a specific component installed on a particular host ?

Regards
Sud

Re: RestAPI for pushing a configuration to a component in 1.2.4

Posted by Jeff Sposetti <je...@hortonworks.com>.
You can also checkout this wiki page on Ambari Stacks. The "Custom Client
Service" example might be worth looking at...

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=38571133


On Tue, Jul 29, 2014 at 4:11 PM, Siddharth Wagle <sw...@hortonworks.com>
wrote:

> Correct URL:
>
>
> https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py
>
> -Sid
>
>
> On Tue, Jul 29, 2014 at 1:07 PM, Siddharth Wagle <sw...@hortonworks.com>
> wrote:
>
>> You can create a config and attach it to any service and thereby a host
>> component. The config will be sent to the host on any execution command,
>> example: START/STOP.
>>
>> However, you would need to add a small snippet of code (4 lines) for the
>> configuration to be applied on the host. Take a look at the XMLConfig
>> element here,
>> https://github.com/hortonworks/ambari/blob/apache-ref/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py
>>
>> The the automated mechanism is a good idea. Maybe you can open a Jira for
>> the same. Although, it is probably easier to change the stack definition
>> for a quicker resolution if so desired.
>>
>> -Sid
>>
>> On Tue, Jul 29, 2014 at 12:42 PM, Aaron Cody <ac...@hexiscyber.com>
>> wrote:
>>
>>>
>>>  is there any mechanism available (preferably a REST call) to push an
>>> arbitrary file out to a host or hosts in the cluster?
>>>
>>
>>
>
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity
> to which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Re: RestAPI for pushing a configuration to a component in 1.2.4

Posted by Siddharth Wagle <sw...@hortonworks.com>.
Correct URL:

https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py

-Sid


On Tue, Jul 29, 2014 at 1:07 PM, Siddharth Wagle <sw...@hortonworks.com>
wrote:

> You can create a config and attach it to any service and thereby a host
> component. The config will be sent to the host on any execution command,
> example: START/STOP.
>
> However, you would need to add a small snippet of code (4 lines) for the
> configuration to be applied on the host. Take a look at the XMLConfig
> element here,
> https://github.com/hortonworks/ambari/blob/apache-ref/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py
>
> The the automated mechanism is a good idea. Maybe you can open a Jira for
> the same. Although, it is probably easier to change the stack definition
> for a quicker resolution if so desired.
>
> -Sid
>
> On Tue, Jul 29, 2014 at 12:42 PM, Aaron Cody <ac...@hexiscyber.com> wrote:
>
>>
>>  is there any mechanism available (preferably a REST call) to push an
>> arbitrary file out to a host or hosts in the cluster?
>>
>
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Re: RestAPI for pushing a configuration to a component in 1.2.4

Posted by Siddharth Wagle <sw...@hortonworks.com>.
You can create a config and attach it to any service and thereby a host
component. The config will be sent to the host on any execution command,
example: START/STOP.

However, you would need to add a small snippet of code (4 lines) for the
configuration to be applied on the host. Take a look at the XMLConfig
element here,
https://github.com/hortonworks/ambari/blob/apache-ref/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/package/scripts/hdfs.py

The the automated mechanism is a good idea. Maybe you can open a Jira for
the same. Although, it is probably easier to change the stack definition
for a quicker resolution if so desired.

-Sid

On Tue, Jul 29, 2014 at 12:42 PM, Aaron Cody <ac...@hexiscyber.com> wrote:

>
>  is there any mechanism available (preferably a REST call) to push an
> arbitrary file out to a host or hosts in the cluster?
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Re: RestAPI for pushing a configuration to a component in 1.2.4

Posted by Aaron Cody <ac...@hexiscyber.com>.
is there any mechanism available (preferably a REST call) to push an arbitrary file out to a host or hosts in the cluster?

Re: RestAPI for pushing a configuration to a component in 1.2.4

Posted by Siddharth Wagle <sw...@hortonworks.com>.
Hi Sudarshan,

You can upgrade Ambari without upgrading stack components.

With 1.2.4 you should upgrade to 1.2.5 first (stable base release which is
included in upgrade unit tests) and then to 1.6.1.

-Sid


On Mon, Jul 28, 2014 at 5:53 PM, Sudharshan Krishnamurthy <
skrishnamurthy@hexiscyber.com> wrote:

>  Hi Sid,
>
>  Thanks for your quick response.
>
>
>    1. We are are at 1.2.4.
>    2. I hope the process is the same for 1.24  in pushing the
>    configuration  …./var/lib/ambari-server/resources/scripts/configs.sh ?
>    3. For pushing  to a specific component installed on a particular
>    host:  I am guessing we have no choice but to upgrade ?  Or some custom
>    stuff with configs.sh I am guessing .
>
> Regards
> Sud
>
>   From: Siddharth Wagle <sw...@hortonworks.com>
> Reply-To: "user@ambari.apache.org" <us...@ambari.apache.org>
> Date: Monday, July 28, 2014 at 5:15 PM
> To: "user@ambari.apache.org" <us...@ambari.apache.org>
> Subject: Re: RestAPI for pushing a configuration to a component in 1.2.4
>
>     Hi Sudarshan,
>
>  1. What version of Ambari are you on? (This will decide what feature
> support you have, regardless of the stack version).
> 2. push configuration in the form of Json or a file.
>  -   This can be done with
> /var/lib/ambari-server/resources/scripts/configs.sh (Not sure which version
> of this file but if you pick latest from git it will work with one of the
> newer versions of Ambari like 1.5.0)
> 3. to a specific component installed on a particular host.
>  -  This feature is available through Config groups added in release 1.4.3
> (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=30755705
> )
>     You can add a host to a Config group and add a config e.g.: core-site
> for that config group with customized overrides.
>
>  -Sid
>
>
>
> On Mon, Jul 28, 2014 at 4:23 PM, Sudharshan Krishnamurthy <
> skrishnamurthy@hexiscyber.com> wrote:
>
>>  Hello
>>
>>  Is there any rest API currently as part of  1.2.4 server stack to push
>> configuration in the form of Json or a file to a specific component
>> installed on a particular host ?
>>
>>  Regards
>> Sud
>>
>
>
> CONFIDENTIALITY NOTICE
> NOTICE: This message is intended for the use of the individual or entity
> to which it is addressed and may contain information that is confidential,
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any printing, copying, dissemination, distribution, disclosure or
> forwarding of this communication is strictly prohibited. If you have
> received this communication in error, please contact the sender immediately
> and delete it from your system. Thank You.
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Re: RestAPI for pushing a configuration to a component in 1.2.4

Posted by Sudharshan Krishnamurthy <sk...@hexiscyber.com>.
Hi Sid,

Thanks for your quick response.


  1.  We are are at 1.2.4.
  2.  I hope the process is the same for 1.24  in pushing the configuration  …./var/lib/ambari-server/resources/scripts/configs.sh ?
  3.  For pushing  to a specific component installed on a particular host:  I am guessing we have no choice but to upgrade ?  Or some custom stuff with configs.sh I am guessing .

Regards
Sud

From: Siddharth Wagle <sw...@hortonworks.com>>
Reply-To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Date: Monday, July 28, 2014 at 5:15 PM
To: "user@ambari.apache.org<ma...@ambari.apache.org>" <us...@ambari.apache.org>>
Subject: Re: RestAPI for pushing a configuration to a component in 1.2.4

Hi Sudarshan,

1. What version of Ambari are you on? (This will decide what feature support you have, regardless of the stack version).
2. push configuration in the form of Json or a file.
-   This can be done with /var/lib/ambari-server/resources/scripts/configs.sh (Not sure which version of this file but if you pick latest from git it will work with one of the newer versions of Ambari like 1.5.0)
3. to a specific component installed on a particular host.
-  This feature is available through Config groups added in release 1.4.3 (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=30755705)
   You can add a host to a Config group and add a config e.g.: core-site for that config group with customized overrides.

-Sid



On Mon, Jul 28, 2014 at 4:23 PM, Sudharshan Krishnamurthy <sk...@hexiscyber.com>> wrote:
Hello

Is there any rest API currently as part of  1.2.4 server stack to push configuration in the form of Json or a file to a specific component installed on a particular host ?

Regards
Sud


CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.

Re: RestAPI for pushing a configuration to a component in 1.2.4

Posted by Siddharth Wagle <sw...@hortonworks.com>.
Hi Sudarshan,

1. What version of Ambari are you on? (This will decide what feature
support you have, regardless of the stack version).
2. push configuration in the form of Json or a file.
-   This can be done with
/var/lib/ambari-server/resources/scripts/configs.sh (Not sure which version
of this file but if you pick latest from git it will work with one of the
newer versions of Ambari like 1.5.0)
3. to a specific component installed on a particular host.
-  This feature is available through Config groups added in release 1.4.3 (
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=30755705)
   You can add a host to a Config group and add a config e.g.: core-site
for that config group with customized overrides.

-Sid



On Mon, Jul 28, 2014 at 4:23 PM, Sudharshan Krishnamurthy <
skrishnamurthy@hexiscyber.com> wrote:

>  Hello
>
>  Is there any rest API currently as part of  1.2.4 server stack to push
> configuration in the form of Json or a file to a specific component
> installed on a particular host ?
>
>  Regards
> Sud
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.