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

Figure out how to share inputs for cluster install driven by ACM #38

Open
larsks opened this issue Mar 17, 2021 · 7 comments
Open

Figure out how to share inputs for cluster install driven by ACM #38

larsks opened this issue Mar 17, 2021 · 7 comments

Comments

@larsks
Copy link

larsks commented Mar 17, 2021

How can we share or automate the creation of inputs to ACM for driving a cluster install?

@larsks
Copy link
Author

larsks commented Mar 22, 2021

There are a few things that complicate the process of (a) managing the input data for a cluster installation and (b) creating something that can be shared without revealing All The Secrets. I'd like to take a look at (a) first:

We'd like to manage our cluster install configuration with a GitOps-style workflow. In the short term, that means we'd like to store the input manifests git repository, and initialize a cluster install via kustomize build | oc apply -f-. The major sticking point in this process is the way that install-config.yaml is managed. While all the information necessary to generate that file is available in the ClusterDeployment resource, the contents of install-config.yaml have to be provided as a secret. This means there are two places where we need to (a) list hosts, (b) provide libvirt credentials, etc. We either need to enter everything twice, or hack together some sort of templating system to generate the manifests.

@HumairAK
Copy link

Not entirely sure if I understand what's going on here -- but could writing a simple exec plugin for kustomize help with this? one that maybe we could share with others who want to do the same thing?

@tumido
Copy link
Member

tumido commented Mar 23, 2021

That's a neat idea! Like ACM generator plugin.. that would work nicely. @HumairAK do you know if it's possible to compose kustomize plugins - like to use ksops generator first and then some other plugin on the same resource? Because we probably want the resource to be encrypted in git and then decrypt and generate configs from it...

@HumairAK
Copy link

No clue, we would need to look into it.

@larsks
Copy link
Author

larsks commented Mar 23, 2021

Ideally I would like to see this fixed in ACM itself :).

I think we could work around this with an exec plugin: we would probably need something that takes a single input document and uses it to generate both the ClusterDeployment resource and the install-config.yaml secret. If there's no "official" support for composing plugins, we can just call the ksops exec plugin ourselves, right? Or just sops -d, I guess.

@larsks
Copy link
Author

larsks commented Mar 23, 2021

So, just thinking about this, if we want to DRY everything out, we'll need to read as input and emit in the appropriate places...

  • The pull secret (which is used both in the provider connection and in install-config.yaml)
  • The baremetal host information (which is used in the ClusterDeployment resource and in install-config.yaml)
  • The ssh private key (used in the provider connection and in a secret referenced by the ClusterDeployment...twice)
  • The ssh public key (used in the provider connection)
  • The host key for the provisioner (used in the ClusterDeployment and in the provider connection

I think our deployment would end up looking like:

  • a kustomization.yaml file with maybe (a) a namespace resource and (b) a generator
  • a generator configuration that contains all the necessary input data

And that's it. And the entire configuration would then be generated by the kustomize plugin.

@tumido
Copy link
Member

tumido commented Mar 24, 2021

Consolidating this into an RFE for our toolbox operate-first/toolbox#24

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

3 participants