-
Notifications
You must be signed in to change notification settings - Fork 135
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-12644 Remove the use of data container #3414
base: v3
Are you sure you want to change the base?
Changes from 5 commits
43e26df
5be5aea
ff059a5
ade6144
fccfa42
76076c5
b0e3dc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,8 +4,9 @@ | |||||
|
||||||
!!! summary alert alert-info "" | ||||||
- Stop the container. | ||||||
- Remove (delete) both the server and data containers. | ||||||
- Remove (delete) both images. | ||||||
- Remove the container. | ||||||
- Remove the data volume. | ||||||
- Remove the image. | ||||||
|
||||||
--- | ||||||
|
||||||
|
@@ -21,14 +22,20 @@ To remove the container: | |||||
docker stop pmm-server | ||||||
``` | ||||||
|
||||||
2. Remove containers. | ||||||
2. Remove the container. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```sh | ||||||
docker rm pmm-server pmm-data | ||||||
docker rm pmm-server | ||||||
``` | ||||||
|
||||||
3. Remove the image. | ||||||
3. Remove the data volume. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```sh | ||||||
docker rmi $(docker images | grep "percona/pmm-server" | awk {'print $3'}) | ||||||
docker volume rm pmm-data | ||||||
``` | ||||||
|
||||||
4. Remove the image. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```sh | ||||||
docker rmi $(docker images | grep "percona/pmm-server" | awk '{print $3}') | ||||||
``` |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the page already contains only this task, the summary seems to duplicate the existing content. Summary sections are more appropriate for long topics where they help users jump to specific sections. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,8 +5,9 @@ | |||||
!!! summary alert alert-info "" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- Stop and remove the container. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- Restore (rename) the backup container. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- Restore saved data to the data container. | ||||||
- Restore permissions to the data. | ||||||
- Restore saved data to the data volume. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- Restore permissions to the directories. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- Start the container. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
--- | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
|
@@ -36,36 +37,24 @@ To restore the container: | |||||
|
||||||
4. Change directory to the backup directory (e.g. `pmm-data-backup`). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
5. Remove Victoria Metrics data folder. | ||||||
|
||||||
```sh | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta rm -r /srv/victoriametrics/data | ||||||
cd pmm-data-backup | ||||||
``` | ||||||
|
||||||
6. Copy the data. | ||||||
5. Copy the data. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```sh | ||||||
docker cp srv pmm-data:/ | ||||||
docker run --rm -v $(pwd)/srv:/backup -v pmm-data:/srv -t perconalab/pmm-server:3.0.0-beta cp -r /backup/* /srv | ||||||
``` | ||||||
|
||||||
7. Restore permissions. | ||||||
6. Restore permissions. | ||||||
|
||||||
```sh | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R root:root /srv && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R pmm:pmm /srv/alertmanager && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R root:pmm /srv/clickhouse && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R grafana:grafana /srv/grafana && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R pmm:pmm /srv/logs && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R postgres:postgres /srv/postgres14 && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R pmm:pmm /srv/prometheus && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R pmm:pmm /srv/victoriametrics && \ | ||||||
docker run --rm --volumes-from pmm-data -it perconalab/pmm-server:3.0.0-beta chown -R postgres:postgres /srv/logs/postgresql14.log | ||||||
docker run --rm -v pmm-data:/srv -t perconalab/pmm-server:3.0.0-beta chown -R pmm:pmm /srv | ||||||
``` | ||||||
|
||||||
8. Start the image. | ||||||
7. Start the image. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```sh | ||||||
docker start pmm-server | ||||||
``` | ||||||
|
||||||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,36 +10,38 @@ To run Docker with the host directory: | |
docker pull perconalab/pmm-server:3.0.0-beta | ||
``` | ||
|
||
2. Run the image: | ||
2. Identify a directory on the host that you want to use to persist PMM data. For example, `/home/user/srv`. | ||
|
||
3. Run the image: | ||
|
||
```sh | ||
docker run --detach --restart always \ | ||
--publish 443:8443 \ | ||
--env PMM_WATCHTOWER_HOST=your_watchtower_host \ | ||
--env PMM_WATCHTOWER_TOKEN=your_watchtower_token \ | ||
--volumes-from pmm-data \ | ||
--volume /home/user/srv:/srv \ | ||
--network=pmm_default \ | ||
--name pmm-server \ | ||
perconalab/pmm-server:3.0.0-beta | ||
``` | ||
|
||
3. Change the password for the default `admin` user: | ||
4. Change the password for the default `admin` user: | ||
|
||
```sh | ||
docker exec -t pmm-server change-admin-password <new_password> | ||
``` | ||
|
||
4. Check the [WatchTower prerequisites](../docker/index.md|#prerequisites) and pass the following command to Docker Socket to start [Watchtower](https://containrrr.dev/watchtower/): | ||
5. Check the [WatchTower prerequisites](../docker/index.md|#prerequisites) and pass the following command to Docker Socket to start [Watchtower](https://containrrr.dev/watchtower/): | ||
|
||
```sh | ||
docker run -v /var/run/docker.sock:/var/run/docker.sock -e WATCHTOWER_HTTP_API_UPDATE=1 -e WATCHTOWER_HTTP_API_TOKEN=your_watchtower_token --hostname=your_watchtower_host --network=pmm_default docker.io/perconalab/watchtower | ||
``` | ||
|
||
5. Visit `https://localhost:443` to see the PMM user interface in a web browser. (If you are accessing the docker host remotely, replace `localhost` with the IP or server name of the host.) | ||
6. Visit `https://localhost:443` to see the PMM user interface in a web browser. (If you are accessing the docker host remotely, replace `localhost` with the IP or server name of the host.) | ||
|
||
## Migrate from data container to host directory/volume | ||
## Migrate from data container to host directory | ||
|
||
To migrate your PMM from data container to host directory or volume run the following command: | ||
To migrate your PMM from data container to host directory, run the following command: | ||
Comment on lines
+42
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO yes, it still is the right term. |
||
|
||
```sh | ||
docker cp <containerId>:/srv /target/host/directory | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||
# Migrate PMM 2 to PMM 3 | ||||||
|
||||||
PMM 3 introduces significant architectural changes that require gradual transition from PMM 2: | ||||||
PMM 3 introduces significant architectural changes that require gradual transition from PMM 2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## Step 1: Upgrade PMM 2 Server to the latest version | ||||||
|
||||||
|
@@ -50,7 +50,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio | |||||
docker pull perconalab/pmm-server:3.0.0-beta | ||||||
``` | ||||||
|
||||||
6. Run new container with existing volume: | ||||||
6. Run the new version of PMM Server with the existing volume: | ||||||
|
||||||
```sh | ||||||
docker run -d -v pmm-server-data:/srv -p 443:8443 --name pmm-server --restart always perconalab/pmm-server:3.0.0-beta | ||||||
|
@@ -73,7 +73,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio | |||||
docker exec -t <pmm-server> chown -R pmm:pmm /srv | ||||||
``` | ||||||
|
||||||
3. Identify data container using either: | ||||||
3. Identify the data container using either: | ||||||
|
||||||
```sh | ||||||
docker ps -a --filter "status=created" | ||||||
|
@@ -87,7 +87,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio | |||||
{% endraw %} | ||||||
``` | ||||||
|
||||||
4. Stop and remove existing container: | ||||||
4. Stop and remove the existing container: | ||||||
|
||||||
```sh | ||||||
docker stop pmm-server && docker rm pmm-server | ||||||
|
@@ -99,7 +99,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio | |||||
docker pull perconalab/pmm-server:3.0.0-beta | ||||||
``` | ||||||
|
||||||
6. Run new container with existing data container: | ||||||
6. Run the new version PMM Server with the existing data container: | ||||||
|
||||||
```sh | ||||||
docker run -d --volumes-from pmm-server-data -p 443:8443 --name pmm-server --restart always perconalab/pmm-server:3.0.0-beta | ||||||
|
@@ -110,7 +110,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio | |||||
!!! caution alert alert-warning "Important" | ||||||
PMM 3 Server provides limited support for PMM 2 Clients (metrics and Query Analytics only). This support will be removed in PMM 3.3. | ||||||
|
||||||
Depending on your initial installation method, update PMM Clients using your operating system's package manager or by updating from a tarball. | ||||||
Depending on your initial installation method, update PMM Clients using your operating system's package manager or using a tarball. | ||||||
For detailed instructions, see the [Upgrade PMM Client topic](../pmm-upgrade/upgrade_client.md). | ||||||
|
||||||
### Post-migration steps | ||||||
|
@@ -120,4 +120,4 @@ After you finish migrating: | |||||
|
||||||
1. Verify that all PMM Clients are up to date by checking **PMM Configuration > Updates**. | ||||||
2. Confirm all previously monitored services are reporting correctly to the new PMM 3 Server by reviewing **Configuration > PMM Inventory > Services**. | ||||||
3. Check the dashboards to make sure you're receiving the metrics information and QAN data. | ||||||
3. Check the dashboards to make sure you're receiving the metrics and QAN data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we delete this summary?
Since the page already contains only this task, the summary seems to duplicate the existing content. Summary sections are more appropriate for long topics where they help users jump to specific sections.