cluster_name = 'dcos0'

name cluster_name
description "#{cluster_name} cluster"

run_list(
  'recipe[platform_utils::platform_update]',
)

#env_run_lists

bootstrap_ip = '192.168.56.100'
master_list = [
  '192.168.56.101',
  '192.168.56.102',
  '192.168.56.103',
]
resolvers = [
  '8.8.8.8',
  '8.8.4.4',
]

default_attributes(
)

override_attributes(
  'platform_utils' => {
    'platform_update' => {
      'auto_update' => true,
    },
  },
  'dcos-grid' => {
    #'dcos_release_url' => 'https://downloads.dcos.io/dcos/EarlyAccess/dcos_generate_config.sh',
    'dcos_release_url' => 'https://downloads.dcos.io/dcos/stable/dcos_generate_config.sh',
    # 1.8.6
    #'dcos_release_url' => 'https://downloads.dcos.io/dcos/stable/commit/cfccfbf84bbba30e695ae4887b65db44ff216b1d/dcos_generate_config.sh',
    # 1.7-open
    #'dcos_release_url' => 'https://downloads.dcos.io/dcos/EarlyAccess/commit/14509fe1e7899f439527fb39867194c7a425c771/dcos_generate_config.sh',
    'dcos_cli_release_url' => 'https://downloads.dcos.io/binaries/cli/linux/x86-64/dcos-1.8/dcos',
    'bootstrap' => {
      'ip' => bootstrap_ip,
      'port' => '8080',
      'config' => {
        'cluster_name' => cluster_name,
        'master_list' => master_list,
        'resolvers' => resolvers,
        'oauth_enabled' => 'false',
        'telemetry_enabled' => 'false',
=begin
        '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',
            },
          ],
        },
=end
      },
      'ip-detect' => {
        # the first detected interface's ip is adopted.
        'interface' => 'eth1,eth0,enp0s8,enp0s3',
      },
    },
    'node' => {
      'auto_setup' => false,
    },
  },
)
