mesoscloud / mesos-master

Mesos Master
https://hub.docker.com/r/mesoscloud/mesos-master/
MIT License
15 stars 16 forks source link

Where are those ENV variables being used in container? #2

Open tomqwu opened 8 years ago

tomqwu commented 8 years ago

I don't see any replacement for MESOS_ZK and other env variable being defined in run statement, in /etc/mesos/zk, I am still seeing the default localhost being used, is mesos using environment MESOS_ZK overriding the /etc/mesos/zk? Or I need to have my own init script to replace /etc/mesos/zk with MESOS_ZK? Please advise.

odzhu commented 8 years ago

Good question, I think by mesos daemon itself.

Have you found an answer ?

xianlubird commented 8 years ago

Someone could have some resolved method? Where can we find these ENV in script?

tntC4stl3 commented 8 years ago

According to official document, you can set configuration in binary options or set a environment variable with MESOS_ prefix.

The Mesos master and slave can take a variety of configuration options through command-line arguments, or environment variables. A list of the available options can be seen by running mesos-master --help or mesos-slave --help. Each option can be set in two ways:

  • By passing it to the binary using --option_name=value, either specifying the value directly, or specifying a file in which the value resides (--option_name=file://path/to/file). The path can be absolute or relative to the current working directory.
  • By setting the environment variable MESOS_OPTIONNAME (the option name with a MESOS prefix added to it).
odzhu commented 8 years ago

Confirmed, the above method works.

xianlubird commented 8 years ago

Good idea