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

PMM-13025 - Upgrade changes #1316

Open
wants to merge 41 commits into
base: PMM3_Beta
Choose a base branch
from
Open

PMM-13025 - Upgrade changes #1316

wants to merge 41 commits into from

Conversation

catalinaadam
Copy link
Contributor

No description provided.

@catalinaadam catalinaadam requested a review from a team as a code owner October 4, 2024 13:05
README.md Outdated Show resolved Hide resolved
docs/alert/silence_alerts.md Outdated Show resolved Hide resolved
docs/how-to/upgrade.md Outdated Show resolved Hide resolved
docs/pmm-upgrade/upgrade_docker.md Outdated Show resolved Hide resolved
docs/pmm-upgrade/upgrade_docker.md Outdated Show resolved Hide resolved
docs/pmm-upgrade/upgrade_from_ppm_2.md Outdated Show resolved Hide resolved
docs/pmm-upgrade/upgrade_from_ppm_2.md Outdated Show resolved Hide resolved
docs/pmm-upgrade/upgrade_from_ppm_2.md Outdated Show resolved Hide resolved
docs/pmm-upgrade/upgrade_podman.md Outdated Show resolved Hide resolved
docs/troubleshoot/upgrade_issues.md Outdated Show resolved Hide resolved
Copy link
Member

@BupycHuk BupycHuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably we need to mention that we run watchtower next to PMM Server and used for UI upgrade. it upgrades PMM Server by replacing docker containers.
For that watchtower requires access to docker socket, it's safe, because watchtower is not exposed anywhere outside of docker network.


- `main` is for PMM 2.x (latest)
- `PMM3-branch` is for PMM 3.x (latest)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make it v3 like in other repos.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BupycHuk , yes, I was planning to rename main to 2.x and PMM3-branch to 3.x after GA, when PMM-3-branch becomes main. Or shall we do this when we move the doc repo to the pmm code repo?

@@ -29,9 +29,9 @@ For more information on working with silences, see [About alerting silences](htt

### Template compatibility with previous PMM versions

If you have used Integrated Alerting in previous PMM versions, your custom alert rule templates will be automatically migrated to the new PMM version. After upgrading to the new version, you will find all your alert templates under **Alerting > Alert rule templates**.
If you have used Integrated Alerting in previous PMM 2.31 and earlier, your custom alert rule templates will be automatically migrated to the new PMM version. After upgrading to the new version, you will find all your alert templates under **Alerting > Alert rule templates**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we support upgrade only from the latest PMM 2, so I think we can drop it from here.

@@ -20,7 +20,7 @@ For MySQL databases, you can create and restore on-demand and scheduled physical

### Sharded MongoDB cluster configurations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rnovikovP should we deprecate Backup in PMM or we keep supporting it until SEP integration?

1. run docker exec -t <pmm-server> supervisorctl stop all to stop all services of pmm-server container
2. run docker exec -t <pmm-server> chown -R pmm:pmm /srv to transfer ownership of all directories and files located in /srv directory to pmm user
3. stop and remove pmm-server container (docker stop pmm-server && docker rm pmm-server )
4. pull a new docker image for PMM Server v3 (once it goes GA, it will be docker pull percona/pmm-server:3 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should recommend to do it as the first step to have shorter PMM down period.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, @BupycHuk. I. have made this change in the docs/pmm-upgrade/upgrade_from_ppm_2.md topic. This is the originanting topic, which got separated into individual ones. I have deleted it now as it only duplicates content now.

2. run docker exec -t <pmm-server> chown -R pmm:pmm /srv to transfer ownership of all directories and files located in /srv directory to pmm user
3. stop and remove pmm-server container (docker stop pmm-server && docker rm pmm-server )
4. pull a new docker image for PMM Server v3 (once it goes GA, it will be docker pull percona/pmm-server:3 )
5. run a new container based on v3 image (see above) while remembering to pass the same pmm-data volume to it (docker run -d -v pmm-data:/srv ... percona/pmm-server:3 )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also need to mention that environment variables were changed between PMM 2 and PMM 3. @catalinaadam @idoqo do we have list somewhere public?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BupycHuk , Added a section in the Environment variabled topic

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to expand that. have you checked this doc https://github.com/percona/pmm/blob/v3/docs/process/v2_to_v3_environment_variables.md ?

Comment on lines 34 to 35
!!! caution alert alert-warning "Known issue for older versions"
- PMM versions prior to 2.33.0 may not show the latest versions available with instances created from the AWS marketplace in specific environments, including AWS. For solution, see the [troubleshooting](../how-to/troubleshoot.md#pmm-server-not-showing-latest-versions-available-with-the-instances-created-from-aws) section.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop it for V3


![!image](../_images/PMM_Home_Dashboard_Panels_Upgrade.jpg)

The panel shows:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is below section about upgrading from PMM 1, I think we can drop it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted duplicate topic

Comment on lines 30 to 39
yum --showduplicates search pmm2-client
pmm2-client-2.39.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.40.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.40.1-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.1-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.2-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.42.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)

yum update pmm2-client-2.41.2-6.el9.x86_64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in examples we should use PMM 3 versions. For PMM 3 package name is pmm-client.

@@ -0,0 +1,68 @@
# Upgrade from PMM 2 to PMM 3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filename has typo, it should be pmm, not ppm

Always upgrade the PMM Server before you upgrade the PMM Client.
Ensure that the PMM Server version is equal to or higher than the PMM Client version. Otherwise, configuration issues may arise, potentially causing failures in Client-Server communication, as the PMM Server may not recognize all the configuration parameters.

### Migrating from PMM 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this block duplicates file below

Comment on lines 29 to 39
```sh
yum --showduplicates search pmm2-client
pmm2-client-2.39.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.40.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.40.1-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.1-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.2-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.42.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)

yum update pmm2-client-2.41.2-6.el9.x86_64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```sh
yum --showduplicates search pmm2-client
pmm2-client-2.39.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.40.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.40.1-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.1-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.41.2-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm2-client-2.42.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
yum update pmm2-client-2.41.2-6.el9.x86_64
```sh
yum --showduplicates search pmm-client
pmm-client-3.0.0-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
pmm-client-3.0.1-6.el9.x86_64 : Percona Monitoring and Management Client (pmm-agent)
yum update pmm-client-3.0.1-6.el9.x86_64

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the packages do not exist yet, but they are anticipated to be like that.

Comment on lines +148 to +155
| `PERCONA_TEST_TELEMETRY_DISABLE_START_DELAY` | `PMM_DEV_TELEMETRY_DISABLE_START_DELAY` |
| `PMM_TEST_TELEMETRY_FILE` | `PMM_DEV_TELEMETRY_FILE` |
| `PERCONA_TEST_TELEMETRY_HOST` | `PMM_DEV_TELEMETRY_HOST` |
| `PERCONA_TEST_TELEMETRY_INTERVAL` | `PMM_DEV_TELEMETRY_INTERVAL` |
| `PERCONA_TEST_TELEMETRY_RETRY_BACKOFF` | `PMM_DEV_TELEMETRY_RETRY_BACKOFF` |
| `PERCONA_TEST_VERSION_SERVICE_URL` | `PMM_DEV_VERSION_SERVICE_URL` |
| `PERCONA_TEST_STARLARK_ALLOW_RECURSION` | `PMM_DEV_ADVISOR_STARLARK_ALLOW_RECURSION` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's drop PMM_DEV_* env variables as they are for developers.

Comment on lines +110 to +118
| PMM 2 | PMM 3 |
|---------------------------------|------------------------------------|
| `OAUTH_PMM_CLIENT_ID` | `PMM_DEV_OAUTH_CLIENT_ID` |
| `OAUTH_PMM_CLIENT_SECRET` | `PMM_DEV_OAUTH_CLIENT_SECRET` |
| `PERCONA_PLATFORM_API_TIMEOUT` | `PMM_DEV_PERCONA_PLATFORM_API_TIMEOUT` |
| `PERCONA_TEST_PLATFORM_ADDRESS` | `PMM_DEV_PERCONA_PLATFORM_ADDRESS` |
| `PERCONA_TEST_PLATFORM_INSECURE`| `PMM_DEV_PERCONA_PLATFORM_INSECURE`|
| `PERCONA_TEST_PLATFORM_PUBLIC_KEY` | `PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's drop PMM_DEV_* env variables as they are for developers.


```sh
docker pull percona/pmm-server:3
```1. Stop all services of the PMM 2 server container:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something went wrong with formatting here

!!! seealso alert alert-info "See also"
- [Upgrade from PMM1](how-to/upgrade.md#upgrade-from-pmm-1)
- [Percona blog: Running PMM1 and PMM2 Clients on the Same Host](https://www.percona.com/blog/2019/11/27/running-pmm1-and-pmm2-clients-on-the-same-host/)
A direct software upgrade path is not available. For detailed instructions, see [Upgrade from PMM2](../pmm-upgrade/upgrade_from_pmm_2.md)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for PMM 2 to PMM 3 we have direct upgrade, it's not the same as PMM 1 to PMM 2 upgrade.


There is no direct software upgrade path.
There is no direct software upgrade path. For infomation, see [Upgrade from PMM2](../pmm-upgrade/upgrade_from_pmm_2.md).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants