import upcloud_prov
servers = [
   upcloud_prov.Server_upcloud {
      #not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "o-wuji-cp-0"
      title = "Wuji Control-Panel 0"
      # If not Storage size, Plan Storage size will be used
      plan = "2xCPU-4GB"
      storages = [
         upcloud_prov.Storage_upcloud {
            name = "root",
            # size = 15, total = 25,
            # size = 25, total = 50,
            size = 35, total = 80,
            # type = "ext4" , mount = True, mount_path = "/",
            parts = [
               { name = "root", size = 35, type = "ext4" , mount = True, mount_path = "/" },
               { name = "kluster", size = 45, type = "xfs" , mount = True, mount_path = "/kluster" }
               #{ name = "kluster", size = 45, type = "raw" , mount = True, mount_path = "" }
               #{ 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-cp"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created
      # IP will be assign here
      network_private_ip = "10.11.2.20"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "wuji-cp-0" ]
      taskservs = [
         { name = "os", profile = "controlpanel"},
         { name = "resolv" },
         { name = "runc" },
         { name = "crun" },
         { name = "youki" },
         { name = "crio" },
         { name = "kubernetes", target_save_path = "/wuwei/wuji" },
         #{ name = "cilium" },
         { name = "rook-ceph", target_save_path = "/wuwei/wuji/rook-ceph" },
         #{ name = "kubernetes/kubeconfig", profile = "kubeconfig", install_mode = "getfile" },
         { name = "external-nfs" },
      ]
   },
   upcloud_prov.Server_upcloud {
      #not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "o-wuji-strg-0"
      title = "Wuji storage 0"
      # If not Storage size, Plan Storage size will be used
      plan = "2xCPU-4GB"
      #plan = "4xCPU-8GB"
      storages = [
         upcloud_prov.Storage_upcloud {
            name = "root",
            # size = 15, total = 25,
            # size = 25, total = 50,
            size = 35, total = 80,
            #type = "ext4" , mount = True, mount_path = "/",
            parts = [
               { name = "root", size = 35, type = "ext4" , mount = True, mount_path = "/" },
               { name = "ceph_0", size = 25, type = "raw" , mount = True, mount_path = ""},
               { name = "ceph_1", size = 20, type = "raw" , mount = True, mount_path = ""}
               #{ 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-wuji, use=k8s-storage"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created
      # IP will be assign here
      network_private_ip = "10.11.2.30"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "wuji-strg-0" ]
      taskservs = [
         { name = "os", profile = "worker"},
         { name = "resolv" },
         { name = "runc" },
         { name = "crun" },
         { name = "youki" },
         { name = "crio" },
         { name = "kubernetes" },
         { name = "kubernetes", profile = "k8s-nodejoin" },
         { name = "external-nfs" },
      ]
   },
   upcloud_prov.Server_upcloud {
      #not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "o-wuji-strg-1"
      title = "Wuji storage 1"
      # If not Storage size, Plan Storage size will be used
      plan = "2xCPU-4GB"
      #plan = "4xCPU-8GB"
      storages = [
         upcloud_prov.Storage_upcloud {
            name = "root",
            # size = 15, total = 25,
            # size = 25, total = 50,
            size = 35, total = 80,
            #type = "ext4" , mount = True, mount_path = "/",
            parts = [
               { name = "root", size = 35, type = "ext4" , mount = True, mount_path = "/" },
               { name = "ceph_0", size = 25, type = "raw" , mount = True, mount_path = ""},
               { name = "ceph_1", size = 20, type = "raw" , mount = True, mount_path = ""}
               #{ 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-wuji, use=k8s-strg"
      # To use private network it a VPC + Subnet + NetworkInfterface has to be created
      # IP will be assign here
      network_private_ip = "10.11.2.31"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "wuji-strg-1" ]
      taskservs = [
         { name = "os", profile = "worker"},
         { name = "resolv" },
         { name = "runc" },
         { name = "crun" },
         { name = "youki" },
         { name = "crio" },
         { name = "kubernetes" },
         { name = "kubernetes", profile = "k8s-nodejoin" },
         { name = "external-nfs" },
      ]
   },
   upcloud_prov.Server_upcloud {
      #not_use = True
      # Hostname as reference for resource if is changed later inside server, change will not be updated in resource inventory
      hostname = "o-wuji-wrkr-0"
      title = "Wuji worker 0"
      # If not Storage size, Plan Storage size will be used
      #plan = "1xCPU-2GB"
      #plan = "4xCPU-8GB"
      plan = "2xCPU-4GB"
      storages = [
         upcloud_prov.Storage_upcloud {
            name = "root",
            # size = 15, total = 25,
            # size = 25, total = 50,
            #size = 35, total = 80,
            size = 50, total = 50,
            # type = "ext4" , mount = True, mount_path = "/",
            parts = [
               { name = "root", size = 50, type = "ext4" , mount = True, mount_path = "/" },
               #{ 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.40"
      liveness_ip = "$network_public_ip"
      liveness_port = 22
      extra_hostnames = [ "wuji-wrkr-0" ]
      taskservs = [
         { name = "os", profile = "worker"},
         { name = "resolv" },
         { name = "runc" },
         { name = "crun" },
         { name = "youki" },
         { name = "crio" },
         { name = "kubernetes" },
         { name = "kubernetes", profile = "k8s-nodejoin" },
      ]
   },
]
