Skip to content

DevOps: add Ansible playbook for cluster deployment#1759

Draft
tuhaihe wants to merge 2 commits into
apache:mainfrom
tuhaihe:ansible-bash-deploy
Draft

DevOps: add Ansible playbook for cluster deployment#1759
tuhaihe wants to merge 2 commits into
apache:mainfrom
tuhaihe:ansible-bash-deploy

Conversation

@tuhaihe
Copy link
Copy Markdown
Member

@tuhaihe tuhaihe commented May 21, 2026

Introduces an Ansible-based automation for deploying Apache Cloudberry on bare-metal or virtual machines, covering the full deployment workflow from OS configuration to cluster initialization.

Key features:

  • Automates all pre-deployment OS tuning: SELinux, firewall, sysctl, PAM limits, THP, IPC, SSH thresholds, and chronyd
  • Dynamically calculates memory-dependent sysctl parameters per host: kernel.shmall/shmmax (via PAGE_SIZE and PHYS_PAGES), vm.overcommit_ratio (via gp_vmem formula), vm.dirty* (bytes mode for >64GB, ratio mode for <=64GB), and vm.min_free_kbytes (3% of MemTotal)
  • Installs RPM/DEB packages and configures N-N passwordless SSH via gpssh-exkeys
  • Initializes the cluster with gpinitsystem including standby coordinator (gpinitstandby with sync verification)
  • Supports variable cluster sizes via inventory/hosts

Files added:

  • ansible/site.yml main playbook
  • ansible/group_vars/all.yml deployment variables with inline documentation
  • ansible/inventory/hosts sample inventory for a 5-node cluster
  • ansible/ansible.cfg disables host key checking for first-run
  • ansible/README.md usage guide and prerequisites

Assisted-by: Claude Code

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


tuhaihe added 2 commits May 21, 2026 17:00
Introduces an Ansible-based automation for deploying Apache Cloudberry
on bare-metal or virtual machines, covering the full deployment workflow
from OS configuration to cluster initialization.

Key features:
- Automates all pre-deployment OS tuning: SELinux, firewall, sysctl,
  PAM limits, THP, IPC, SSH thresholds, and chronyd
- Dynamically calculates memory-dependent sysctl parameters per host:
  kernel.shmall/shmmax (via PAGE_SIZE and _PHYS_PAGES), vm.overcommit_ratio
  (via gp_vmem formula), vm.dirty_* (bytes mode for >64GB, ratio mode
  for <=64GB), and vm.min_free_kbytes (3% of MemTotal)
- Installs RPM/DEB packages and configures N-N passwordless SSH via
  gpssh-exkeys
- Initializes the cluster with gpinitsystem including standby coordinator
  (gpinitstandby with sync verification)
- Supports variable cluster sizes via inventory/hosts

Files added:
- ansible/site.yml         main playbook
- ansible/group_vars/all.yml  deployment variables with inline documentation
- ansible/inventory/hosts  sample inventory for a 5-node cluster
- ansible/ansible.cfg      disables host key checking for first-run
- ansible/README.md        usage guide and prerequisites

Assisted-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant