Skip to content
Snippets Groups Projects
Select Git revision
  • fe9e11b50147c564c597158166019fe44ce6d557
  • master default protected
  • v2.28.0
  • v2.27.0
  • v2.25.1
  • v2.24.3
  • v2.26.0
  • v2.24.2
  • v2.25.0
  • v2.24.1
  • v2.22.2
  • v2.23.3
  • v2.24.0
  • v2.23.2
  • v2.23.1
  • v2.23.0
  • v2.22.1
  • v2.22.0
  • v2.21.0
  • v2.20.0
  • v2.19.1
  • v2.18.2
22 results

flannel.md

Blame
  • Vagrantfile 7.81 KiB
    # -*- mode: ruby -*-
    # # vi: set ft=ruby :
    
    # For help on using kubespray with vagrant, check out docs/vagrant.md
    
    require 'fileutils'
    
    Vagrant.require_version ">= 2.0.0"
    
    CONFIG = File.join(File.dirname(__FILE__), "vagrant/config.rb")
    
    COREOS_URL_TEMPLATE = "https://storage.googleapis.com/%s.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json"
    
    # Uniq disk UUID for libvirt
    DISK_UUID = Time.now.utc.to_i
    
    SUPPORTED_OS = {
      "coreos-stable"       => {box: "coreos-stable",      user: "core", box_url: COREOS_URL_TEMPLATE % ["stable"]},
      "coreos-alpha"        => {box: "coreos-alpha",       user: "core", box_url: COREOS_URL_TEMPLATE % ["alpha"]},
      "coreos-beta"         => {box: "coreos-beta",        user: "core", box_url: COREOS_URL_TEMPLATE % ["beta"]},
      "ubuntu1604"          => {box: "generic/ubuntu1604", user: "vagrant"},
      "ubuntu1804"          => {box: "generic/ubuntu1804", user: "vagrant"},
      "centos"              => {box: "centos/7",           user: "vagrant"},
      "centos-bento"        => {box: "bento/centos-7.5",   user: "vagrant"},
      "fedora"              => {box: "fedora/28-cloud-base",                user: "vagrant"},
      "opensuse"            => {box: "opensuse/openSUSE-15.0-x86_64",       user: "vagrant"},
      "opensuse-tumbleweed" => {box: "opensuse/openSUSE-Tumbleweed-x86_64", user: "vagrant"},
    }
    
    # Defaults for config options defined in CONFIG
    $num_instances = 3
    $instance_name_prefix = "k8s"
    $vm_gui = false
    $vm_memory = 2048
    $vm_cpus = 1
    $shared_folders = {}
    $forwarded_ports = {}
    $subnet = "172.17.8"
    $os = "ubuntu1804"
    $network_plugin = "flannel"
    # Setting multi_networking to true will install Multus: https://github.com/intel/multus-cni
    $multi_networking = false
    # The first three nodes are etcd servers
    $etcd_instances = $num_instances
    # The first two nodes are kube masters
    $kube_master_instances = $num_instances == 1 ? $num_instances : ($num_instances - 1)
    # All nodes are kube nodes
    $kube_node_instances = $num_instances
    # The following only works when using the libvirt provider
    $kube_node_instances_with_disks = false
    $kube_node_instances_with_disks_size = "20G"
    $kube_node_instances_with_disks_number = 2
    $override_disk_size = false
    $disk_size = "20GB"
    $local_path_provisioner_enabled = false
    $local_path_provisioner_claim_root = "/opt/local-path-provisioner/"
    
    $playbook = "cluster.yml"
    
    host_vars = {}
    
    if File.exist?(CONFIG)
      require CONFIG
    end
    
    $box = SUPPORTED_OS[$os][:box]
    # if $inventory is not set, try to use example
    $inventory = "inventory/sample" if ! $inventory
    $inventory = File.absolute_path($inventory, File.dirname(__FILE__))