SAP-archive / bosh-kubernetes-cpi-release

The goal for this project is to provide a fully functional BOSH CPI. It will eventually allow to deploy any BOSH release to any Kubernetes cluster.
Apache License 2.0
29 stars 5 forks source link

Adding kubernetes-cpi to existing Bosh Director #4

Open jhiemer opened 6 years ago

jhiemer commented 6 years ago

Hi, currently the whole documentation references the installation of CPI via the creation of new bosh director. As it is possible to have a multi CPI setup in the meanwhile, I wanted to ask what would be the best way to deploy the Kubernetes CPI to an existing director?

Thanks!

loewenstein commented 6 years ago

@jhiemer Unfortunately the kubernetes cpi is not yet prepared to be configured via cpi config. I.e. you cannot run it as multi cpi.

What is your specific use case?

jhiemer commented 6 years ago

@loewenstein my initial idea was to deploy it beside our OS CPI and try to do some bosh deployments onto our K8s Cluster.

What is missing until the CPI is deployable?

loewenstein commented 6 years ago

bosh-cpi-haskell should support getting configuration from RPC context, as per

CPI should be able to accept properties in context key and use them instead of its job properties 
see context key in https://bosh.io/docs/build-cpi.html#request

in https://github.com/cloudfoundry/bosh-notes/blob/master/proposals/multi-cpi.md

jhiemer commented 6 years ago

@loewenstein could you help me to understand your answer? I am not sure if I get it completely.

loewenstein commented 6 years ago

@jhiemer sure. The default mechanism for a CPI to get its configuration (api endpoint, credentials, ...) is a configuration file template in the Bosh release that gets rendered onto the VM that is running the director and cpi jobs.

Multi-cpi introduced a separate configuration (with api endpoint, credentials, ...) that can be uploaded to the director (with bosh update-cpi-config). The corresponding configuration will be provided to the cpi with each RPC call (e.g. create_vm) in the context parameter. In order to support multi-cpi, the cpi has to read that additional bit of information from context and merge it with the base config provided via rendered config.

That is not yet supported by bosh-cpi-haskell which is the base cpi implementation used by the Kubernetes cpi.

Does that help?

jhiemer commented 6 years ago

@loewenstein I see. Thanks a lot for the explanation. There are no plans from your site in the near future to add this functionality?

loewenstein commented 6 years ago

@jhiemer I didn't work on the cpi in the recent past. I am currently reviving the CI pipelines.

There is a more severe conceptual issue that would require non-trivial changes to Bosh (issue #2 in this repo). I have no immediate plans to work on those so the question arises what you plan to do with the cpi?

If you just want to play with it and can live with the workaround of deploying twice, I might find cycles to work on the cpi config part.

Johannes Hiemer notifications@github.com schrieb am Di., 16. Jan. 2018, 15:47:

@loewenstein https://github.com/loewenstein I see. Thanks a lot for the explanation. There are no plans from your site in the near future to add this functionality?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SAP/bosh-kubernetes-cpi-release/issues/4#issuecomment-357982703, or mute the thread https://github.com/notifications/unsubscribe-auth/AARemMCXvKYhGc5p17acOxtco1iyTMiiks5tLLZqgaJpZM4RZ6xP .