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.52k stars 405 forks source link

Provide tooling for automated Kyma lifecycle and subscription management #18198

Open varbanv opened 1 year ago

varbanv commented 1 year 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 1 year ago

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

kwiatekus commented 1 year ago

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

kwiatekus commented 1 year ago

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

pbochynski commented 1 year ago

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

kwiatekus commented 1 year 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 11 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 11 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 7 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 7 months ago

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

kwiatekus commented 6 months ago

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

kwiatekus commented 6 months ago

We started working on cli part:

ETA - on track

kwiatekus commented 5 months 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 5 months ago

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

kwiatekus commented 4 months 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

kwiatekus commented 4 months ago

Status update 15.07.2024

kwiatekus commented 3 months ago

Status update 29.07.2024

kwiatekus commented 2 months ago

Status update 26.08.2024

@kyma-project/otters team continue working on the example repository that contains:

Once the pipeline is in place we want to document the sample repo as a working recipe for managing kyma lifecycle in the CI scenario. We estimate that we need extra week.

New delivery date: 06.09.2024

kwiatekus commented 2 months ago

Status update 03.09.2024

New delivery date: 13.09.2024

kwiatekus commented 2 months ago

status update 09.09.2024

kwiatekus commented 1 month ago

Status update 04.10.2024

Working with technical writers on the documentation (as part of btp development guides) https://help.sap.com/docs/btp/btp-developers-guide-internal/terraform-module-for-kyma?locale=en-US&state=DRAFT&version=Internal

kwiatekus commented 1 month ago

Status update 21.10.2024

kwiatekus commented 2 weeks ago

Status update 04.11.2024