You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by Nathaniel Braun <n....@criteo.com> on 2015/06/10 17:08:01 UTC

Use variables in "components" property in app config JSON file

Hi,

In order to determine the principal name to use in my Kerberized AM, I need the hostname of the machine the AM executes on.

Here is the part of the appConfig.json I'm interested in:

  "components": {
    "slider-appmaster": {
      "jvm.heapsize": "256M",
      "slider.hdfs.keytab.dir": ".slider/keytabs",
      "slider.am.login.keytab.name": "httpfs.keytab",
      "slider.keytab.principal.name" : "${THIS_HOST}@{KERBEROS_REALM} "
    }

Basically, I need THIS_HOST and KERBEROS_REALM to be replaced with their actual values, coming from the AM's machine.

This does not work right now, those values are not interpreted.

Thanks for your help.

Regards,
Nathaniel


Re: Use variables in "components" property in app config JSON file

Posted by Steve Loughran <st...@hortonworks.com>.
right  now we've steered clear of doing any form of variable, or x-ref in the config files, though I do have my eye on the @{variable} pattern in future.

One of the reasons is the big question "when and where to evaluate these things", as well as "do you ever need to re-evaluate them as things change". That's the big lazy vs static schism in configuration management tools. 

that keytab binding is an interesting problem though. Slider does know who things were started as, and really needs that to be the same user, in something like user/host@realm. (at least I think so, Kerberos is something I can never claim to understand). 

What are you trying to set it to? something like  node4@realm?

> On 10 Jun 2015, at 16:08, Nathaniel Braun <n....@criteo.com> wrote:
> 
> Hi,
> 
> In order to determine the principal name to use in my Kerberized AM, I need the hostname of the machine the AM executes on.
> 
> Here is the part of the appConfig.json I'm interested in:
> 
>  "components": {
>    "slider-appmaster": {
>      "jvm.heapsize": "256M",
>      "slider.hdfs.keytab.dir": ".slider/keytabs",
>      "slider.am.login.keytab.name": "httpfs.keytab",
>      "slider.keytab.principal.name" : "${THIS_HOST}@{KERBEROS_REALM} "
>    }
> 
> Basically, I need THIS_HOST and KERBEROS_REALM to be replaced with their actual values, coming from the AM's machine.
> 
> This does not work right now, those values are not interpreted.
> 
> Thanks for your help.
> 
> Regards,
> Nathaniel
>