From 37715cffd027dee71228f7a3771272e007332755 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 19 Oct 2023 17:24:19 +0300 Subject: [PATCH] PMM-7 DBaaS leftovers to remove. (#2539) --- .golangci.yml | 4 - Makefile.include | 2 +- README.md | 1 - api-tests/init.go | 15 +--- api/managementpb/azure/json/azure.json | 50 +++++------ .../add_azure_database_responses.go | 11 +-- .../discover_azure_database_parameters.go | 5 +- .../discover_azure_database_responses.go | 11 +-- ..._api_client.go => pmm_azure_api_client.go} | 22 ++--- api/managementpb/azure/json/header.json | 11 +++ api/swagger/swagger-dev.json | 44 ++++----- build/docker/server/README.md | 2 +- docs/api/dbaas/create-psmdb-cluster.md | 53 ----------- docs/api/dbaas/create-pxc-cluster.md | 90 ------------------- docs/api/dbaas/dbaas.md | 0 .../pmm-server-config/troubleshooting/logs.md | 2 +- percona-dbaas-catalog.yaml | 13 --- .../roles/dashboards_upgrade/tasks/main.yml | 41 --------- 18 files changed, 70 insertions(+), 307 deletions(-) rename api/managementpb/azure/json/client/{pmm_d_baa_s_api_client.go => pmm_azure_api_client.go} (85%) create mode 100644 api/managementpb/azure/json/header.json delete mode 100644 docs/api/dbaas/create-psmdb-cluster.md delete mode 100644 docs/api/dbaas/create-pxc-cluster.md delete mode 100644 docs/api/dbaas/dbaas.md delete mode 100644 percona-dbaas-catalog.yaml diff --git a/.golangci.yml b/.golangci.yml index 9ba704817d..5e1e1956cc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -38,10 +38,6 @@ linters-settings: goimports: local-prefixes: github.com/percona/pmm - gomoddirectives: - replace-allow-list: - - github.com/percona-platform/dbaas-api - ireturn: allow: - anon diff --git a/Makefile.include b/Makefile.include index a19dd0ed0c..8136d98616 100644 --- a/Makefile.include +++ b/Makefile.include @@ -129,7 +129,7 @@ clean: clean_swagger ## Remove generated files test-common: ## Run tests from API (and other shared) packages only (i.e it ignores directories that are explicitly listed) go test $(shell go list ./... | grep -v -e admin -e agent -e managed -e api-tests -e qan-api2 -e update) -api-test: ## Run API tests on dev env. Use `PMM_KUBECONFIG=/path/to/kubeconfig.yaml make api-test` to run tests for DBaaS +api-test: ## Run API tests on dev env. go test -count=1 -race -p 1 -v ./api-tests/... -pmm.server-insecure-tls check: ## Run required checkers and linters diff --git a/README.md b/README.md index 5ceeac588e..7b76e73491 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ See the [PMM Documentation](https://www.percona.com/doc/percona-monitoring-and-m * Spot critical performance issues faster, understand the root cause of incidents better and troubleshoot them more efficiently. * Zoom-in, drill-down database performance from node to single query levels. Perform in-depth troubleshooting and performance optimization. * Built-in Advisors run regular checks of the databases connected to PMM. The checks identify and alert you of potential security threats, performance degradation, data loss and data corruption. -* DBaaS: Create and configure database clusters no matter where the infrastructure is deployed. * Backup and restore databases up to a specific moment with Point-in-Time-Recovery. ## Architecture diff --git a/api-tests/init.go b/api-tests/init.go index 5f1ab8aaf7..cf98b60787 100644 --- a/api-tests/init.go +++ b/api-tests/init.go @@ -57,7 +57,7 @@ var ( // Hostname contains local hostname that is used for generating test data. Hostname string - // True if -debug or -trace flag is passed. + // Debug is true if -debug or -trace flag is passed. Debug bool // RunUpdateTest is true if PMM Server update should be tested. @@ -65,9 +65,6 @@ var ( // RunSTTTests is true if STT tests should be run. RunSTTTests bool - - // Kubeconfig contains kubeconfig. - Kubeconfig string ) // NginxError is an error type for nginx HTML response. @@ -129,7 +126,6 @@ func init() { serverURLF := flag.String("pmm.server-url", "https://admin:admin@localhost/", "PMM Server URL [PMM_SERVER_URL].") serverInsecureTLSF := flag.Bool("pmm.server-insecure-tls", false, "Skip PMM Server TLS certificate validation [PMM_SERVER_INSECURE_TLS].") runUpdateTestF := flag.Bool("pmm.run-update-test", false, "Run PMM Server update test [PMM_RUN_UPDATE_TEST].") - kubeconfigF := flag.String("pmm.kubeconfig", "", "Pass kubeconfig file to run DBaaS tests.") // FIXME we should rethink it once https://jira.percona.com/browse/PMM-5106 is implemented runSTTTestsF := flag.Bool("pmm.run-stt-tests", false, "Run STT tests that require connected clients [PMM_RUN_STT_TESTS].") @@ -144,7 +140,6 @@ func init() { "PMM_SERVER_INSECURE_TLS": flag.Lookup("pmm.server-insecure-tls"), "PMM_RUN_UPDATE_TEST": flag.Lookup("pmm.run-update-test"), "PMM_RUN_STT_TESTS": flag.Lookup("pmm.run-stt-tests"), - "PMM_KUBECONFIG": flag.Lookup("pmm.kubeconfig"), } { env, ok := os.LookupEnv(envVar) if ok { @@ -197,14 +192,6 @@ func init() { logrus.Fatalf("Failed to detect hostname: %s", err) } - if *kubeconfigF != "" { - data, err := os.ReadFile(*kubeconfigF) - if err != nil { - logrus.Fatalf("Failed to read kubeconfig: %s", err) - } - Kubeconfig = string(data) - } - transport := Transport(BaseURL, *serverInsecureTLSF) alertmanagerTransport := Transport(BaseURL, *serverInsecureTLSF) alertmanagerTransport.BasePath = "/alertmanager/api/v2" diff --git a/api/managementpb/azure/json/azure.json b/api/managementpb/azure/json/azure.json index d86fbb583c..fe5cac5da4 100644 --- a/api/managementpb/azure/json/azure.json +++ b/api/managementpb/azure/json/azure.json @@ -11,7 +11,7 @@ ], "swagger": "2.0", "info": { - "title": "PMM DBaaS API", + "title": "PMM Azure API", "version": "v1beta1" }, "paths": { @@ -185,33 +185,25 @@ "code": { "type": "integer", "format": "int32", - "x-order": 1 + "x-order": 0 }, "details": { "type": "array", "items": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "x-order": 0 - }, - "value": { - "type": "string", - "format": "byte", - "x-order": 1 } - } + }, + "additionalProperties": false }, - "x-order": 3 - }, - "error": { - "type": "string", - "x-order": 0 + "x-order": 2 }, "message": { "type": "string", - "x-order": 2 + "x-order": 1 } } } @@ -228,6 +220,7 @@ "operationId": "DiscoverAzureDatabase", "parameters": [ { + "description": "DiscoverAzureDatabaseRequest discover azure databases request.", "name": "body", "in": "body", "required": true, @@ -343,33 +336,25 @@ "code": { "type": "integer", "format": "int32", - "x-order": 1 + "x-order": 0 }, "details": { "type": "array", "items": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "x-order": 0 - }, - "value": { - "type": "string", - "format": "byte", - "x-order": 1 } - } + }, + "additionalProperties": false }, - "x-order": 3 - }, - "error": { - "type": "string", - "x-order": 0 + "x-order": 2 }, "message": { "type": "string", - "x-order": 2 + "x-order": 1 } } } @@ -377,5 +362,10 @@ } } } - } + }, + "tags": [ + { + "name": "AzureDatabase" + } + ] } \ No newline at end of file diff --git a/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go b/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go index 84dff23137..b8fae05596 100644 --- a/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go +++ b/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go @@ -293,9 +293,6 @@ AddAzureDatabaseDefaultBody add azure database default body swagger:model AddAzureDatabaseDefaultBody */ type AddAzureDatabaseDefaultBody struct { - // error - Error string `json:"error,omitempty"` - // code Code int32 `json:"code,omitempty"` @@ -400,12 +397,8 @@ AddAzureDatabaseDefaultBodyDetailsItems0 add azure database default body details swagger:model AddAzureDatabaseDefaultBodyDetailsItems0 */ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { - // type url - TypeURL string `json:"type_url,omitempty"` - - // value - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // at type + AtType string `json:"@type,omitempty"` } // Validate validates this add azure database default body details items0 diff --git a/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go b/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go index a3d93a92e1..168d652b9b 100644 --- a/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go +++ b/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go @@ -60,7 +60,10 @@ DiscoverAzureDatabaseParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type DiscoverAzureDatabaseParams struct { - // Body. + /* Body. + + DiscoverAzureDatabaseRequest discover azure databases request. + */ Body DiscoverAzureDatabaseBody timeout time.Duration diff --git a/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go b/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go index 8198487041..c6a8c915da 100644 --- a/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go +++ b/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go @@ -171,9 +171,6 @@ DiscoverAzureDatabaseDefaultBody discover azure database default body swagger:model DiscoverAzureDatabaseDefaultBody */ type DiscoverAzureDatabaseDefaultBody struct { - // error - Error string `json:"error,omitempty"` - // code Code int32 `json:"code,omitempty"` @@ -278,12 +275,8 @@ DiscoverAzureDatabaseDefaultBodyDetailsItems0 discover azure database default bo swagger:model DiscoverAzureDatabaseDefaultBodyDetailsItems0 */ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { - // type url - TypeURL string `json:"type_url,omitempty"` - - // value - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // at type + AtType string `json:"@type,omitempty"` } // Validate validates this discover azure database default body details items0 diff --git a/api/managementpb/azure/json/client/pmm_d_baa_s_api_client.go b/api/managementpb/azure/json/client/pmm_azure_api_client.go similarity index 85% rename from api/managementpb/azure/json/client/pmm_d_baa_s_api_client.go rename to api/managementpb/azure/json/client/pmm_azure_api_client.go index f245309618..290e818c26 100644 --- a/api/managementpb/azure/json/client/pmm_d_baa_s_api_client.go +++ b/api/managementpb/azure/json/client/pmm_azure_api_client.go @@ -13,7 +13,7 @@ import ( "github.com/percona/pmm/api/managementpb/azure/json/client/azure_database" ) -// Default PMM d baa s API HTTP client. +// Default PMM azure API HTTP client. var Default = NewHTTPClient(nil) const ( @@ -28,14 +28,14 @@ const ( // DefaultSchemes are the default schemes found in Meta (info) section of spec file var DefaultSchemes = []string{"http", "https"} -// NewHTTPClient creates a new PMM d baa s API HTTP client. -func NewHTTPClient(formats strfmt.Registry) *PMMDBaaSAPI { +// NewHTTPClient creates a new PMM azure API HTTP client. +func NewHTTPClient(formats strfmt.Registry) *PMMAzureAPI { return NewHTTPClientWithConfig(formats, nil) } -// NewHTTPClientWithConfig creates a new PMM d baa s API HTTP client, +// NewHTTPClientWithConfig creates a new PMM azure API HTTP client, // using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *PMMDBaaSAPI { +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *PMMAzureAPI { // ensure nullable parameters have default if cfg == nil { cfg = DefaultTransportConfig() @@ -46,14 +46,14 @@ func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *PMM return New(transport, formats) } -// New creates a new PMM d baa s API client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMDBaaSAPI { +// New creates a new PMM azure API client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMAzureAPI { // ensure nullable parameters have default if formats == nil { formats = strfmt.Default } - cli := new(PMMDBaaSAPI) + cli := new(PMMAzureAPI) cli.Transport = transport cli.AzureDatabase = azure_database.New(transport, formats) return cli @@ -98,15 +98,15 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { return cfg } -// PMMDBaaSAPI is a client for PMM d baa s API -type PMMDBaaSAPI struct { +// PMMAzureAPI is a client for PMM azure API +type PMMAzureAPI struct { AzureDatabase azure_database.ClientService Transport runtime.ClientTransport } // SetTransport changes the transport on the client and all its subresources -func (c *PMMDBaaSAPI) SetTransport(transport runtime.ClientTransport) { +func (c *PMMAzureAPI) SetTransport(transport runtime.ClientTransport) { c.Transport = transport c.AzureDatabase.SetTransport(transport) } diff --git a/api/managementpb/azure/json/header.json b/api/managementpb/azure/json/header.json new file mode 100644 index 0000000000..66ecfbdecc --- /dev/null +++ b/api/managementpb/azure/json/header.json @@ -0,0 +1,11 @@ +{ + "swagger": "2.0", + "info": { + "title": "PMM Azure API", + "version": "v1beta1" + }, + "schemes": [ + "https", + "http" + ] +} diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index e2a34dc8a7..e8fd5acaa0 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -26925,36 +26925,28 @@ "schema": { "type": "object", "properties": { - "error": { - "type": "string", - "x-order": 0 - }, "code": { "type": "integer", "format": "int32", - "x-order": 1 + "x-order": 0 }, "message": { "type": "string", - "x-order": 2 + "x-order": 1 }, "details": { "type": "array", "items": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "x-order": 0 - }, - "value": { - "type": "string", - "format": "byte", - "x-order": 1 } - } + }, + "additionalProperties": false }, - "x-order": 3 + "x-order": 2 } } } @@ -26971,6 +26963,7 @@ "operationId": "DiscoverAzureDatabase", "parameters": [ { + "description": "DiscoverAzureDatabaseRequest discover azure databases request.", "name": "body", "in": "body", "required": true, @@ -27083,36 +27076,28 @@ "schema": { "type": "object", "properties": { - "error": { - "type": "string", - "x-order": 0 - }, "code": { "type": "integer", "format": "int32", - "x-order": 1 + "x-order": 0 }, "message": { "type": "string", - "x-order": 2 + "x-order": 1 }, "details": { "type": "array", "items": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", "x-order": 0 - }, - "value": { - "type": "string", - "format": "byte", - "x-order": 1 } - } + }, + "additionalProperties": false }, - "x-order": 3 + "x-order": 2 } } } @@ -29620,6 +29605,9 @@ { "name": "RestoreHistory" }, + { + "name": "AzureDatabase" + }, { "name": "Role" }, diff --git a/build/docker/server/README.md b/build/docker/server/README.md index de8f59c05a..5162fed23f 100644 --- a/build/docker/server/README.md +++ b/build/docker/server/README.md @@ -5,7 +5,7 @@ Percona Monitoring and Management (PMM) is an open source database observability - The tool allows you to view node to single query performance metrics and explain plans for all of your databases in a single place. - With Query Analytics, you can quickly locate costly and slow running queries and drill into precise execution details to address bottlenecks. - Percona Advisors equip you with performance, security and configuration recommendations that help you keep your databases performing at their best. -- Alerting and management features like backup, restore and built-in open source Private DBaaS are designed to increase the velocity of your IT team. +- Alerting and management features like backup and restore are designed to increase the velocity of your IT team. ## Starting PMM Server diff --git a/docs/api/dbaas/create-psmdb-cluster.md b/docs/api/dbaas/create-psmdb-cluster.md deleted file mode 100644 index e2acb6a4ae..0000000000 --- a/docs/api/dbaas/create-psmdb-cluster.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Create a PSMDB Cluster -slug: create-psmdb-cluster -category: 651c00ce1679590036133c8c -order: 2 -hidden: 0 ---- - -The PSMDB Create endpoint receives this structure of: - -```json -{ - "kubernetes_cluster_name": "string", - "name": "string", - "params": { - "cluster_size": 0, - "replicaset": { - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - }, - "disk_size": "string" - }, - "image": "string" - }, - "expose": true -} -``` - -## Fields description - -| Field | Description | Notes | -| ----------------------------------------- | ------------------------------------- | ------------------------------------------------------------ | -| kubernetes_cluster_name | Kubernetes cluster name | Required | -| name | PSMDB cluster name | Default: `psmdb`+DB version+5 chars random string | -| cluster_size | Cluster size | Default: 3 | -| replicaset.compute_resources.cpu_m | CPU resources millis | Default: 1000 | -| replicaset.compute_resources.memory_bytes | Max memory size in bytes | Default: 2 GB | -| disk_size | Max disk size | Default: 25 GB | -| image | PSMDB Docker image | Default is the recommended version from the Percona's version service | -| expose | Expose outside the Kubernetes cluster | Default: false | - - -Since the endpoint can set defaults, you can create a PSMDB cluster with a minimum request like this: - -```shell -curl -X POST "http://localhost/v1/management/DBaaS/PSMDBCluster/Create" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\" }" -``` - diff --git a/docs/api/dbaas/create-pxc-cluster.md b/docs/api/dbaas/create-pxc-cluster.md deleted file mode 100644 index e45779d647..0000000000 --- a/docs/api/dbaas/create-pxc-cluster.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Create a PXC Cluster -slug: create-pxc-cluster -category: 651c00ce1679590036133c8c -order: 1 -hidden: 0 ---- - -Once you register a Kubernetes cluster, you can use its name to create database clusters. Here is an example for the PXC cluster. Percona recommends the following the values for the parameters: - -```shell -curl -X POST "http://localhost/v1/management/DBaaS/PXCCluster/Create" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\", \"name\": \"my-cluster-1\", \"expose\": true, \"params\": { \"cluster_size\": 3, \"pxc\": { \"compute_resources\": { \"cpu_m\": 1000, \"memory_bytes\": 2000000000 }, \"disk_size\": 25000000000, \"image\": \"percona/percona-xtradb-cluster:8.0.25-15.1\" }, \"haproxy\": { \"compute_resources\": { \"cpu_m\": 1000, \"memory_bytes\": 2000000000 } } } }" -``` - -## Request parameters - -``` -{ - "kubernetes_cluster_name": "string", - "name": "string", - "params": { - "cluster_size": 0, - "pxc": { - "image": "string", - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - }, - "disk_size": "string" - }, - "proxysql": { - "image": "string", - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - }, - "disk_size": "string" - }, - "haproxy": { - "image": "string", - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - } - } - }, - "expose": true -} -``` - -### Fields description - -|Parameter |Description |Notes | -|---------------------------------------|------------------------------------------------|---------------------------------------------------------------------| -|kubernetes_cluster_name |Kubernetes cluster name |Required | -|name |PXC cluster name to be created |Default: pxc + DB version + 5 chars random string | -|cluster_size |Cluster size |Default: 3 | -|image |Docker image name |Default is the recommended version from the Percona's version service| -|compute_resources.cpu_m |CPU resources millis |Default: 1000 | -|mcompute_resources.memory_bytes |Max memory size in bytes |Default: 2 GB | -|disk_size |Max disk size for the PXC instance |Default: 25 GB | -|proxysql.image |Docker image for ProxySQL |Default: empty. (Use operator's default) | -|proxysql.compute_resources.cpu_m |CPU resources millis |Default: 1000 | -|proxysql.compute_resources.memory_bytes|Max memory size in bytes |Default 2 GB | -|proxysql.disk_size |Max disk size for ProxySQL |Default: empty, use operator's default | -|haproxyimage |Docker image for HA Proxy |Default: empty, use operator's default | -|haproxy.compute_resources.cpu_m |CPU resources millis |Default: 1000 | -|haproxy.compute_resources.memory_bytes |Max memory size in bytes |Default: 2 GB | -|expose |Make it available outside the Kubernetes cluster|Default: false | - -**Note:** -Either ProxySQL or HAProxy should be specified in the request. - -### Minimum request example - -Since the API has the defaults mentioned above, the HTTP request can have the Kubernetes cluster name as the only parameter. - -Example: - -```shell -curl -X POST "http://localhost/v1/management/DBaaS/PXCCluster/Create" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d '{ "kubernetes_cluster_name": "my_cluster" }' -``` diff --git a/docs/api/dbaas/dbaas.md b/docs/api/dbaas/dbaas.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/api/pmm-server-config/troubleshooting/logs.md b/docs/api/pmm-server-config/troubleshooting/logs.md index 86909f0c87..bae8669358 100644 --- a/docs/api/pmm-server-config/troubleshooting/logs.md +++ b/docs/api/pmm-server-config/troubleshooting/logs.md @@ -13,7 +13,7 @@ The structure of the logs is as follows: { "codes": [ { - "code": "# tree\n├── alertmanager.base.yml\n├── alertmanager.ini\n├── alertmanager.log\n├── alertmanager.yml\n├── clickhouse-server.err.log\n├── clickhouse-server.log\n├── clickhouse-server.startup.log\n├── client\n│ ├── list.txt\n│ ├── pmm-admin-version.txt\n│ ├── pmm-agent-config.yaml\n│ ├── pmm-agent-version.txt\n│ └── status.json\n├── cron.log\n├── dashboard-upgrade.log\n├── dbaas-controller.log\n├── grafana.log\n├── installed.json\n├── nginx.conf\n├── nginx.log\n├── nginx.startup.log\n├── pmm-agent.log\n├── pmm-agent.yaml\n├── pmm-managed.log\n├── pmm-ssl.conf\n├── pmm-update-perform-init.log\n├── pmm-update-perform.log\n├── pmm-version.txt\n├── pmm.conf\n├── pmm.ini\n├── postgresql.log\n├── postgresql.startup.log\n├── prometheus.base.yml\n├── prometheus.log\n├── qan-api2.ini\n├── qan-api2.log\n├── supervisorctl_status.log\n├── supervisord.conf\n├── supervisord.log\n├── systemctl_status.log\n├── victoriametrics-promscrape.yml\n├── victoriametrics.ini\n├── victoriametrics.log\n├── victoriametrics_targets.json\n├── vmalert.ini\n└── vmalert.log", + "code": "# tree\n├── alertmanager.base.yml\n├── alertmanager.ini\n├── alertmanager.log\n├── alertmanager.yml\n├── clickhouse-server.err.log\n├── clickhouse-server.log\n├── clickhouse-server.startup.log\n├── client\n│ ├── list.txt\n│ ├── pmm-admin-version.txt\n│ ├── pmm-agent-config.yaml\n│ ├── pmm-agent-version.txt\n│ └── status.json\n├── cron.log\n├── dashboard-upgrade.log\n├── grafana.log\n├── installed.json\n├── nginx.conf\n├── nginx.log\n├── nginx.startup.log\n├── pmm-agent.log\n├── pmm-agent.yaml\n├── pmm-managed.log\n├── pmm-ssl.conf\n├── pmm-update-perform-init.log\n├── pmm-update-perform.log\n├── pmm-version.txt\n├── pmm.conf\n├── pmm.ini\n├── postgresql.log\n├── postgresql.startup.log\n├── prometheus.base.yml\n├── prometheus.log\n├── qan-api2.ini\n├── qan-api2.log\n├── supervisorctl_status.log\n├── supervisord.conf\n├── supervisord.log\n├── systemctl_status.log\n├── victoriametrics-promscrape.yml\n├── victoriametrics.ini\n├── victoriametrics.log\n├── victoriametrics_targets.json\n├── vmalert.ini\n└── vmalert.log", "language": "text" } ] diff --git a/percona-dbaas-catalog.yaml b/percona-dbaas-catalog.yaml deleted file mode 100644 index cf00d4e57f..0000000000 --- a/percona-dbaas-catalog.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: CatalogSource -metadata: - name: percona-dbaas-catalog - namespace: olm -spec: - displayName: Percona DBaaS Catalog - publisher: Percona - sourceType: grpc - image: docker.io/percona/dbaas-catalog:latest - updateStrategy: - registryPoll: - interval: 45m diff --git a/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml b/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml index 7c5080cfa9..c9d4ae9019 100644 --- a/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml +++ b/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml @@ -63,47 +63,6 @@ path: /srv/grafana/grafana.db register: sqlite_grafana -- name: Remove old dashboards from SQLite - block: - - name: Restart grafana before deleting data EL7 - supervisorctl: - name: grafana - state: stopped - become: true - when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7' - ignore_errors: true - - - name: Restart grafana before deleting data EL9 - supervisorctl: - name: grafana - state: stopped - supervisorctl_path: /usr/local/bin/supervisorctl - become: true - when: (ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux') and ansible_distribution_major_version == '9' - ignore_errors: true - # FIXME: we have a race condition here. We generate grafana supervisor config in pmm-managed and it doesn't exist at this stage - - - name: Remove old DBaaS dashboard (Before provisioning times) - command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'DBaaS' AND slug = 'dbaas';" - changed_when: true - - - name: Remove old PMM Inventory (Before provisioning times) - command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'PMM Inventory' AND slug = 'pmm-inventory';" - changed_when: true - - - name: Remove old PMM Add Instance dashboard (Before provisioning times) - command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'PMM Add Instance' AND slug = 'pmm-add-instance';" - changed_when: true - - - name: Remove old PMM Database Checks dashboard (Before provisioning times) - command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'PMM Database Checks' AND slug = 'pmm-database-checks';" - changed_when: true - - - name: Remove old PMM Settings dashboard (Before provisioning times) - command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'PMM Settings' AND slug = 'pmm-settings';" - changed_when: true - when: sqlite_grafana.stat.exists - - name: Remove the old clickhouse plugin shell: grafana cli --pluginsDir /srv/grafana/plugins plugins remove vertamedia-clickhouse-datasource || true