You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Matthew Mead-Briggs (JIRA)" <ji...@apache.org> on 2017/09/20 16:24:00 UTC

[jira] [Comment Edited] (MESOS-7886) Add master hook for setting environment variables

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

Matthew Mead-Briggs edited comment on MESOS-7886 at 9/20/17 4:23 PM:
---------------------------------------------------------------------

[~kaysoky] here's a sample diff to show what this might look like:
https://gist.github.com/mattmb/a273801c43ce127fe1c311b9fdc8d8f2

I haven't written any tests and really this is just copy paste from the masterLaunchTaskLabelDecorator. What are your thoughts? I'm still convinced this is the way for us to go at Yelp. Do you think it's worth tidying this up and submitting a patch?

I have tried this out by compiling it locally and writing a simple hook to inject an env var and it seems to work fine.


was (Author: mmb):
[~kaysoky] here's a sample diff to show what this might look like:
https://gist.github.com/mattmb/a273801c43ce127fe1c311b9fdc8d8f2

I haven't written any tests and really this is just copy paste from the masterLaunchTaskLabelDecorator. What are your thoughts? I'm still convinced this is the way for us to go at Yelp. Do you think it's worth tidying this up and submitting a patch?

> Add master hook for setting environment variables
> -------------------------------------------------
>
>                 Key: MESOS-7886
>                 URL: https://issues.apache.org/jira/browse/MESOS-7886
>             Project: Mesos
>          Issue Type: Improvement
>          Components: modules
>            Reporter: Matthew Mead-Briggs
>
> At Yelp we're planning to integrate our secret store with our platform as a service which runs on Mesos.
> I was hoping to write a module to "inject" environment variables on the master side but the necessary hook doesn't currently exist. Such a hook already exists on the slave side. However, for this integration that would require me to give all the agents access to the secret store and I'd much prefer to limit this to the master side.
> There is already a hook for adding labels:
> https://github.com/apache/mesos/blob/72752fc6deb8ebcbfbd5448dc599ef3774339d31/include/mesos/hook.hpp#L44-L48
> So it seems it should be pretty easy to add one for setting environment variables too? I had a crack the other day but although I got my code to compile something was not working at runtime (note: I'm not a C++ dev). Is there any reason why we wouldn't want such a hook? If anyone can confirm that it's a sane thing to add then I'd be happy to spend some time trying to get it working (although I may need some help)!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)