Updated on 2023-07-18 GMT+08:00

Introducing Remote Deployment

An ECS is required for remote deployment on Huawei Cloud. The RDS for PostgreSQL database, PoWA-archivist, PoWA-collector, and PoWA-web need to be installed on the ECS.

This section describes how to install the PoWA-archivist, PoWA-collector, and PoWA-web.

The following figure shows the remote deployment architecture.

Figure 1 Remote deployment architecture

Preparing an ECS

Create an ECS on Huawei Cloud and configure an EIP for it. The ECS configured with the CentOS 8.2 64-bit image is used as an example. PostgreSQL 12.6 has been installed on the ECS.

Installing Python3

PoWA-collector and PoWA-web must be installed in a Python3 environment. You can use pip3 to install them to facilitate the installation. In the example, Python 3.6.8 is installed on the ECS by default. The latest PoWA version fails to be installed. For details about how to install the latest version, see Installing Python 3.9.9.

Installing PoWA-archivist

  1. After PostgreSQL 12.6 is installed, run the wget command to obtain the PoWA-archivist source code.

    wget https://github.com/powa-team/powa-archivist/archive/refs/tags/REL_4_1_2.tar.gz

  2. Decompress the downloaded REL_4_1_2.tar.gz package.
  3. Install PoWA-archivist to the decompressed directory.

    make && make install

Installing PoWA-collector and PoWA-web

  1. Switch to the RDS for PostgreSQL database installation user. Take user postgres as an example.

    su - postgres

  2. Install PoWA-collector and PoWA-web. psycopg2 is mandatory for installing them.

    pip install psycopg2

    pip install powa-collector

    pip install powa-web

After the installation is complete, check the following path tree. If the following information is displayed, the PoWA-collector and PoWA-web have been installed.

/home/postgres/.local/bin
├── powa-collector.py
├── powa-web
└── __pycache__

FAQs

Q: What should I do if the error message "python setup.py build_ext --pg-config /path/to/pg_config build" is displayed when the pip install psycopg2 command is executed?

A: You need to add the bin and lib paths of RDS for PostgreSQL to environment variables and run the pip install psycopg2 command.