Re: hostname param for slave

2016-09-12 Thread Alejandro Fernandez
Typically, a template file will reference a python variable, e.g., 
{{slave_hosts}}
In params.py or params_linux.py, you can define slave_hosts = 
default("/clusterHostInfo/my_component_hosts", [])

Thanks,
Alejandro

From: Amanda Moran mailto:amanda.mo...@esgyn.com>>
Reply-To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" 
mailto:user@ambari.apache.org>>
Date: Monday, September 12, 2016 at 11:39 AM
To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" 
mailto:user@ambari.apache.org>>
Subject: Re: hostname param for slave

I would also like to know the answer to this.

I would like to add on to this a bit... is there a way to know at install time 
for the service to know all the nodes it is being installed on?

Thanks!

On Mon, Sep 12, 2016 at 2:59 AM, Satyanarayana Jampa 
mailto:sja...@innominds.com>> wrote:
Hi,
I have written a Ambari service which is a slave component.
In this service, I have a template which is my configuration file. This 
file needs the "hostname" as one of its field.
   Example template below:
host = ''
  accesslog = '/opt/purple/accesslog.out'
   errorlog = '/opt/purple/gunicorn.out'

How can I get the HOSTNAME of the specific hosts on which the slave 
component is being installed in to the template file.

Thanks,
Satya.




--
Thanks,

Amanda Moran


Re: hostname param for slave

2016-09-12 Thread Amanda Moran
I would also like to know the answer to this.

I would like to add on to this a bit... is there a way to know at install
time for the service to know all the nodes it is being installed on?

Thanks!

On Mon, Sep 12, 2016 at 2:59 AM, Satyanarayana Jampa 
wrote:

> Hi,
>
> I have written a Ambari service which is a slave component.
>
> In this service, I have a template which is my configuration file.
> This file needs the “hostname” as one of its field.
>
>*Example template below:*
>
> host = ''
>
>   accesslog = '/opt/purple/accesslog.out'
>
>errorlog = '/opt/purple/gunicorn.out'
>
>
>
> How can I get the HOSTNAME of the specific hosts on which the slave
> component is being installed in to the template file.
>
>
>
> Thanks,
>
> Satya.
>
>
>



-- 
Thanks,

Amanda Moran


hostname param for slave

2016-09-12 Thread Satyanarayana Jampa
Hi,
I have written a Ambari service which is a slave component.
In this service, I have a template which is my configuration file. This 
file needs the "hostname" as one of its field.
   Example template below:
host = ''
  accesslog = '/opt/purple/accesslog.out'
   errorlog = '/opt/purple/gunicorn.out'

How can I get the HOSTNAME of the specific hosts on which the slave 
component is being installed in to the template file.

Thanks,
Satya.