Quick start with pigsty local sandbox with vagrant and virtualbox

TL;DR

To install pigsty, you have to prepare a node. Linux CentOS 7.8 x86_64 or equvilent. with sudo access.

curl -fsSL https://pigsty.cc/pigsty.tgz | gzip -d | tar -xC ~; cd ~/pigsty # download
make config     # configure
make install    # install

It may takes 10~15 minutes when using offline installation packages.

Sandbox

To run pigsty on your own laptop. Consider using Pigsty Sandbox. Which will create vm nodes for you based on virtualbox vm managed by vagrant.

make deps    # (once) Install MacOS deps with homebrew
make dns     # (once) Write static DNS
make start   # (once) Pull-up vm nodes and setup ssh access
make demo    #        Boot meta node same as Quick-Start

While virtualbox & sandbox are cross-platform softwares. I could only guarentee it works on MacOS. But you can always create virtual machine to do this.

Usage

You can access via IP:ports directly to access Pigsty services.

For example. Pigsty monitoring system listen on 3000. with default username and password set to admin.

Domain name are written to /etc/hosts when executing make dns, you can also access these service via ip:port directly.

service domain address description
Grafana http://pigsty 10.10.10.10:3000 Pigsty Monitoring System Home
Consul http://c.pigsty 10.10.10.10:8500 Consul admin UI, showing all nodes and services and their health status.
Prometheus http://p.pigsty 10.10.10.10:9090 TSDB main page, querying metrics, defining rules, and handling alarms
Alertmanager http://a.pigsty 10.10.10.10:9093 Browse, process, and block alarm messages
Haproxy http://h.pigsty 10.10.10.10:80 Browse the status of load balancers for traffic management and control
Yum Repo http://yum.pigsty 10.10.10.10:80 Local Yum repo

Replace 10.10.10.10 here to your own IP address when install on your own nodes.

Deploy

After Pigsty installation is complete, this machine will act as a meta-node for Pigsty. Users can initiate control from the meta-node to deploy a new PG cluster. Deploying a new database cluster is a three-step process.

  1. Bring the machine node used for deployment under management

    The current user can password-free ssh login to the target node from the current node with password-free sudo privileges.

  2. Define the database cluster (configuration file or GUI)

  3. Execute the database cluster deployment script

    If the user starts the sandbox with make start4`'' and make demo4`', just execute this command directly without configuration.

    . /pgsql.yml -l pg-test # Initialize the pg-test database cluster
    

For more information, please refer to [deploy](. /deploy/) chapter

FAQ

For frequently asked questions during installation and use, please refer to FAQ.

What’s next?


Last modified 2021-05-20: update en doc and faq (a607ae4)