5.6. 외부(고객 제공) PostgreSQL 데이터베이스 구성


자체 데이터베이스 인프라를 사용하도록 컨테이너화된 Ansible Automation Platform의 외부(고객 제공) PostgreSQL 데이터베이스를 설정합니다.

외부 데이터베이스를 설정하는 데 사용할 수 있는 두 가지 시나리오가 있습니다.

  1. PostgreSQL 관리자 인증 정보가 있는 외부 데이터베이스
  2. PostgreSQL 관리자 인증 정보가 없는 외부 데이터베이스
중요
  • Ansible Automation Platform에서 외부 데이터베이스를 사용하는 경우 해당 데이터베이스를 생성하고 지원해야 합니다. Ansible Automation Platform을 제거할 때 외부 데이터베이스를 지웁니다.
  • ICU를 지원하기 위해 Red Hat Ansible Automation Platform을 사용하려면 고객 제공(외부) 데이터베이스가 필요합니다.
  • 외부 데이터베이스를 구성하는 동안 외부 데이터베이스 범위를 확인해야 합니다. 자세한 내용은 Red Hat Ansible Automation Platform Database 지원 범위를 참조하십시오.

5.6.1. PostgreSQL 관리자 자격 증명을 사용하여 외부 데이터베이스 설정

PostgreSQL 관리자 인증 정보가 있는 경우 인벤토리 파일에 제공할 수 있으며 설치 프로그램은 각 구성 요소에 대해 PostgreSQL 사용자 및 데이터베이스를 생성합니다. PostgreSQL admin 계정에는 SUPERUSER 권한이 있어야 합니다.

프로세스

  • PostgreSQL 관리자 인증 정보를 구성하려면 [all:vars] 그룹의 인벤토리 파일에 다음 변수를 추가합니다.

    postgresql_admin_username=<set your own>
    postgresql_admin_password=<set your own>
    Copy to Clipboard Toggle word wrap

5.6.2. PostgreSQL 관리자 인증 정보가 없는 외부 데이터베이스 설정

PostgreSQL 관리자 인증 정보가 없는 경우 설치 프로그램을 실행하기 전에 각 구성 요소(플랫폼 게이트웨이, 자동화 컨트롤러, 자동화 허브, 이벤트 기반 Ansible)에 대해 PostgreSQL 사용자 및 데이터베이스를 생성해야 합니다.

프로세스

  1. SUPERUSER 권한이 있는 사용자로 PostgreSQL 호환 데이터베이스 서버에 연결합니다.

    # psql -h <hostname> -U <username> -p <port_number>
    Copy to Clipboard Toggle word wrap

    예를 들면 다음과 같습니다.

    # psql -h db.example.com -U superuser -p 5432
    Copy to Clipboard Toggle word wrap
  2. 암호를 사용하여 사용자를 생성하고 CREATEDB 역할이 사용자에게 할당되었는지 확인합니다. 자세한 내용은 데이터베이스 역할을 참조하십시오.

    CREATE USER <username> WITH PASSWORD <password> CREATEDB;
    Copy to Clipboard Toggle word wrap
  3. 데이터베이스를 생성하고 소유자로 생성한 사용자를 추가합니다.

    CREATE DATABASE <database_name> OWNER <username>;
    Copy to Clipboard Toggle word wrap
  4. 각 구성 요소에 대해 PostgreSQL 사용자 및 데이터베이스를 생성한 경우 [all:vars] 그룹의 인벤토리 파일에 제공할 수 있습니다.

    # Platform gateway
    gateway_pg_host=aap.example.org
    gateway_pg_database=<set your own>
    gateway_pg_username=<set your own>
    gateway_pg_password=<set your own>
    
    # Automation controller
    controller_pg_host=aap.example.org
    controller_pg_database=<set your own>
    controller_pg_username=<set your own>
    controller_pg_password=<set your own>
    
    # Automation hub
    hub_pg_host=aap.example.org
    hub_pg_database=<set your own>
    hub_pg_username=<set your own>
    hub_pg_password=<set your own>
    
    # Event-Driven Ansible
    eda_pg_host=aap.example.org
    eda_pg_database=<set your own>
    eda_pg_username=<set your own>
    eda_pg_password=<set your own>
    Copy to Clipboard Toggle word wrap

