Tons of updates including erpnext, fusionauth, kong, elasticsearch, postgres-12, opennebula-5.10...
This commit is contained in:
30
db/postgresql-12/tasks/configure-linux.yml
Normal file
30
db/postgresql-12/tasks/configure-linux.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
# Enable Memory Overcommit /etc/sysctl.conf vm.overcommit_memory=2
|
||||
# https://www.postgresql.org/docs/12/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT
|
||||
# View with sysctl -a |grep overcommit
|
||||
- name: Enable Memory Overcommit /etc/sysctl.conf vm.overcommit_memory=2
|
||||
sysctl:
|
||||
name: vm.overcommit_memory
|
||||
value: '2'
|
||||
reload: yes
|
||||
state: present
|
||||
|
||||
# PostgreSQL docs recommend tweaking vm.nr_hugepages by using some math like so
|
||||
# head -1 /var/lib/postgresql/12/main/postmaster.pid
|
||||
# Gave me 14299 (this is the current process ID, can also us ps aux|grep postgres)
|
||||
# pmap 14299 | awk '/rw-s/ && /zero/ {print $2}'
|
||||
# Substiture your process ID of course
|
||||
# This gave me 145608K on a fresh install of postgres
|
||||
# grep ^Hugepagesize /proc/meminfo
|
||||
# This gave me 2048KB
|
||||
# Now take 145608 / 2048 = 71.09
|
||||
# Now set sysctl -w vm.nr_hugepages=71
|
||||
|
||||
# I however did not do this just yet. Will wait once Postgres is actually used
|
||||
# before tweaking this type of setting
|
||||
# - NO, not yet name: Tweak vm.nr_hugepages according to some precalculated math
|
||||
# sysctl:
|
||||
# name: vm.nr_hugepages
|
||||
# value: 2048
|
||||
# reload: yes
|
||||
# state: present
|
||||
36
db/postgresql-12/tasks/install-debian.yml
Normal file
36
db/postgresql-12/tasks/install-debian.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
# We use the official PostgreSQL repositories which contains many versions of PostgreSQL
|
||||
# Most of these versions will be newer than comes stock with debian
|
||||
|
||||
# Add GPG keys
|
||||
- name: Addding PostgreSQL sources GPG key
|
||||
apt_key: url='https://www.postgresql.org/media/keys/ACCC4CF8.asc' state=present
|
||||
|
||||
# Add PostgreSQL repositories for Debian 9
|
||||
- name: Adding PostgreSQL sources for Debian 9 Jessie
|
||||
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "9"
|
||||
|
||||
# Add PostgreSQL repositories for Debian 10
|
||||
- name: Adding PostgreSQL sources for Debian 10 Jessie
|
||||
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' state=present
|
||||
when: ansible_os_family == "Debian" and ansible_distribution_major_version == "10"
|
||||
|
||||
# Add PostgreSQL repositories for Ubuntu 16.04
|
||||
- name: Adding PostgreSQL sources for Ubuntu 16.04
|
||||
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' state=present
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "16.04"
|
||||
|
||||
# Add PostgreSQL repositories for Ubuntu 19.04
|
||||
- name: Adding PostgreSQL sources for Ubuntu 18.04
|
||||
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' state=present
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "18.04"
|
||||
|
||||
# Install PostgreSQL 12
|
||||
- name: Installing PostgreSQL 12
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- postgresql-12
|
||||
- python-psycopg2 # Required for ansible postgres manipulation
|
||||
8
db/postgresql-12/tasks/main.yml
Normal file
8
db/postgresql-12/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# Configure Linux (agnostic)
|
||||
- include_tasks: configure-linux.yml
|
||||
|
||||
# Install PostgreSQL 11 - Debian All Versions
|
||||
- include_tasks: install-debian.yml
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
Reference in New Issue
Block a user