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.
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
- 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
- Decompress the downloaded REL_4_1_2.tar.gz package.
- Install PoWA-archivist to the decompressed directory.
Installing PoWA-collector and PoWA-web
- Switch to the RDS for PostgreSQL database installation user. Take user postgres as an example.
su - postgres
- Install PoWA-collector and PoWA-web. psycopg2 is mandatory for installing them.
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot