Upgrading the postanalytics module¶
These instructions describe the steps to upgrade the postanalytics module 3.4 or 3.2 installed on a separate server. Postanalytics module must be upgraded before Upgrading Wallarm NGINX modules.
To upgrade the module 2.18 or lower, please use the different instructions.
Requirements¶
-
Access to the account with the Administrator role in Wallarm Console in the EU Cloud or US Cloud
-
Access to
https://api.wallarm.com
if working with EU Wallarm Cloud or tohttps://us1.api.wallarm.com
if working with US Wallarm Cloud. Please ensure the access is not blocked by a firewall
Step 1: Update API port¶
Starting with version 4.0, the filtering node uploads data to the Cloud using the api.wallarm.com:443
(EU Cloud) and us1.api.wallarm.com:443
(US Cloud) API endpoints instead of api.wallarm.com:444
and us1.api.wallarm.com:444
.
If your server with the deployed node has a limited access to the external resources and the access is granted to each resource separately, then after upgrade to version 4.0 the synchronization between the filtering node and the Cloud will stop.
To restore the synchronization, in your configuration, change port 444
to 443
for API endpoint for each resource.
Step 2: Add new Wallarm repository¶
Delete the previous Wallarm repository address and add a repository with a new Wallarm node version packages. Please use the commands for the appropriate platform.
CentOS and Amazon Linux 2.0.2021x and lower
sudo yum remove wallarm-node-repo
sudo yum clean all
sudo rpm -i https://repo.wallarm.com/centos/wallarm-node/6/4.0/x86_64/wallarm-node-repo-4-0.el6.noarch.rpm
sudo yum remove wallarm-node-repo
sudo yum clean all
sudo rpm -i https://repo.wallarm.com/centos/wallarm-node/7/4.0/x86_64/wallarm-node-repo-4-0.el7.noarch.rpm
Support for CentOS 8.x has been deprecated
Support for CentOS 8.x has been deprecated. You can install the Wallarm node on the AlmaLinux, Rocky Linux or Oracle Linux 8.x operating system insted.
sudo yum remove wallarm-node-repo
sudo yum clean all
sudo rpm -i https://repo.wallarm.com/centos/wallarm-node/8/4.0/x86_64/wallarm-node-repo-4-0.el8.noarch.rpm
Debian and Ubuntu
-
Open the file with the Wallarm repository address in the installed text editor. In this instruction, vim is used.
sudo vim /etc/apt/sources.list.d/wallarm.list
-
Comment out or delete the previous repository address.
-
Add a new repository address:
deb http://repo.wallarm.com/debian/wallarm-node stretch/4.0/
deb http://repo.wallarm.com/debian/wallarm-node stretch/4.0/ deb http://repo.wallarm.com/debian/wallarm-node stretch-backports/4.0/
deb http://repo.wallarm.com/debian/wallarm-node buster/4.0/
deb http://repo.wallarm.com/debian/wallarm-node bullseye/4.0/
deb http://repo.wallarm.com/ubuntu/wallarm-node bionic/4.0/
deb http://repo.wallarm.com/ubuntu/wallarm-node focal/4.0/
Step 3: Upgrade the Tarantool packages¶
sudo apt update
sudo apt dist-upgrade
The error "signatures couldn't be verified"
If added GPG keys expired, the following error would be returned:
W: GPG error: http://repo.wallarm.com/ubuntu/wallarm-node focal/4.0/ Release:The following
signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
E: The repository 'http://repo.wallarm.com/ubuntu/wallarm-node focal/4.0/ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:
curl -fsSL https://repo.wallarm.com/wallarm.gpg | sudo apt-key add -
sudo apt update
sudo apt dist-upgrade
sudo apt update
sudo apt dist-upgrade
The error "signatures couldn't be verified"
If added GPG keys expired, the following error would be returned:
W: GPG error: http://repo.wallarm.com/ubuntu/wallarm-node focal/4.0/ Release:The following
signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
E: The repository 'http://repo.wallarm.com/ubuntu/wallarm-node focal/4.0/ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:
curl -fsSL https://repo.wallarm.com/wallarm.gpg | sudo apt-key add -
sudo apt update
sudo apt dist-upgrade
sudo yum update
sudo yum update
Step 4: Update the node type¶
The deployed postanalytics node 3.6 or lower has the deprecated regular type that is now replaced with the new Wallarm node type.
It is recommended to install the new node type instead of the deprecated one during migration to the version 4.0. The regular node type will be removed in future releases, please migrate before.
To replace the regular postanalytics node with the Wallarm node:
-
Make sure that your Wallarm account has the Administrator role enabled in Wallarm Console.
You can check mentioned settings by navigating to the user list in the EU Cloud or US Cloud.
-
Open Wallarm Console → Nodes in the EU Cloud or US Cloud and create the node of the Wallarm node type.
-
Copy the generated token.
-
Execute the
register-node
script to run the Wallarm node:sudo /usr/share/wallarm-common/register-node -t <NODE_TOKEN> --force --no-sync --no-sync-acl
sudo /usr/share/wallarm-common/register-node -t <NODE_TOKEN> -H us1.api.wallarm.com --force --no-sync --no-sync-acl
<NODE_TOKEN>
is the Wallarm node token.- The
--force
option forces rewriting of the Wallarm Cloud access credentials specified in the/etc/wallarm/node.yaml
file.
Step 5: Restart the postanalytics module¶
sudo systemctl restart wallarm-tarantool
sudo service wallarm-tarantool restart
sudo systemctl restart wallarm-tarantool
sudo systemctl restart wallarm-tarantool