El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Deploying PoWA for an RDS for PostgreSQL Instance

Updated on 2025-01-23 GMT+08:00

To remotely deploy PoWA on Huawei Cloud, There must be an ECS with PoWA-archivist, PoWA-collector, and PoWA-web installed on it. This section describes how to install PoWA-archivist, PoWA-collector, and PoWA-web.

Architecture

The remote deployment architecture is as follows:

Figure 1 Remote deployment architecture

Preparations

  • An RDS for PostgreSQL 12.6 instance has been created.
  • An ECS has been created and bound with an EIP. In this example, the ECS uses the CentOS 8.2 64-bit image.

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 this 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. 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 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__

Creating the PoWA Extension

  1. Log in to the powa database of the RDS for PostgreSQL instance as user root. (If the powa database does not exist, create it first.)
  2. Create the powa extension in the powa database.

    select control_extension('create', 'pg_stat_statements');
    select control_extension('create', 'btree_gist');
    select control_extension('create', 'powa');

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.

Installing Python 3.9.9

  1. Prepare the environment.

    Perform the following operations in sequence. Otherwise, Python 3.9.9 may fail to be installed (for example, SSL component dependency fails). As a result, PoWA-collector and PoWA-web fail to be installed.

    yum install readline* -y
    yum install zlib* -y
    yum install gcc-c++ -y
    yum install sqlite* -y
    yum install openssl-* -y
    yum install libffi* -y
  2. Install Python 3.9.9.
    1. Run the following commands as user root:
      mkdir env
      cd env
      wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz
      tar -xzvf Python-3.9.9.tgz
      cd Python-3.9.9
      ./configure --prefix=/usr/local/python3.9.9
      make && make install
    2. Create a soft link.
      ln -s /usr/local/python3.9.9/bin/python3.9 /usr/bin/python
      ln -s /usr/local/python3.9.9/bin/pip3.9 /usr/bin/pip
  3. Check whether the installation is successful.
    1. Verify the installation, especially the SSL function.
      [root@ecs-ad4d Python-3.9.9]# python
      Python 3.9.9 (main, Nov 25 2021, 12:36:32)
      [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      import ssl
      import urllib.request
      context = ssl._create_unverified_context()
      urllib.request.urlopen('https://www.example.com/',context=context).read()
    2. If any command output is displayed, the installation is successful. Run the following command to exit:
      quit()

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback