示例
DC/OS Enterprise 的常见示例配置
# DC/OS Open Source only
- 仅适用于 DC/OS。Open Source# DC/OS Enterprise only
- 仅适用于 DC/OS Enterprise。Enterprise
所有参数
此样本 config.yaml
文件包括 DC/OS 的所有可用配置参数。
示例配置
DC/OS 群集,带有内部管理的三个管理节点、五个专用代理和 Exhibitor/ZooKeeper:
---
agent_list:
- <agent-private-ip-1>
- <agent-private-ip-2>
- <agent-private-ip-3>
- <agent-private-ip-4>
- <agent-private-ip-5>
bootstrap_url: 'file:///opt/dcos_install_tmp'
cluster_name: '<cluster-name>'
log_directory: /genconf/logs
master_discovery: static
master_list:
- <master-private-ip-1>
- <master-private-ip-2>
- <master-private-ip-3>
process_timeout: 120
resolvers:
- <dns-resolver-1>
- <dns-resolver-2>
ssh_key_path: /genconf/ssh-key
ssh_port: '<port-number>'
ssh_user: <username>
---
agent_list:
- <agent-private-ip-1>
- <agent-private-ip-2>
- <agent-private-ip-3>
- <agent-private-ip-4>
- <agent-private-ip-5>
aws_access_key_id: AKIAIOSFODNN7EXAMPLE
aws_region: us-west-2
aws_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
bootstrap_url: file:///tmp/dcos
cluster_name: s3-example
exhibitor_storage_backend: aws_s3
exhibitor_explicit_keys: 'true'
log_directory: /genconf/logs
master_discovery: static
master_list:
- <master-private-ip-1>
- <master-private-ip-2>
- <master-private-ip-3>
process_timeout: 120
resolvers:
- <dns-resolver-1>
- <dns-resolver-2>
s3_bucket: mybucket
s3_prefix: s3-example
ssh_key_path: /genconf/ssh-key
ssh_user: <username>
ZooKeeper
DC/OS 群集,带有三个管理节点、一个通过 ZooKeeper 备份的 Exhibitor/ZooKeeper、前面带有 HTTP 负载均衡器的管理节点、一个公共代理节点和 Google DNS:
DC/OS 群集,带有三个管理节点、一个内部管理的 Exhibitor/ZooKeeper、两个 DC/OS 虚拟网络、两个专用代理和 Google DNS:
agent_list:
- <agent-private-ip-1>
- <agent-private-ip-2>
# Use this bootstrap_url value unless you have moved the DC/OS installer assets.
cluster_name: <cluster-name>
master_discovery: static
master_list:
- <master-private-ip-1>
- <master-private-ip-2>
- <master-private-ip-3>
resolvers:
# You probably do not want to use these values since they point to public DNS servers.
# Instead, use values that are more specific to your particular infrastructure.
- 8.8.4.4
- 8.8.8.8
ssh_port: 22
ssh_user: centos
dcos_overlay_enable: true
dcos_overlay_mtu: 9001
dcos_overlay_config_attempts: 6
dcos_overlay_network:
vtep_subnet: 44.128.0.0/20
vtep_mac_oui: 70:B3:D5:00:00:00
overlays:
- name: dcos
subnet: 9.0.0.0/8
prefix: 26
- name: dcos-1
subnet: 192.168.0.0/16
prefix: 24
HTTP 代理
agent_list:
- <agent-private-ip-1>
- <agent-private-ip-2>
# Use this bootstrap_url value unless you have moved the DC/OS installer assets.
bootstrap_url: file:///opt/dcos_install_tmp
cluster_name: <cluster-name>
master_discovery: static
master_list:
- <master-private-ip-1>
- <master-private-ip-2>
- <master-private-ip-3>
resolvers:
# You probably do not want to use these values since they point to public DNS servers.
# Instead use values that are more specific to your particular infrastructure.
- 8.8.4.4
- 8.8.8.8
ssh_port: 22
ssh_user: centos
use_proxy: 'true'
http_proxy: http://<user>:<pass>@<proxy_host>:<http_proxy_port>
https_proxy: https://<user>:<pass>@<proxy_host>:<https_proxy_port>
no_proxy:
- 'foo.bar.com'
- '.baz.com'
DC/OS 群集,带有三个管理节点、一个内部管理的 Exhibitor/ZooKeeper、自定义 Docker 凭据、两个专用代理和 Google DNS:
Cosmos 配置
DC/OS 群集,带有一个管理节点、一个内部管理的 Exhibitor/ZooKeeper 、三个专用代理、谷歌 DNS 和配置永久存储库的 DC/OS 包管理器 (Cosmos) :
agent_list:
- <agent-private-ip-1>
- <agent-private-ip-2>
- <agent-private-ip-3>
# Use this bootstrap_url value unless you have moved the DC/OS installer assets.
cluster_name: <cluster-name>
master_discovery: static
- <master-private-ip-1>
resolvers:
# You probably do not want to use these values since they point to public DNS servers.
# Instead use values that are more specific to your particular infrastructure.
- 8.8.4.4
- 8.8.8.8
ssh_port: 22
ssh_user: centos
cosmos_config:
staged_package_storage_uri: file:///var/lib/dcos/cosmos/staged-packages
package_storage_uri: file:///var/lib/dcos/cosmos/packages
- 用户 Marathon 实例(
user-marathon-on-marathon
) - 管理节点上的本地装载(
master-mounts
) - 代理节点上的本地装载(
agent-mounts
)
agent_list:
- <agent-private-ip-1>
- <agent-private-ip-2>
- <agent-private-ip-3>
# Use this bootstrap_url value unless you have moved the DC/OS installer assets.
bootstrap_url: file:///opt/dcos_install_tmp
cluster_name: <cluster-name>
master_discovery: static
master_list:
- <master-private-ip-1>
resolvers:
# You probably do not want to use these values since they point to public DNS servers.
# Instead use values that are more specific to your particular infrastructure.
- 8.8.4.4
- 8.8.8.8
ssh_port: 22
ssh_user: centos
custom_checks:
cluster_checks:
user-marathon-on-marathon:
description: The user Marathon-on-Marathon is healthy
cmd:
- "check_marathon"
- "--location"
- "user-marathon.marathon.mesos"
timeout: 5s
node_checks:
checks:
master-mounts:
description: Local mounts on masters are present
cmd:
- “check_mounts”
- "--role"
- "master"
roles:
- master
timeout: 5s
agent-mounts:
description: Local mounts on agents are present
cmd:
- “check_mounts”
- "--role"
- "agent"
roles:
timeout: 5s