kyma-project / kyma

Kyma is an opinionated set of Kubernetes-based modular building blocks, including all necessary capabilities to develop and run enterprise-grade cloud-native applications.
https://kyma-project.io
Apache License 2.0
1.51k stars 407 forks source link

Provide tooling for automated Kyma lifecycle and subscription management #18198

Open varbanv opened 9 months ago

varbanv commented 9 months ago

Description

Users should be able to fully automate Kyma related tasks in their CI/CD pipelines. This starts with Kyma instance provisioning, includes deployment of necessary artifacts and test executions, and ends with Kyma instance removal and associated service instance cleanup. All of this should not require much additional effort from the end user and should be as easy as possible to configure.

Context

Problem

Right now, users can automate the Kyma instance creation using the new Terraform provider, the cloud orchestrator tools, or the btpcli directly, however, the next step of accessing the cluster requires user interaction.

And finally, there are a number of scenarios that could prevent a cluster from being deleted and would require user interaction to complete. While the second and third problems can be solved with some coding and additional resources, we want to provide ease-of-use in order to improve the perception and adoption of Kyma.

Benefits

For customers:

For us:

Proposed solution

Design and implement a new set of kyma CLI commands that helps developers who use managed kyma runtimes within BTP ecosystem with development of their CAP applications. CLI commands should be designed with automation flow in mind (No user context should be required),

The commands should cover:

Acceptance criteria

Attachments

Idea for assisted kyma provisioning

Disper commented 8 months ago

What would be the exact/examples of scenarios around provisioning?

kwiatekus commented 7 months ago

Similar request to log into kyma in headless mode https://github.tools.sap/kyma/backlog/issues/2518

kwiatekus commented 7 months ago

https://github.tools.sap/kyma/backlog/issues/2660#issuecomment-2104608

pbochynski commented 7 months ago

One possible solution is: https://github.com/kyma-project/kyma/issues/18305

kwiatekus commented 7 months ago

What would be the exact/examples of scenarios around provisioning?

@Disper Additional config decribing a "system issuer" should be collected from user and sent to KEB. Further on, provisioner uses this data to deploy the OICD config object and enable the shoot-oidc-service extension. https://github.tools.sap/kyma/backlog/issues/2660#issuecomment-3658944

Provisioner should add cluster role binding to principal represented by tokens issued by the system issuer

kwiatekus commented 6 months ago

Provisioning kyma runtime via BTP CLI https://blogs.sap.com/2022/02/24/creating-sap-btp-kyma-runtime-via-the-sap-btp-cli/

Cloud orchestrator: https://pages.github.tools.sap/cloud-orchestration/

kwiatekus commented 6 months ago

Another approach would be to implement OSB's create_binding API on the KEB side, so that after kyma instance is created one could immediately create binding and use the binding data to access kyma runtime. This has strong benefits:

kwiatekus commented 2 months ago

For users to be able to deploy their code w/o additional subscription (in the DEV mode) we aim to separate deocker-regisrty into separate DEV module to be used also outside of serverless usage https://github.com/kyma-project/kyma/issues/18555#issuecomment-2068633912

kwiatekus commented 2 months ago

As of today, the new prototype commands (developed in https://github.com/kyma-project/cli/tree/v3) allow to

kwiatekus commented 2 months ago

Customizable OIDC configurations (required for this epic) are being discussed within https://github.com/kyma-project/infrastructure-manager/issues/134

kwiatekus commented 2 months ago

We started working on cli part:

ETA - on track

kwiatekus commented 2 weeks ago

Currently @tobiscr and the team is planning a migration from provisioner to KIM. To start initial testing of the tooling (provisioning and getting access in automated scenario) it would be necessary to switch provisioning of new clusters via kyma infrastructure manager.

tobiscr commented 2 weeks ago

Plan is to have a working KIM version on DEV latest on end of July 2024

kwiatekus commented 1 week ago

We have synced with @tobiscr : The latest estimate for KIM delivery on prod is end of August 2024.

We could start testing the e2e provisioning (with additional oidc) via kyma cli on DEV only after necessary integration of KEB to KIM is implemented on DEV. @kyma-project/gopher PTAL https://github.com/kyma-project/kyma-environment-broker/issues/423#issuecomment-2194680153