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

Provide tooling for automated Kyma lifecycle and subscription management #18198

Open
5 of 7 tasks
varbanv opened this issue Sep 20, 2023 · 22 comments
Open
5 of 7 tasks

Provide tooling for automated Kyma lifecycle and subscription management #18198

varbanv opened this issue Sep 20, 2023 · 22 comments
Assignees
Labels
area/control-plane Related to all activities around Kyma Control Plane

Comments

@varbanv
Copy link
Contributor

varbanv commented Sep 20, 2023

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:

  • speed up development and release cycles
  • implement best practices around CI/CD
  • reduce configuration drift
  • reduce dependency on long-living Kyma instances
  • reduce cost by only using Kyma instances when needed
    Example usecase scenario that should be possible to run in automated way

For us:

  • increase adoption
  • enable customers to treat Kyma instances as disposable assets and reduce risk
  • enable users to reduce cost

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:

  • automated lifecycle management of kyma runtime lifecycle (provisioning, deprovisioning)
  • getting access to freshly created cluster
  • attaching BTP service instances to kyma runtimes via service manager
  • eliminating manual actions (i.e mapping hana instance, establishing trust for custom IAS tenant, etc..)

Acceptance criteria

Attachments

Idea for assisted kyma provisioning

@kwiatekus kwiatekus assigned kwiatekus and unassigned kwiatekus Oct 19, 2023
@Disper
Copy link
Member

Disper commented Nov 6, 2023

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

@kwiatekus
Copy link
Contributor

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

@kwiatekus
Copy link
Contributor

@pbochynski
Copy link
Contributor

pbochynski commented Nov 23, 2023

One possible solution is: #18305

@kwiatekus
Copy link
Contributor

kwiatekus commented Nov 23, 2023

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
Copy link
Contributor

@kwiatekus

This comment has been minimized.

@kwiatekus
Copy link
Contributor

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
#18555 (comment)

@kwiatekus
Copy link
Contributor

kwiatekus commented Apr 22, 2024

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

  • provision managed kyma runtime within SAP BTP subaccount
  • create hana db instance in an automated way (incl. binding and mapping to kyma).
  • create references to shared instances

Getting access to new kyma runtime vi kyma CLI (in 100% automated scenario) will be possible after implementig #18305

@kwiatekus
Copy link
Contributor

Customizable OIDC configurations (required for this epic) are being discussed within
kyma-project/infrastructure-manager#134

@kwiatekus
Copy link
Contributor

kwiatekus commented May 6, 2024

We started working on cli part:

ETA - on track

@kwiatekus
Copy link
Contributor

kwiatekus commented Jun 17, 2024

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
Copy link
Contributor

tobiscr commented Jun 17, 2024

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

@kwiatekus
Copy link
Contributor

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
kyma-project/kyma-environment-broker#423 (comment)

@kwiatekus
Copy link
Contributor

kwiatekus commented Jul 15, 2024

Status update 15.07.2024

  • we have planned additional work related to building the kyma cli binary using SAP hyperspace - to ensure compliant binary. (@kyma-project/otters ). We will try out the template for pipelines designed for go code and hope 🤞 there will be no complications.
  • the work on KIM side is on going (@kyma-project/framefrog )
  • the work on KEB side (changing schema for provisioning params) was refined and planned (@kyma-project/gopher )

@kwiatekus
Copy link
Contributor

Status update 29.07.2024

  • @ptesny has came up with (and documented) a recipe how to use custom SAP IAS tenant for automated BTP platform resources creation (incl kyma runtime) and getting access to the newly provisioned cluster in automated scenario
  • @otters are working on a template for CI pipeline for automated application integration tests that run on automatically created kyma runtime in btp environment
  • @otters are aiming to use btp terraform provider for managing btp resources in creating test resources

@kwiatekus
Copy link
Contributor

kwiatekus commented Aug 26, 2024

Status update 26.08.2024

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

  • *.tf (terraform manifests) for all necessary btp resources that need to be provisioned for an automated test scenario
  • make targets for provisioning resources, building and deploying sample application, testing sample application
  • definition for ADO pipeline (integrated with hyperspace tooling)

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
Copy link
Contributor

Status update 03.09.2024

New delivery date: 13.09.2024

@kwiatekus
Copy link
Contributor

status update 09.09.2024

@kwiatekus
Copy link
Contributor

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
Copy link
Contributor

Status update 21.10.2024

  • public documentation - simply documenting the usage of tf module
  • internal documentation (in progress)

@kwiatekus
Copy link
Contributor

kwiatekus commented Nov 4, 2024

Status update 04.11.2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Related to all activities around Kyma Control Plane
Projects
None yet
Development

No branches or pull requests

5 participants