I've got some mesos-slave nodes that I would like to expose to the internet. As such, I would like mesos-slave to offer port 80 and 443 in addition to its default slew of ports/resources.
From what I have gathered, I need to adjust the --resources
parameter and include both 80 and 443 in the port resource offerings. However, from my tests, in doing this, I must also hard-code the machine's CPU/Mem/Disk offerings as well (as opposed to allowing mesos-slave to determine these at runtime).
Because the size of nodes I want to run mesos-slave
on may change in the future, I want to avoid hardcoding the CPU/Mem/Disk offerings and let them be determined at runtime. How do I change mesos-slave's port --resource
offerings without hardcoding the CPU/Mem/Disk offerings? Ideally such a system would be additive: "offer port 80/443 in addition to the default ports".
Best!
Advait
Even after specifying the ports resource Disk, CPU, Mem should be added automatically (see log excerpt) below.
mesos-slave.sh --master=xxxx:5050 --resources=ports:80
I0503 20:48:04.999114 2057073408 main.cpp:200] Starting Mesos slave
I0503 20:48:05.000370 243535872 slave.cpp:316] Slave resources: ports(*):80; cpus(*):8; mem(*):15360; disk(*):470848
Unfortunately the ports are not additive anymore... Maybe one idea could be to specify an new resource for those ports (you should be sure nothing else outside mesos uses these ports). I.e. you could be to specify --resources=port80:1;port443:1.
build joergschad$ bin/mesos-slave.sh --master=xxxx:5050 --resources=port80:1
I0503 20:58:52.742509 119599104 slave.cpp:316] Slave resources: port80(*):1; cpus(*):8; mem(*):15360; disk(*):470848; ports(*):[31000-32000]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With