Uploaded image for project: 'Managed Service - Streams'
  1. Managed Service - Streams
  2. MGDSTRM-10255

Develop rhoas cli command to register and terraform a cluster

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • 5
    • False
    • None
    • False
    • No
    • MGDSRVS-145 - RHOSAK Enterprise Plan: RHOSAK on customer-owned OSD/ROSA/ARO
    • ---
    • ---
    • MGDX - Sprint 229, MGDX - Sprint 230, MGDX - Sprint 231

      WHAT

      We want to extend the RHOAS CLI to be able to register and terraform a customer owned ROSA cluster.

      WHY

      The official CLI is a better way for customers to interact with our service than a script they would have to run. Documentation can be built into the command.

      HOW

      The rhoas CLI should be extended with a new command 'enterprise':

      rhoas cluster enterprise <subcommand>

      The following subcommands should be supported:

      rhoas cluster enterprise register --cluster-id=<ocm cluster id> --reserved-nodes=<nodes in machine pool>

      where:

      cluster-id: the OCM cluster id.

      reserved-nodes: the number of nodes that the customer wants to assign to the Kafka machine pool.

      The register command should do the following:

      1. Create a machine pool of size <reserved nodes>. An example can be found here.]. For customer owned cluster, auto-scaling should not be enabled.
      2. Call the KAS Fleet Manager registration endpoint.]
        1. This requires four parameter: ocm cluster id, external cluster id, cluster dns and machine pool size.
        2. Cluster DNS can be obtained from ocm: https://github.com/bf2fc6cc711aee1a0c2a/kas-fleet-manager/blob/26be87ff7542d66f6295d7534a3281ad24cfbc12/pkg/client/ocm/client.go#L297
        3. External Cluster ID: can be obtained from ocm for a given cluster by it's internal ocm id.
        4. Machine Pool Size: the customer passes this to the CLI.
      3. Install the required Add-Ons using the ocm SDK:
        1. Strimzi: https://github.com/bf2fc6cc711aee1a0c2a/kas-fleet-manager/blob/main/internal/kafka/internal/clusters/ocm_provider.go#L156
        2. Fleetshard Operator: https://github.com/bf2fc6cc711aee1a0c2a/kas-fleet-manager/blob/main/internal/kafka/internal/clusters/ocm_provider.go#L164
        3. Installing the Fleetshard Add-On requires additional params. All params are returned from the registration endpoint in the Fleet Manager in step 2.

      DONE

      Include the following where applicable:

      • RHOAS CLI enterprise register subcommand added

      Guidelines

      The following steps should be adhered to:

      • Required tests should be put in place - unit, integration, manual test cases (if necessary)
      • CI and all relevant tests passing
      • Changes have been verified by one additional reviewer against:
      • each required environment
      • each supported upgrade path
      • If the changes could have an impact on the clients (either UI or CLI), a JIRA should be created for making the required changes on the client side and acknowledged by one of the client side team members. PR has been merged
         

            dsaridak@redhat.com Dimitri Saridakis
            pbraun@redhat.com Peter Braun
            MK - DevExp
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: