All work

Select view

Select search mode

 

[Architecture] Move OLM to PMM

Done

Description

We have a successful PoC for OLM done in https://perconadev.atlassian.net/browse/PMM-10705#icft=PMM-10705. However, the code is located in the dbaas-controller.

Since OLM will manage the operator's lifecycle the best place for it is PMM. PMM should install OLM, install operators and run monitoring 

Suggested solution 

  1. Create a package for OLM in `managed/services/dbaas/olm`

  2. integrate with the `managed/services/management/dbaas`

  3. Add unit tests

  4. Move everything related to OLM from dbaas-controller and dbaas-api to PMM

Acceptance criteria 

  1. Integration tests are passing

  2. The end user does not see any difference 

 

Out of scope

1. OLM Catalog

How to test

  1. Start PMM server using the FB: https://github.com/Percona-Lab/pmm-submodules/pull/2987

  2. Register a Kubernetes cluster.

  3. OLM and VM, PXC and PSMDB operators should be installed. 
    This can be verified by running kubectl get pods

kubectl get pods -A NAMESPACE           NAME                                                              READY   STATUS      RESTARTS        AGE default             kube-state-metrics-545df6b897-nh2f8                               1/1     Running     0               20m default             percona-server-mongodb-operator-769477f868-xvc5d                  1/1     Running     0               14m default             percona-xtradb-cluster-operator-58f8c465db-wrkwb                  1/1     Running     0               19m default             vm-operator-vm-operator-7787965b7b-bvr6j                          1/1     Running     0               19m default             vmagent-pmm-vmagent-vm-operator-15926203473649048369-75cb6kftv5   2/2     Running     0               2m46s kube-system         coredns-6d4b75cb6d-58snc                                          1/1     Running     0               37m kube-system         etcd-minikube                                                     1/1     Running     0               37m kube-system         kube-apiserver-minikube                                           1/1     Running     0               37m kube-system         kube-controller-manager-minikube                                  1/1     Running     0               37m kube-system         kube-proxy-4h2kw                                                  1/1     Running     0               37m kube-system         kube-scheduler-minikube                                           1/1     Running     0               37m kube-system         storage-provisioner                                               1/1     Running     1 (37m ago)     37m monitoring-system   vm-operator-76cc9cdc76-bmvjw                                      1/1     Running     0               20m olm                 2f32c86e6aee5faca4ecf9af1261fe18f5503ce6af354ea6f855e569bc9v6ms   0/1     Completed   0               19m olm                 394755ca673c151520fb4c7f329cbf4777431af88f3f4f4648243152a0rtr98   0/1     Completed   0               20m olm                 67cc6b0f47c434a4976b67ba041cb2d4eea12101207694b411e402a4ea7prdr   0/1     Completed   0               20m olm                 aa2b3c4c0e29b97a7c57ec9b09131a9ea626548068fffd1815ec6b5a0dqv4zt   0/1     Completed   0               20m olm                 catalog-operator-7d48d9d9ff-qxv5h                                 1/1     Running     0               21m olm                 d3c6a40691712aa1572f3f5cc40410d7445b128edd24c8b0d55f0282174qjs9   0/1     Completed   0               14m olm                 olm-operator-5984b4c9d7-czzls                                     1/1     Running     0               21m olm                 operatorhubio-catalog-d5962                                       1/1     Running     0               21m olm                 packageserver-dc54888c5-6tkzb                                     1/1     Running     0               21m olm                 packageserver-dc54888c5-sxgp8                                     1/1     Running     0               21m
  1. Start a DB cluster. The DB should appear. Example:

kubectl get pods -A NAMESPACE           NAME                                                              READY   STATUS      RESTARTS        AGE default             kube-state-metrics-545df6b897-nh2f8                               1/1     Running     0               20m default             mongodb-6z6v7n-cfg-0                                              3/3     Running     0               5m27s default             mongodb-6z6v7n-cfg-1                                              3/3     Running     1 (3m51s ago)   4m19s default             mongodb-6z6v7n-cfg-2                                              3/3     Running     0               3m50s default             mongodb-6z6v7n-mongos-0                                           2/2     Running     1 (2m57s ago)   3m14s default             mongodb-6z6v7n-mongos-1                                           2/2     Running     0               2m59s default             mongodb-6z6v7n-mongos-2                                           2/2     Running     0               2m40s default             mongodb-6z6v7n-rs0-0                                              3/3     Running     0               5m27s default             mongodb-6z6v7n-rs0-1                                              3/3     Running     0               4m16s default             mongodb-6z6v7n-rs0-2                                              3/3     Running     1 (3m16s ago)   3m49s default             percona-server-mongodb-operator-769477f868-xvc5d                  1/1     Running     0               14m default             percona-xtradb-cluster-operator-58f8c465db-wrkwb                  1/1     Running     0               19m default             vm-operator-vm-operator-7787965b7b-bvr6j                          1/1     Running     0               19m default             vmagent-pmm-vmagent-vm-operator-15926203473649048369-75cb6kftv5   2/2     Running     0               2m46s kube-system         coredns-6d4b75cb6d-58snc                                          1/1     Running     0               37m kube-system         etcd-minikube                                                     1/1     Running     0               37m kube-system         kube-apiserver-minikube                                           1/1     Running     0               37m kube-system         kube-controller-manager-minikube                                  1/1     Running     0               37m kube-system         kube-proxy-4h2kw                                                  1/1     Running     0               37m kube-system         kube-scheduler-minikube                                           1/1     Running     0               37m kube-system         storage-provisioner                                               1/1     Running     1 (37m ago)     37m monitoring-system   vm-operator-76cc9cdc76-bmvjw                                      1/1     Running     0               20m olm                 2f32c86e6aee5faca4ecf9af1261fe18f5503ce6af354ea6f855e569bc9v6ms   0/1     Completed   0               19m olm                 394755ca673c151520fb4c7f329cbf4777431af88f3f4f4648243152a0rtr98   0/1     Completed   0               20m olm                 67cc6b0f47c434a4976b67ba041cb2d4eea12101207694b411e402a4ea7prdr   0/1     Completed   0               20m olm                 aa2b3c4c0e29b97a7c57ec9b09131a9ea626548068fffd1815ec6b5a0dqv4zt   0/1     Completed   0               20m olm                 catalog-operator-7d48d9d9ff-qxv5h                                 1/1     Running     0               21m olm                 d3c6a40691712aa1572f3f5cc40410d7445b128edd24c8b0d55f0282174qjs9   0/1     Completed   0               14m olm                 olm-operator-5984b4c9d7-czzls                                     1/1     Running     0               21m olm                 operatorhubio-catalog-d5962                                       1/1     Running     0               21m olm                 packageserver-dc54888c5-6tkzb                                     1/1     Running     0               21m olm                 packageserver-dc54888c5-sxgp8                                     1/1     Running     0               21m
  1. VM API keys must exist

How to document

None

Attachments

2
0% Done

relates to

Details

Assignee

Reporter

Priority

Needs QA

Needs Doc

Planned Version/s

Fix versions

Story Points

Created November 7, 2022 at 9:30 AM
Updated March 6, 2024 at 12:26 AM
Resolved March 24, 2023 at 8:45 AM

Activity

Show:

Yusaf Awan 
February 28, 2023 at 8:25 AM

as discussed, there are a few bugs in the ticket, but they are not blockers:
1. https://jira.percona.com/browse/PMM-11396
2. https://jira.percona.com/browse/PMM-11226
3. https://jira.percona.com/browse/PMM-11732

Carlos Salguero 
February 12, 2023 at 11:01 PM
(edited)

Latest FB: (2023-02-21) https://github.com/Percona-Lab/pmm-submodules/pull/3080
  There are still problems as you mentioned in the 3 tickets in the previous comment, but the OLM part works correctly. 

Yusaf Awan 
February 9, 2023 at 12:28 PM

Yusaf Awan 
February 8, 2023 at 11:29 AM

We still have this https://jira.percona.com/browse/PMM-11338 bug in this FB. decided to remove PSMDB v.12.0, as it was causing this issue. Can you please take a look?
Tested using the latest FB https://github.com/Percona-Lab/pmm-submodules/pull/2997.

Carlos Salguero 
January 7, 2023 at 5:49 PM
(edited)

Pull Requests for code review:
PMM managed: https://github.com/percona/pmm/pull/1529 - OLM methods using client-go instead kubectl.
DBaaS controller: https://github.com/percona-platform/dbaas-controller/pull/413 (Removed OLM parts)
DBaaS API: https://github.com/percona-platform/dbaas-api/pull/233 Removed OLM parts.

 

Feature build: (updated 2023-02-01) https://github.com/Percona-Lab/pmm-submodules/pull/2997