Глава 29. Установка с использованием Ansible

Ansible часто используется для автоматизации установки и развёртывания в крупных масштабах. В этой главе описывается коллекция Ansible для PPEM от Postgres Pro, которая упрощает масштабирование установки PPEM.

Это коллекция позволяет автоматизировать процесс установки, который описан в Главе 28. Рекомендуется сначала прочесть соответствующую главу, чтобы понимать, что делает коллекция.

Коллекция включает в себя следующие компоненты:

  • Роль ppem_repo, которая настраивает репозиторий пакетов Postgres Pro, используемый в ходе установки.

    Обычно эта роль используется ролями ppem_manager и ppem_agent, но при необходимости может использоваться и отдельно.

  • Роль ppem_manager, которая устанавливает менеджер на указанные хосты.

    Она использует роль ppem_repo, чтобы настроить репозиторий пакетов, если он ещё не настроен.

  • Роль ppem_agent, которая устанавливает агенты на указанные хосты.

    Она использует роль ppem_repo, чтобы настроить репозиторий пакетов, если он ещё не настроен.

  • Плейбук ppem_manager.yml, основанный на роли ppem_manager.

  • Плейбук ppem_agent.yml, основанный на роли ppem_agent.

Процесс установки состоит из следующих этапов:

Chapter 29. Installation using Ansible

Ansible is often used for automating large-scale installations and deployments. This chapter describes the Postgres Pro Ansible collection for PPEM, which simplifies scaling PPEM installations.

This collection automates the installation procedure described in Chapter 28. It is recommended to read that chapter first to understand what the collection does.

The collection includes the following:

  • The ppem_repo role that configures the Postgres Pro package repository used during installation.

    Normally, this role is used by the ppem_manager and ppem_agent roles, but it can also be used as a standalone role, if necessary.

  • The ppem_manager role that installs the manager on the specified hosts.

    It uses the ppem_repo role to configure the package repository, if it is not configured yet.

  • The ppem_agent role that installs the agent on the specified hosts.

    It uses the ppem_repo role to configure the package repository, if it is not configured yet.

  • The ppem_manager.yml playbook based on the ppem_manager role.

  • The ppem_agent.yml playbook based on the ppem_agent role.

The installation process includes the following steps:

FAQ