docker_practice/mesos/configuration.md

173 lines
12 KiB
Go
Raw Normal View History

2015-06-29 18:20:31 +08:00
## Mesos
2017-05-02 23:17:58 +08:00
Mesos
2015-06-29 18:20:31 +08:00
2017-05-02 23:17:58 +08:00
Mesos master slave master slave
2015-06-29 18:20:31 +08:00
2017-05-02 23:17:58 +08:00
Mesos
2015-06-29 18:20:31 +08:00
###
2017-05-02 23:17:58 +08:00
* `--advertise_ip=VALUE` 访访 master
* `--advertise_port=VALUE` 访
* `--external_log_file=VALUE` Web
* `--firewall_rules=VALUE` endpoint `VALUE` JSON JSON
* `--ip=VALUE` IP
* `--log_dir=VALUE`
* `--logbufsecs=VALUE` buffer
* `--logging_level=VALUE`
* `--port=VALUE` master 5050slave 5051
2015-06-29 18:20:31 +08:00
### master
2017-05-02 23:17:58 +08:00
Mesos master
`mesos-master --help`
* `--quorum=VALUE` 使 replicated-Log ZooKeeper HA
* `--work_dir=VALUE`
* `--zk=VALUE` HA ZooKeepr `zk://username:password@host1:port1,host2:port2,.../path`
* `--acls=VALUE` ACL
* `--allocation_interval=VALUE` allocation 1sec
* `--allocator=VALUE` HierarchicalDRF
* `--[no-]authenticate` framework
* `--[no-]authenticate_slaves` slaves
* `--authenticators=VALUE` framework salves
* `--cluster=VALUE` Web
* `--credentials=VALUE`
* `--external_log_file=VALUE`
* `--framework_sorter=VALUE` framework
* `--hooks=VALUE` master hook
* `--hostname=VALUE` master 使
* `--[no-]log_auto_initialize` replicated
* `--modules=VALUE` JSON
* `--offer_timeout=VALUE` offer
* `--rate_limits=VALUE` framework query per second (qps)
* `--recovery_slave_removal_limit=VALUE` slave master 100%
* `--slave_removal_rate_limit=VALUE slave` 1/10mins
* `--registry=VALUE` `replicated_log` `in_memory`
* `--registry_fetch_timeout=VALUE` 访
* `--registry_store_timeout=VALUE`
* `--[no-]registry_strict` false
* `--roles=VALUE` framework
* `--[no-]root_submissions` root framework true
* `--slave_reregister_timeout=VALUE` lead master slave salve 10mins
* `--user_sorter=VALUE` drf
* `--webui_dir=VALUE` webui `/usr/local/share/mesos/webui`
* `--weights=VALUE`
* `--whitelist=VALUE` offer slave None
* `--zk_session_timeout=VALUE` session 10secs
* `--max_executors_per_slave=VALUE` `--with-network-isolator` slave
master `/tmp/mesos` `mesos_cluster`
```sh
mesos-master \
--zk=zk://10.0.0.2:2181,10.0.0.3:2181,10.0.0.4:2181/mesos \
--quorum=2 \
--work_dir=/tmp/mesos \
--cluster=mesos_cluster
```
2015-06-29 18:20:31 +08:00
### slave
2017-05-02 23:17:58 +08:00
slave
`mesos-slave --help`
* `--master=VALUE` master ZooKeeper
* `--attributes=VALUE`
* `--authenticatee=VALUE` master
* `--[no-]cgroups_enable_cfs` CFS CPU false
* `--cgroups_hierarchy=VALUE` cgroups `/sys/fs/cgroup`
* `--[no-]cgroups_limit_swap` swap false
* `--cgroups_root=VALUE` cgroups mesos
* `--container_disk_watch_interval=VALUE`
* `--containerizer_path=VALUE` `--isolation=external`
* `--containerizers=VALUE` mesosexternaldocker
* `--credential=VALUE`
* `--default_container_image=VALUE` 使
* `--default_container_info=VALUE`
* `--default_role=VALUE`
* `--disk_watch_interval=VALUE` 使 1mins
* `--docker=VALUE` docker
* `--docker_remove_delay=VALUE` 6hrs
* `--[no-]docker_kill_orphans` true
* `--docker_sock=VALUE` docker sock `/var/run/docker.sock`
* `--docker_mesos_image=VALUE` slave docker docker slave docker
* `--docker_sandbox_directory=VALUE` sandbox
* `--docker_stop_timeout=VALUE` kill 0secs
* `--[no-]enforce_container_disk_quota` false
* `--executor_registration_timeout=VALUE` slave 1mins
* `--executor_shutdown_grace_period=VALUE` 5secs
* `--external_log_file=VALUE`
* `--fetcher_cache_size=VALUE` fetcher cache 2 GB
* `--fetcher_cache_dir=VALUE` fetcher cache /tmp/mesos/fetch
* `--frameworks_home=VALUE`
* `--gc_delay=VALUE` 1weeks
* `--gc_disk_headroom=VALUE` 0.1
* `--hadoop_home=VALUE` hadoop HADOOP_HOME
* `--hooks=VALUE` master hook
* `--hostname=VALUE` slave 使
* `--isolation=VALUE` `posix/cpu,posix/mem` `cgroups/cpu,cgroups/mem``external`
* `--launcher_dir=VALUE` mesos `/usr/local/lib/mesos`
* `--image_providers=VALUE` 'APPC,DOCKER'
* `--oversubscribed_resources_interval=VALUE` slave
* `--modules=VALUE` JSON
* `--perf_duration=VALUE` perf perf_interval 10secs
* `--perf_events=VALUE` perf
* `--perf_interval=VALUE` perf
* `--qos_controller=VALUE` QoS
* `--qos_correction_interval_min=VALUE` Qos 0secs
* `--recover=VALUE` reconnectcleanup 退
* `--recovery_timeout=VALUE` slave 退 15mins
* `--registration_backoff_factor=VALUE` master 1secs 1mins
* `--resource_monitoring_interval=VALUE` 使 1secs
* `--resources=VALUE` slave [31000, 32000]
* `--[no-]revocable_cpu_low_priority` CPU true
* `--slave_subsystems=VALUE` slave cgroup memorycpuacct
* `--[no-]strict` true
* `--[no-]switch_user` true
* `--work_dir=VALUE` framework /tmp/mesos
`--with-network-isolator` 使 ` --with-network-isolator`
* `--ephemeral_ports_per_container=VALUE` 2 1024
* `--eth0_name=VALUE` public
* `--lo_name=VALUE` loopback
* `--egress_rate_limit_per_container=VALUE` fq_codel
* `--[no-]-egress_unique_flow_per_container` false
* `--[no-]network_enable_socket_statistics` socket false
slave Docker `10.0.0.10` 16 CPU64 GB [31000-32000] [32768-57344] 512 50 MB/s
```sh
mesos-slave \
--master=zk://10.0.0.2:2181,10.0.0.3:2181,10.0.0.4:2181/mesos \
--containerizers=docker \
--ip=10.0.0.10 \
--isolation=cgroups/cpu,cgroups/mem,network/port_mapping \
--resources=cpus:16;mem:64000;ports:[31000-32000];ephemeral_ports:[32768-57344] \
--ephemeral_ports_per_container=512 \
--egress_rate_limit_per_container=50000KB \
--egress_unique_flow_per_container
```
```sh
$ echo "57345 61000" > /proc/sys/net/ipv4/ip_local_port_range
```
* Mesos 使*