Skip to content

Categories: Tutorial

  • Deploy HA Citus Cluster

    In Tutorials

    TaskTutorialConceptPGSQL

    Citus is a PostgreSQL extension that transforms PostgreSQL into a distributed database, enabling horizontal scaling across multiple nodes to handle large amounts of data and queries. Patroni v3.0+ provides native high-availability support for Citus, …

    Citus is a PostgreSQL extension that transforms PostgreSQL into a distributed database, enabling horizontal scaling across multiple nodes to handle large amounts of data and queries. Patroni v3.0+ provides native high-availability support for Citus, …

  • Tutorials

    In Tutorials

    TutorialPGSQL

    This section provides step-by-step tutorials for common PostgreSQL tasks and scenarios. Citus Cluster: Deploy and manage Citus distributed clusters Disaster Drill: Emergency recovery when 2 of 3 nodes fail PG VIP: Configure L2 VIP for PostgreSQL …

    This section provides step-by-step tutorials for common PostgreSQL tasks and scenarios. Citus Cluster: Deploy and manage Citus distributed clusters Disaster Drill: Emergency recovery when 2 of 3 nodes fail PG VIP: Configure L2 VIP for PostgreSQL …

  • Quick Start

    In Module: KAFKA

    TutorialKAFKA

    This tutorial starts from a minimal single-node cluster, walking through topic creation and message read/write; it then deploys a separate, secured three-node cluster with application users, ACLs, quotas, and production topics; finally, it …

    This tutorial starts from a minimal single-node cluster, walking through topic creation and message read/write; it then deploys a separate, secured three-node cluster with application users, ACLs, quotas, and production topics; finally, it …

  • Install

    In Extensions

    TutorialPGSQL

    Pigsty uses the operating system’s package manager (yum/apt) to install extension packages. Related Parameters Two parameters are used to specify extensions to install: Parameter Purpose Default Behavior pg_packages Global common packages Ensure …

    Pigsty uses the operating system’s package manager (yum/apt) to install extension packages. Related Parameters Two parameters are used to specify extensions to install: Parameter Purpose Default Behavior pg_packages Global common packages Ensure …

  • Quick Start

    In Extensions

    TutorialPGSQL

    Using extensions in Pigsty requires four steps: Download, Install, Config, and Create. Download: Download extension packages to the local repository (the default local repository only guarantees the base kernel and pgsql-main package set) Install: …

    Using extensions in Pigsty requires four steps: Download, Install, Config, and Create. Download: Download extension packages to the local repository (the default local repository only guarantees the base kernel and pgsql-main package set) Install: …

  • Operations SOP Index

    In SOP

    TutorialReferencePIGSTYPGSQL

    Getting Started Path Order Question Entry 1 What modules does Pigsty include? Modular Architecture, PGSQL Architecture, PGSQL Cluster Model 2 How do I get it running first? Quick Start, Web UI, PostgreSQL Quick Start 3 How should I read the config …

    Getting Started Path Order Question Entry 1 What modules does Pigsty include? Modular Architecture, PGSQL Architecture, PGSQL Cluster Model 2 How do I get it running first? Quick Start, Web UI, PostgreSQL Quick Start 3 How should I read the config …

  • Security Considerations

    In Deployment

    TutorialPIGSTY

    Pigsty defaults target development, testing, and demonstrations on a trusted intranet. A production deployment must configure credentials, network boundaries, authentication, certificates, backup, and audit according to its threat model. See Security …

    Pigsty defaults target development, testing, and demonstrations on a trusted intranet. A production deployment must configure credentials, network boundaries, authentication, certificates, backup, and audit according to its threat model. See Security …

  • Terraform

    In Deployment

    TutorialPIGSTY

    Terraform is a popular “Infrastructure as Code” tool that you can use to create virtual machines on public clouds with one click. Pigsty currently provides example Terraform templates for Alibaba Cloud, AWS (global and China), Azure, GCP, Tencent …

    Terraform is a popular “Infrastructure as Code” tool that you can use to create virtual machines on public clouds with one click. Pigsty currently provides example Terraform templates for Alibaba Cloud, AWS (global and China), Azure, GCP, Tencent …

  • Vagrant

    In Deployment

    TutorialPIGSTY

    Vagrant is a popular local virtualization tool that creates local virtual machines in a declarative manner. Pigsty requires a Linux environment to run. You can use Vagrant to easily create Linux virtual machines locally for testing. The currently …

    Vagrant is a popular local virtualization tool that creates local virtual machines in a declarative manner. Pigsty requires a Linux environment to run. You can use Vagrant to easily create Linux virtual machines locally for testing. The currently …

  • Sandbox

    In Deployment

    TutorialPIGSTY

    Pigsty provides a standard 4-node sandbox environment for learning, testing, and feature demonstration. The sandbox uses fixed IP addresses and predefined identity identifiers, making it easy to reproduce various demo use cases. Description The …

    Pigsty provides a standard 4-node sandbox environment for learning, testing, and feature demonstration. The sandbox uses fixed IP addresses and predefined identity identifiers, making it easy to reproduce various demo use cases. Description The …

  • Setup Admin User and Privileges

    In Deployment

    TutorialPIGSTY

    Pigsty requires an OS admin user with passwordless SSH and Sudo privileges on all managed nodes. This user must be able to SSH to all managed nodes and execute sudo commands on them. User Typically use names like dba or admin, avoiding root and …

    Pigsty requires an OS admin user with passwordless SSH and Sudo privileges on all managed nodes. This user must be able to SSH to all managed nodes and execute sudo commands on them. User Typically use names like dba or admin, avoiding root and …

  • Planning Architecture and Nodes

    In Deployment

    TutorialPIGSTY

    Pigsty uses a modular architecture. You can combine modules like building blocks and express your intent through declarative configuration. Common Patterns Here are common deployment patterns for reference. Customize based on your requirements: …

    Pigsty uses a modular architecture. You can combine modules like building blocks and express your intent through declarative configuration. Common Patterns Here are common deployment patterns for reference. Customize based on your requirements: …

  • Prepare Resources for Serious Deployment

    In Deployment

    TutorialPIGSTY

    Pigsty runs on nodes (physical machines or VMs). This document covers the planning and preparation required for deployment. Node Pigsty currently runs on Linux kernel with x86_64 / aarch64 architecture. A “node” refers to an SSH accessible resource …

    Pigsty runs on nodes (physical machines or VMs). This document covers the planning and preparation required for deployment. Node Pigsty currently runs on Linux kernel with x86_64 / aarch64 architecture. A “node” refers to an SSH accessible resource …

  • Install Pigsty for Production

    In Deployment

    TutorialPIGSTY

    This is the Pigsty production multi-node deployment guide. For single-node Demo/Dev setups, see Getting Started. Summary Prepare nodes with SSH access following your architecture plan, install a compatible Linux OS, then execute with an admin user …

    This is the Pigsty production multi-node deployment guide. For single-node Demo/Dev setups, see Getting Started. Summary Prepare nodes with SSH access following your architecture plan, install a compatible Linux OS, then execute with an admin user …

  • Security Recommendations

    In Get Started

    TutorialPIGSTY

    The default configuration targets local demonstrations and development or testing on a trusted intranet. If other hosts can reach the deployment, complete at least three checks: credentials, network boundaries, and critical files. Production …

    The default configuration targets local demonstrations and development or testing on a trusted intranet. If other hosts can reach the deployment, complete at least three checks: credentials, network boundaries, and critical files. Production …

  • Slim Installation

    In Get Started

    TutorialPIGSTY

    If you only want HA PostgreSQL database cluster itself without monitoring, infra, etc., consider Slim Installation. Slim installation has no INFRA module, no monitoring, no local repo—just ETCD and PGSQL and partial NODE functionality. Slim …

    If you only want HA PostgreSQL database cluster itself without monitoring, infra, etc., consider Slim Installation. Slim installation has no INFRA module, no monitoring, no local repo—just ETCD and PGSQL and partial NODE functionality. Slim …

  • Offline Installation

    In Get Started

    TutorialPIGSTY

    Pigsty installs from Internet upstream by default, but some envs are isolated from the Internet. To address this, Pigsty supports offline installation using offline packages. Think of them as Linux-native Docker images. Overview Offline packages …

    Pigsty installs from Internet upstream by default, but some envs are isolated from the Internet. To address this, Pigsty supports offline installation using offline packages. Think of them as Linux-native Docker images. Overview Offline packages …

  • Run Playbooks with Ansible

    In Get Started

    TutorialPIGSTY

    Pigsty uses Ansible to manage clusters, a very popular large-scale/batch/automation ops tool in the SRE community. Ansible can use declarative approach for server configuration management. All module deployments are implemented through a series of …

    Pigsty uses Ansible to manage clusters, a very popular large-scale/batch/automation ops tool in the SRE community. Ansible can use declarative approach for server configuration management. All module deployments are implemented through a series of …

  • Customize Pigsty with Configuration

    In Get Started

    TutorialPIGSTY

    Besides using the configuration wizard to auto-generate configs, you can write Pigsty config files from scratch. This tutorial guides you through building a complex inventory step by step. If you define NODE, INFRA, ETCD, MINIO, and PGSQL in the …

    Besides using the configuration wizard to auto-generate configs, you can write Pigsty config files from scratch. This tutorial guides you through building a complex inventory step by step. If you define NODE, INFRA, ETCD, MINIO, and PGSQL in the …

  • Getting Started with PostgreSQL

    In Get Started

    TutorialPGSQL

    PostgreSQL (abbreviated as PG) is the world’s most advanced and popular open-source relational database. Use it to store and retrieve multi-modal data. This guide is for developers with basic Linux CLI experience but not very familiar with …

    PostgreSQL (abbreviated as PG) is the world’s most advanced and popular open-source relational database. Use it to store and retrieve multi-modal data. This guide is for developers with basic Linux CLI experience but not very familiar with …

  • Web Interface

    In Get Started

    TutorialPIGSTY

    After single-node installation, you’ll have the INFRA module installed on the current node, which includes an out-of-the-box Nginx web server. The default server configuration provides a WebUI graphical interface for displaying monitoring dashboards …

    After single-node installation, you’ll have the INFRA module installed on the current node, which includes an out-of-the-box Nginx web server. The default server configuration provides a WebUI graphical interface for displaying monitoring dashboards …

  • Docker Deployment

    In Get Started

    TutorialPIGSTY

    Pigsty is designed for native Linux, but can also run in Linux containers with systemd. If you don’t have native Linux (e.g., macOS or Windows), use Docker to spin up a local single-node Pigsty for testing. Quick Start Enter the docker/ dir in Pigsty …

    Pigsty is designed for native Linux, but can also run in Linux containers with systemd. If you don’t have native Linux (e.g., macOS or Windows), use Docker to spin up a local single-node Pigsty for testing. Quick Start Enter the docker/ dir in Pigsty …

  • Single-Node Installation

    In Get Started

    TutorialPIGSTY

    This is the Pigsty single-node install guide Single Node. For multi-node HA production deployment, refer to the Deployment docs. Pigsty single-node installation consists of three steps: Install, Configure, and Deploy. Summary Prepare a node with …

    This is the Pigsty single-node install guide Single Node. For multi-node HA production deployment, refer to the Deployment docs. Pigsty single-node installation consists of three steps: Install, Configure, and Deploy. Summary Prepare a node with …

  • Inventory

    In Infra as Code

    TutorialPIGSTY

    Every Pigsty deployment corresponds to an Inventory that describes key properties of the infrastructure and database clusters. Configuration File Pigsty uses Ansible YAML configuration format by default, with a single YAML configuration file …

    Every Pigsty deployment corresponds to an Inventory that describes key properties of the infrastructure and database clusters. Configuration File Pigsty uses Ansible YAML configuration format by default, with a single YAML configuration file …

  • Deployment

    In Deployment

    TutorialPIGSTY

    Unlike Getting Started, production Pigsty deployments require more Architecture Planning and Preparation. This chapter helps you understand the complete deployment process and provides best practices for production environments. Before deploying to …

    Unlike Getting Started, production Pigsty deployments require more Architecture Planning and Preparation. This chapter helps you understand the complete deployment process and provides best practices for production environments. Before deploying to …

  • Get Started

    In Get Started

    TutorialPIGSTY

    Pigsty uses a scalable architecture design, suitable for both large-scale production environments and single-node development/demo environments. This guide focuses on the latter. If you intend to learn about Pigsty, you can start with the Quick Start …

    Pigsty uses a scalable architecture design, suitable for both large-scale production environments and single-node development/demo environments. This guide focuses on the latter. If you intend to learn about Pigsty, you can start with the Quick Start …