[ 
https://issues.apache.org/jira/browse/MESOS-3787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14974722#comment-14974722
 ] 

Stephen Degler commented on MESOS-3787:
---------------------------------------

Our goal is to discover some information dynamically.   Variables are captured 
from the environment and expanded prior to launching the container.

We've gone ahead and developed the attached patch as a proof of concept. It 
certainly leaks memory but we didn't want to unconst the taskInfo everywhere 
until we got feedback about our approach.

In our case it works in conjunction with a kerberos ticket forwarding hook 
(which sets KRB5CCNAME in the first place) to map kerberos credentials into the 
docker container, but it is generalized and could be used for other purposes as 
well.
Also attached is a sample json file suitable for submitting a job to marathon 
that expands ${KRB5CCNAME} and maps it into the container, both as a volume (to 
capture the ticket) and to set the KRB5CCNAME environment
variable within the docker instance.

This patch is against 24.1 but it applies to head as well.


> As a developer, I'd like to be able to expand environment variables through 
> the Docker executor.
> ------------------------------------------------------------------------------------------------
>
>                 Key: MESOS-3787
>                 URL: https://issues.apache.org/jira/browse/MESOS-3787
>             Project: Mesos
>          Issue Type: Wish
>            Reporter: John Garcia
>              Labels: mesosphere
>         Attachments: mesos.patch, test-example.json
>
>
> We'd like to have expanded variables usable in [the json files used to create 
> a Marathon app, hence] the Task's CommandInfo, so that the executor is able 
> to detect the correct values at runtime.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to