5.6.3. 자동화 허브 PostgreSQL 데이터베이스의 hstore 확장 활성화

데이터베이스 마이그레이션 스크립트는 hstore 필드를 사용하여 정보를 저장하므로 자동화 허브 PostgreSQL 데이터베이스에서 hstore 확장을 활성화해야 합니다.

이 프로세스는 Ansible Automation Platform 설치 프로그램 및 관리형 PostgreSQL 서버를 사용할 때 자동으로 수행됩니다.

PostgreSQL 데이터베이스가 외부인 경우 설치 전에 자동화 허브 PostgreSQL 데이터베이스에서 hstore 확장을 수동으로 활성화해야 합니다.

설치 전에 hstore 확장 기능을 활성화하지 않으면 데이터베이스 마이그레이션 중에 오류가 발생합니다.

프로세스

  1. PostgreSQL 서버(자동화 허브 데이터베이스)에서 확장을 사용할 수 있는지 확인합니다.

    $ psql -d <automation hub database> -c "SELECT * FROM pg_available_extensions WHERE name='hstore'"
    Copy to Clipboard Toggle word wrap
  2. 여기서 < automation hub database>의 기본값automationhub 입니다.

    hstore 를 사용할 수 있는 출력 예:

    name  | default_version | installed_version |comment
    ------+-----------------+-------------------+---------------------------------------------------
     hstore | 1.7           |                   | data type for storing sets of (key, value) pairs
    (1 row)
    Copy to Clipboard Toggle word wrap

    hstore 를 사용할 수 없는 출력 예:

     name | default_version | installed_version | comment
    ------+-----------------+-------------------+---------
    (0 rows)
    Copy to Clipboard Toggle word wrap
  3. RHEL 기반 서버에서 hstore 확장은 postgresql-contrib RPM 패키지에 포함되어 있으며 PostgreSQL 서버 RPM 패키지를 설치할 때 자동으로 설치되지 않습니다.

    RPM 패키지를 설치하려면 다음 명령을 사용하십시오.

    dnf install postgresql-contrib
    Copy to Clipboard Toggle word wrap
  4. 다음 명령을 사용하여 hstore PostgreSQL 확장을 자동화 허브 데이터베이스에 로드합니다.

    $ psql -d <automation hub database> -c "CREATE EXTENSION hstore;"
    Copy to Clipboard Toggle word wrap

    다음 출력에서 installed_version 필드에는 hstore 가 활성화되었음을 나타내는 hstore 확장이 나열됩니다.

    name | default_version | installed_version | comment
    -----+-----------------+-------------------+------------------------------------------------------
    hstore  |     1.7      |       1.7         | data type for storing sets of (key, value) pairs
    (1 row)
    Copy to Clipboard Toggle word wrap

5.6.4. 선택 사항: 외부 데이터베이스에 대한 상호 TLS(mTLS) 인증 구성

mTLS 인증은 기본적으로 비활성화되어 있습니다. mTLS 인증을 사용하여 각 구성 요소의 데이터베이스를 구성하려면 [all:vars] 그룹의 인벤토리 파일에 다음 변수를 추가하고 각 구성 요소에 다른 TLS 인증서 및 키가 있는지 확인합니다.

프로세스

  • [all:vars] 그룹의 인벤토리 파일에 다음 변수를 추가합니다.

    # Platform gateway
    gateway_pg_cert_auth=true
    gateway_pg_tls_cert=/path/to/gateway.cert
    gateway_pg_tls_key=/path/to/gateway.key
    gateway_pg_sslmode=verify-full
    
    # Automation controller
    controller_pg_cert_auth=true
    controller_pg_tls_cert=/path/to/awx.cert
    controller_pg_tls_key=/path/to/awx.key
    controller_pg_sslmode=verify-full
    
    # Automation hub
    hub_pg_cert_auth=true
    hub_pg_tls_cert=/path/to/pulp.cert
    hub_pg_tls_key=/path/to/pulp.key
    hub_pg_sslmode=verify-full
    
    # Event-Driven Ansible
    eda_pg_cert_auth=true
    eda_pg_tls_cert=/path/to/eda.cert
    eda_pg_tls_key=/path/to/eda.key
    eda_pg_sslmode=verify-full
    Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat