示例

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:

  1. ---
  2. agent_list:
  3. - <agent-private-ip-1>
  4. - <agent-private-ip-2>
  5. - <agent-private-ip-3>
  6. - <agent-private-ip-4>
  7. - <agent-private-ip-5>
  8. bootstrap_url: 'file:///opt/dcos_install_tmp'
  9. cluster_name: '<cluster-name>'
  10. log_directory: /genconf/logs
  11. master_discovery: static
  12. master_list:
  13. - <master-private-ip-1>
  14. - <master-private-ip-2>
  15. - <master-private-ip-3>
  16. process_timeout: 120
  17. resolvers:
  18. - <dns-resolver-1>
  19. - <dns-resolver-2>
  20. ssh_key_path: /genconf/ssh-key
  21. ssh_port: '<port-number>'
  22. ssh_user: <username>
  1. ---
  2. agent_list:
  3. - <agent-private-ip-1>
  4. - <agent-private-ip-2>
  5. - <agent-private-ip-3>
  6. - <agent-private-ip-4>
  7. - <agent-private-ip-5>
  8. aws_access_key_id: AKIAIOSFODNN7EXAMPLE
  9. aws_region: us-west-2
  10. aws_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  11. bootstrap_url: file:///tmp/dcos
  12. cluster_name: s3-example
  13. exhibitor_storage_backend: aws_s3
  14. exhibitor_explicit_keys: 'true'
  15. log_directory: /genconf/logs
  16. master_discovery: static
  17. master_list:
  18. - <master-private-ip-1>
  19. - <master-private-ip-2>
  20. - <master-private-ip-3>
  21. process_timeout: 120
  22. resolvers:
  23. - <dns-resolver-1>
  24. - <dns-resolver-2>
  25. s3_bucket: mybucket
  26. s3_prefix: s3-example
  27. ssh_key_path: /genconf/ssh-key
  28. ssh_user: <username>

ZooKeeper

DC/OS 群集,带有三个管理节点、一个通过 ZooKeeper 备份的 Exhibitor/ZooKeeper、前面带有 HTTP 负载均衡器的管理节点、一个公共代理节点和 Google DNS:

DC/OS 群集,带有三个管理节点、一个内部管理的 Exhibitor/ZooKeeper、两个 DC/OS 虚拟网络、两个专用代理和 Google DNS:

  1. agent_list:
  2. - <agent-private-ip-1>
  3. - <agent-private-ip-2>
  4. # Use this bootstrap_url value unless you have moved the DC/OS installer assets.
  5. cluster_name: <cluster-name>
  6. master_discovery: static
  7. master_list:
  8. - <master-private-ip-1>
  9. - <master-private-ip-2>
  10. - <master-private-ip-3>
  11. resolvers:
  12. # You probably do not want to use these values since they point to public DNS servers.
  13. # Instead, use values that are more specific to your particular infrastructure.
  14. - 8.8.4.4
  15. - 8.8.8.8
  16. ssh_port: 22
  17. ssh_user: centos
  18. dcos_overlay_enable: true
  19. dcos_overlay_mtu: 9001
  20. dcos_overlay_config_attempts: 6
  21. dcos_overlay_network:
  22. vtep_subnet: 44.128.0.0/20
  23. vtep_mac_oui: 70:B3:D5:00:00:00
  24. overlays:
  25. - name: dcos
  26. subnet: 9.0.0.0/8
  27. prefix: 26
  28. - name: dcos-1
  29. subnet: 192.168.0.0/16
  30. prefix: 24

HTTP 代理

  1. agent_list:
  2. - <agent-private-ip-1>
  3. - <agent-private-ip-2>
  4. # Use this bootstrap_url value unless you have moved the DC/OS installer assets.
  5. bootstrap_url: file:///opt/dcos_install_tmp
  6. cluster_name: <cluster-name>
  7. master_discovery: static
  8. master_list:
  9. - <master-private-ip-1>
  10. - <master-private-ip-2>
  11. - <master-private-ip-3>
  12. resolvers:
  13. # You probably do not want to use these values since they point to public DNS servers.
  14. # Instead use values that are more specific to your particular infrastructure.
  15. - 8.8.4.4
  16. - 8.8.8.8
  17. ssh_port: 22
  18. ssh_user: centos
  19. use_proxy: 'true'
  20. http_proxy: http://<user>:<pass>@<proxy_host>:<http_proxy_port>
  21. https_proxy: https://<user>:<pass>@<proxy_host>:<https_proxy_port>
  22. no_proxy:
  23. - 'foo.bar.com'
  24. - '.baz.com'

DC/OS 群集,带有三个管理节点、一个内部管理的 Exhibitor/ZooKeeper、自定义 Docker 凭据、两个专用代理和 Google DNS:

Cosmos 配置

DC/OS 群集,带有一个管理节点、一个内部管理的 Exhibitor/ZooKeeper 、三个专用代理、谷歌 DNS 和配置永久存储库的 DC/OS 包管理器 (Cosmos) :

  1. agent_list:
  2. - <agent-private-ip-1>
  3. - <agent-private-ip-2>
  4. - <agent-private-ip-3>
  5. # Use this bootstrap_url value unless you have moved the DC/OS installer assets.
  6. cluster_name: <cluster-name>
  7. master_discovery: static
  8. - <master-private-ip-1>
  9. resolvers:
  10. # You probably do not want to use these values since they point to public DNS servers.
  11. # Instead use values that are more specific to your particular infrastructure.
  12. - 8.8.4.4
  13. - 8.8.8.8
  14. ssh_port: 22
  15. ssh_user: centos
  16. cosmos_config:
  17. staged_package_storage_uri: file:///var/lib/dcos/cosmos/staged-packages
  18. package_storage_uri: file:///var/lib/dcos/cosmos/packages
  • 用户 Marathon 实例(user-marathon-on-marathon)
  • 管理节点上的本地装载(master-mounts)
  • 代理节点上的本地装载(agent-mounts)
  1. agent_list:
  2. - <agent-private-ip-1>
  3. - <agent-private-ip-2>
  4. - <agent-private-ip-3>
  5. # Use this bootstrap_url value unless you have moved the DC/OS installer assets.
  6. bootstrap_url: file:///opt/dcos_install_tmp
  7. cluster_name: <cluster-name>
  8. master_discovery: static
  9. master_list:
  10. - <master-private-ip-1>
  11. resolvers:
  12. # You probably do not want to use these values since they point to public DNS servers.
  13. # Instead use values that are more specific to your particular infrastructure.
  14. - 8.8.4.4
  15. - 8.8.8.8
  16. ssh_port: 22
  17. ssh_user: centos
  18. custom_checks:
  19. cluster_checks:
  20. user-marathon-on-marathon:
  21. description: The user Marathon-on-Marathon is healthy
  22. cmd:
  23. - "check_marathon"
  24. - "--location"
  25. - "user-marathon.marathon.mesos"
  26. timeout: 5s
  27. node_checks:
  28. checks:
  29. master-mounts:
  30. description: Local mounts on masters are present
  31. cmd:
  32. - check_mounts
  33. - "--role"
  34. - "master"
  35. roles:
  36. - master
  37. timeout: 5s
  38. agent-mounts:
  39. description: Local mounts on agents are present
  40. cmd:
  41. - check_mounts
  42. - "--role"
  43. - "agent"
  44. roles:
  45. timeout: 5s