Maxim Likhachev
6af6404c63
|
2 years ago | |
---|---|---|
files | 2 years ago | |
inventory/sample | 2 years ago | |
roles | 2 years ago | |
.ansible-lint | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago | |
add-users.yml | 2 years ago | |
ansible.cfg | 2 years ago | |
site.yml | 2 years ago |
README.md
Deploy a Greenplum Cluster
Description
This repository contains Ansible the following roles which could be used to provision Greenplum Database cluster:
- common configures the servers according to official reccomendations.
- ntpd installs ntp server with the Russian time pools.
- greenplum installs the main greenplum package.
- greenplum-segment creates necessary directory tree for proper segment node work.
- greenplum-master configures a master node and initializes the cluster.
- prometheus-exporter uses postgres_exporter to provide database metrics.
Requirements
- Ansible v2.9.x.
- GNU Make.
Hardware
It is possible to install Greenplum cluster on one server which will be used as master and segment.
Greenplum distributive and extensions
Greenplum installation package
Greenplum RPM files should be placed into files/rpm/ directory. A new Greenplum version can be downloaded from the official website (it requires registration).
Greenplum modules and extensions
All additional modules supported by default are listed on the Greenplum website.
By default this Ansible role installs and adds them to default database template the following extensions.
hstore
It provides a data type for storing sets of key/value pairs within a single PostgreSQL value.
PostGIS.
PostGIS is a spatial database extension for PostgreSQL that allows GIS (Geographic Information Systems) objects to be stored in the database. The Greenplum Database PostGIS extension includes support for GiST-based R-Tree spatial indexes and functions for analysis and processing of GIS objects.
Usage
0. Make an inventory
Sample inventory may be used as a sample cluster manifest. To make a new cluster just copy this directory to another one and adjust variables and hosts IP addresses:
$ copy -r inventory/sample inventory/new-cluster
$ vim inventory/new_cluster/hosts.ini
$ vim inventory/new_cluster/group_vars/all/all.yml
1. Make the SSH key for a new user and upload it to remote servers
$ ssh-keygen -C new_user@new_cluster -f inventory/new_cluster/files/ssh/new_user
$ make users PROVISION_USER=new_user
This command creates user on remote servers, configures sudoers file and uploads the SSH key. All further Ansible playbooks will be executed under this user.
2. Provision the Greenplum cluster
$ make provision CLUSTER=new_cluster SSH_USER=new_user SSH_KEY=inventory/new_cluster/files/ssh/new_user