import aws_prov
servers = [
   aws_prov.Server_aws {
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "lab-cp-0"
      title = "Kloud CP 0"
      plan = "t3.micro"
      reqplan = {
        scale = True
        arch = "x86_64"
        cores = 2
        memory = 1024
        infaces = 2
        ena = "supported,required"
        # virtyp = "hvm"
        gen = "current"
      }
      # If not Storage size, Plan Storage size will be used
      storages = [
         aws_prov.Storage_aws { 
            name = "root",
            total = 30,
            # size = 50, total = 50, 
            # size = 15, total = 25, 
            # size = 25, total = 50,
            labels = "{Key=storager,Value=vol0}",
            parts = [
               { name = "root", size = 30, type = "ext4" , mount = True, mount_path = "/" },
               #{ name = "kluster", size = 10, type = "xfs" , mount = False }
            ]
         },
         aws_prov.Storage_aws { 
            name = "vol",
            total = 30,
            voldevice = "sdg",
            labels = "{Key=storage,Value=vol1}",
            parts = [
               { name = "home2", size = 15, type = "xfs" , mount = True, mount_path = "/home2" }
               { name = "other", size = 15, type = "ext4" , mount = True, mount_path = "/others" }
            ]
         },
      ]
      # Labels to describe the server in `key = "value` format, multiple can be declared.
      # Usage = "env = "dev
      labels = "{Key=Use,Value=lab-cp-0}"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created 
      # IP will be assign here
      network_private_ip = "10.11.2.11"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "lab-cp-0" ]
      taskservs = [
        { name = "os", profile = "controlpanel"},
        { name = "kubernetes" },
        { name = "rook-ceph" },
        #{ name = "kubernetes/kubeconfig", profile = "kubeconfig", install_mode = "getfile" },
        { name = "external-nfs" },
      ]
    },
    aws_prov.Server_aws {
      not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "lab-wrkr-0"
      title = "Kloud worker 0"
      # If not Storage size, Plan Storage size will be used
      plan = "2xCPU-4GB"
      #plan = "4xCPU-8GB"
      storages = [
         aws_prov.Storage_aws { 
            name = "root",
            size = 35, total = 80,
            # size = 50, total = 50, 
            # size = 15, total = 25, 
            # size = 25, total = 50,
            type = "ext4" , mount = True, mount_path = "/", 
            parts = [
               { name = "kluster", size = 45, type = "raw" , mount = True }
               #{ name = "kluster", size = 10, type = "xfs" , mount = False }
            ]
         }
      ]
      # Labels to describe the server in `key = "value` format, multiple can be declared.
      # Usage = "env = "dev
      labels = "use=k8s-worker"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created 
      # IP will be assign here
      network_private_ip = "10.11.2.12"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "lab-wrkr-0" ]
      taskservs = [
        { name = "os", profile = "worker"},
        { name = "kubernetes" },
        { name = "kubernetes", profile = "k8s-nodejoin" },
        #{ name = "mayastor" },
      ]
    },
    aws_prov.Server_aws {
      not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "lab-wrkr-1"
      title = "Kloud worker 1"
      # If not Storage size, Plan Storage size will be used
      plan = "2xCPU-4GB"
      #plan = "4xCPU-8GB"
      storages = [
         aws_prov.Storage_aws { 
            name = "root",
            size = 35, total = 80,
            # size = 50, total = 50, 
            # size = 15, total = 25, 
            # size = 25, total = 50,
            type = "ext4" , mount = True, mount_path = "/", 
            parts = [
               { name = "kluster", size = 45, type = "raw" , mount = False }
               #{ name = "kluster", size = 10, type = "raw" , mount = False }
            ]
         }
      ]
      # Labels to describe the server in `key = "value` format, multiple can be declared.
      # Usage = "env = "dev
      labels = "use=k8s-worker"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created 
      # IP will be assign here
      network_private_ip = "10.11.2.13"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "lab-wrkr-1" ]
      taskservs = [
        { name = "os", profile = "worker"},
        { name = "kubernetes" },
        { name = "kubernetes", profile = "k8s-nodejoin" },
        #{ name = "mayastor" },
      ]
    },
    aws_prov.Server_aws {
      not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "lab-wrkr-2"
      title = "Kloud worker 2"
      # If not Storage size, Plan Storage size will be used
      plan = "2xCPU-4GB"
      #plan = "4xCPU-8GB"
      storages = [
         aws_prov.Storage_aws { 
            name = "root",
            size = 35, total = 80,
            # size = 50, total = 50, 
            # size = 15, total = 25, 
            # size = 25, total = 50,
            type = "ext4" , mount = True, mount_path = "/", 
            parts = [
               { name = "kluster", size = 45, type = "raw" , mount = False }
               #{ name = "kluster", size = 10, type = "raw" , mount = False }
            ]
         }
         #volname  = "{Key=cluster,Value=vol0}", parts = [
      ]
      # Labels to describe the server in `key = "value` format, multiple can be declared.
      # Usage = "env = "dev
      labels = "use=k8s-worker"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created 
      # IP will be assign here
      network_private_ip = "10.11.2.14"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "lab-wrkr-2" ]
      taskservs = [
        { name = "os", profile = "worker"},
        { name = "kubernetes" },
        { name = "kubernetes", profile = "k8s-nodejoin" },
        #{ name = "mayastor" },
      ]
    },
    aws_prov.Server_aws {
      not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "lab-wrkr-3"
      title = "Kloud worker 3"
      # If not Storage size, Plan Storage size will be used
      plan = "1xCPU-2GB"
      #plan = "2xCPU-4GB"
      #plan = "4xCPU-8GB"
      storages = [
         #{ name = "root", size = 50, total = 50, type = "ext4" , mount = True, mount_path = "/", parts = [
         #{ name = "root", size = 15, total = 25, type = "ext4" , mount = True, mount_path = "/", parts = [
         #{ name = "root", size = 25, total = 50, type = "ext4" , mount = True, mount_path = "/", parts = [
         #{ name = "root", size = 25, total = 80, type = "ext4" , mount = True, mount_path = "/", parts = [
         aws_prov.Storage_aws { 
            name = "root",
            size = 35, total = 80,
            # size = 50, total = 50, 
            # size = 15, total = 25, 
            # size = 25, total = 50,
            parts = [
               { name = "kluster", size = 45, type = "raw" , mount = False }
               #{ name = "kluster", size = 10, type = "raw" , mount = False }
            ]
         }
      ]
      # Labels to describe the server in `key = "value` format, multiple can be declared.
      # Usage = "env = "dev
      labels = "use=k8s-worker"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created 
      # IP will be assign here
      network_private_ip = "10.11.2.15"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "lab-wrkr-3" ]
      taskservs = [
        { name = "os", profile = "worker"},
        { name = "kubernetes" },
        { name = "kubernetes", profile = "k8s-nodejoin" },
        #{ name = "mayastor" },
      ]
    },
]
