Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow controller_clc_snippets or worker_clc_snippets for baremetal too #279

Closed
kratan opened this issue Aug 16, 2018 · 1 comment
Closed

Comments

@kratan
Copy link

kratan commented Aug 16, 2018

Feature Request

we have three types of different hardware for controller(cpu only), worker(cpu only) and gpu_worker(with gpus).

Feature

it would be nice to have the same group snippets for baremetal too(as for digital ocean), so we can use controller_clc_snippets or worker_clc_snippets, .... for our types of hardware

Tradeoffs

no need to define each element of a group again

@dghubble
Copy link
Member

On cloud providers, controllers and workers should be homogeneous so clusters accept controller_clc_snippets and worker_clc_snippets lists. On bare-metal, machines may be heterogeneous, so a key value mapping is used instead.

If your bare-metal machines happen to be identical hardware right now, that's a temporary state - at some point you'll buy some shiny new machines, but not want to throw away the old ones. In fact, your example where some workers are CPU only and others may need GPU customizations is already an example.

If you find some machines uses the same snippets, just organize them into a list.

locals {
  cpu_worker_snippets = [
     "${file("./units/world.yaml")}",
      "${file("./units/hello.yaml")}",
   ]
}

module "bare-metal-mercury" {
  ...
  controller_names = ["node1"]
  worker_names = [
    "node2",
    "node3",
  ]
  clc_snippets = {
    "node1" = [
       "${file("./units/hello.yaml")}",
    ]
    "node2" = "${local.cpu_worker_snippets}"
    "node3" = "${local.cpu_worker_snippets}"
  }
  ...
}

I have no plan to complicate bare-metal by supporting both a map and list input for the same information, when the clc_snippets map already handles cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants