Pigsty安装详情

完成4节点沙箱环境,下载,配置,安装的完整操作记录

prepare

请参考 拉起沙箱环境过程记录 拉起本地4节点虚拟机沙箱,当然您也可以用其他办法创建几台虚拟机,或直接使用现有的物理机乃至云虚拟机进行部署。

登录管理节点,并确保可以ssh sudo其他节点:

  1. $ ssh meta
  2. [vagrant@meta ~]$ ssh 10.10.10.10 sudo hostname -a
  3. Warning: Permanently added '10.10.10.10' (ECDSA) to the list of known hosts.
  4. meta
  5. [vagrant@meta ~]$ ssh 10.10.10.11 sudo hostname -a
  6. Warning: Permanently added '10.10.10.11' (ECDSA) to the list of known hosts.
  7. node-1
  8. [vagrant@meta ~]$ ssh 10.10.10.12 sudo hostname -a
  9. Warning: Permanently added '10.10.10.12' (ECDSA) to the list of known hosts.
  10. node-2
  11. [vagrant@meta ~]$ ssh 10.10.10.13 sudo hostname -a
  12. Warning: Permanently added '10.10.10.13' (ECDSA) to the list of known hosts.
  13. node-3

download

下载最新的Pigsty源码包至本地,大小约1MB。

  1. [vagrant@meta ~]$ bash -c "$(curl -fsSL http://download.pigsty.cc/get)"
  2. [INFO] download pigsty.tgz from http://download.pigsty.cc/v1.5.1/pigsty.tgz
  3. % Total % Received % Xferd Average Speed Time Time Time Current
  4. Dload Upload Total Spent Left Speed
  5. 100 897k 100 897k 0 0 1195k 0 --:--:-- --:--:-- --:--:-- 1195k
  6. [INFO] extract /tmp/pigsty.tgz to /home/vagrant/pigsty
  7. [HINT] proceed with cd ~/pigsty; ./configure; ./infra.yml;

使用源码包中自带的download脚本,下载离线软件包(可选)

  1. [vagrant@meta ~]$ cd ./pigsty
  2. [vagrant@meta pigsty]$ ./download pkg
  3. [ OK ] download from CDN http://download.pigsty.cc/v1.5.1/pkg.tgz to /tmp/pkg.tgz
  4. % Total % Received % Xferd Average Speed Time Time Time Current
  5. Dload Upload Total Spent Left Speed
  6. 100 1075M 100 1075M 0 0 10.6M 0 0:01:40 0:01:40 --:--:-- 10.0M
  7. [ OK ] repo = extract from /tmp/pkg.tgz
  8. [ OK ] repo file = /etc/yum.repos.d/pigsty-local.repo

configure

使用标准的 demo 模板进行 配置过程

  1. [vagrant@meta pigsty]$ ./configure -m demo
  2. [ OK ] cache = download from internet
  3. configure pigsty v1.5.1 begin
  4. [ OK ] kernel = Linux
  5. [ OK ] machine = x86_64
  6. [ OK ] release = 7.8.2003 , perfect
  7. [ OK ] sudo = vagrant ok
  8. [ OK ] ssh = vagrant@127.0.0.1 ok
  9. [WARN] Multiple IP address candidates found:
  10. (1) 10.0.2.15 inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic eth0
  11. (2) 10.10.10.10 inet 10.10.10.10/24 brd 10.10.10.255 scope global noprefixroute eth1
  12. [ OK ] primary_ip = 10.10.10.10 (from demo)
  13. [ OK ] admin = vagrant@10.10.10.10 ok
  14. [ OK ] mode = demo (manually set)
  15. [ OK ] spec = mini (cpu = 2)
  16. [ OK ] config = demo @ 10.10.10.10
  17. [ OK ] cache = /tmp/pkg.tgz exists
  18. [ OK ] repo = /www/pigsty ok
  19. [ OK ] repo file = /etc/yum.repos.d/pigsty-local.repo
  20. [ OK ] utils = install from local file repo
  21. [ OK ] ansible = ansible 2.9.27
  22. configure pigsty done. Use 'make install' to proceed

install

使用 make install 在本机上完成安装,这实际上是执行了 infra.yml 剧本

make install

  1. [vagrant@meta pigsty]$ make install
  2. ./infra.yml
  3. PLAY [Node Identity] *********************************************************************************
  4. TASK [Overwrite node_cluster] ************************************************************************
  5. ok: [10.10.10.10]
  6. TASK [Overwrite nodename] ****************************************************************************
  7. ok: [10.10.10.10]
  8. TASK [debug] *****************************************************************************************
  9. ok: [10.10.10.10] => {
  10. "msg": "ins=pg-meta-1 cls=pg-meta"
  11. }
  12. PLAY [Infra Bootstrap] *******************************************************************************
  13. TASK [environ : Create pigsty resource dirs on /etc/pigsty] ******************************************
  14. changed: [10.10.10.10] => (item=/etc/pigsty)
  15. changed: [10.10.10.10] => (item=/etc/pigsty/playbooks)
  16. changed: [10.10.10.10] => (item=/etc/pigsty/dashboards)
  17. changed: [10.10.10.10] => (item=/etc/pigsty/datasources)
  18. TASK [environ : Create patronictl resource] **********************************************************
  19. changed: [10.10.10.10]
  20. TASK [environ : Get current username] ****************************************************************
  21. ok: [10.10.10.10]
  22. TASK [environ : Create admin user ssh key pair if not exists] ****************************************
  23. ok: [10.10.10.10]
  24. TASK [environ : Write default user credential to pgpass] *********************************************
  25. changed: [10.10.10.10] => (item=*:*:*:replicator:DBUser.Replicator)
  26. changed: [10.10.10.10] => (item=*:*:*:dbuser_monitor:DBUser.Monitor)
  27. changed: [10.10.10.10] => (item=*:*:*:dbuser_dba:DBUser.DBA)
  28. TASK [environ : Write default meta service to pg_service] ********************************************
  29. changed: [10.10.10.10]
  30. TASK [environ : Write servers.json to home dir] ******************************************************
  31. changed: [10.10.10.10]
  32. TASK [Set environment for admin user] ****************************************************************
  33. changed: [10.10.10.10]
  34. TASK [Enable environment for admin user] *************************************************************
  35. changed: [10.10.10.10]
  36. TASK [Create local repo directory] *******************************************************************
  37. ok: [10.10.10.10]
  38. TASK [Backup & remove existing repos] ****************************************************************
  39. changed: [10.10.10.10]
  40. TASK [Add required upstream repos] *******************************************************************
  41. [WARNING]: Using a variable for a task's 'args' is unsafe in some situations (see
  42. https://docs.ansible.com/ansible/devel/reference_appendices/faq.html#argsplat-unsafe)
  43. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Base', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/os/$basearch/', u'http://mirror.centos.org/centos/$releasever/os/$basearch/'], u'name': u'base'})
  44. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Updates', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/', u'http://mirror.centos.org/centos/$releasever/updates/$basearch/'], u'name': u'updates'})
  45. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Extras', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/', u'http://mirror.centos.org/centos/$releasever/extras/$basearch/'], u'name': u'extras'})
  46. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS $releasever - epel', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/epel/$releasever/$basearch', u'http://mirrors.aliyun.com/epel/$releasever/$basearch', u'http://download.fedoraproject.org/pub/epel/$releasever/$basearch'], u'name': u'epel'})
  47. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'enabled': True, u'description': u'Grafana', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm', u'https://packages.grafana.com/oss/rpm'], u'name': u'grafana'})
  48. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'Prometheus and exporters', u'baseurl': u'https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch', u'name': u'prometheus'})
  49. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'PostgreSQL common RPMs for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'http://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/common/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg-common'})
  50. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'PostgreSQL 14 for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/14/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg14'})
  51. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'TimescaleDB for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://packagecloud.io/timescale/timescaledb/el/7/$basearch'], u'name': u'timescaledb'})
  52. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/sclo/', u'name': u'centos-sclo'})
  53. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo rh', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/rh/', u'name': u'centos-sclo-rh'})
  54. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'nginx', u'baseurl': u'http://nginx.org/packages/centos/$releasever/$basearch/', u'description': u'Nginx Official Yum Repo'})
  55. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'harbottle', u'baseurl': u'https://download.copr.fedorainfracloud.org/results/harbottle/main/epel-$releasever-$basearch/', u'description': u'Copr repo for main owned by harbottle'})
  56. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'pg_probackup', u'baseurl': u'https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/centos-$releasever-$basearch', u'description': u'PG_PROBACKUP Centos packages for PostgresPro Standard and Enterprise - $basearch'})
  57. changed: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'docker-ce', u'baseurl': [u'https://mirrors.aliyun.com/docker-ce/linux/centos/$releasever/$basearch/stable', u'https://download.docker.com/linux/centos/$releasever/$basearch/stable'], u'description': u'Docker CE Stable - $basearch'})
  58. TASK [Check repo pkgs cache exists] ******************************************************************
  59. ok: [10.10.10.10]
  60. TASK [Set fact whether repo_exists] ******************************************************************
  61. ok: [10.10.10.10]
  62. TASK [Move upstream repo to backup] ******************************************************************
  63. changed: [10.10.10.10]
  64. TASK [Add local file system repos] *******************************************************************
  65. changed: [10.10.10.10]
  66. TASK [repo : Remake yum cache if not exists] *********************************************************
  67. changed: [10.10.10.10]
  68. TASK [Install repo bootstrap packages] ***************************************************************
  69. changed: [10.10.10.10]
  70. TASK [Render repo nginx server files] ****************************************************************
  71. changed: [10.10.10.10] => (item={u'dest': u'/etc/nginx/nginx.conf', u'src': u'nginx.conf.j2'})
  72. changed: [10.10.10.10] => (item={u'dest': u'/etc/nginx/conf.d/default.conf', u'src': u'default.conf.j2'})
  73. changed: [10.10.10.10] => (item={u'dest': u'/www/index.html', u'src': u'index.html.j2'})
  74. changed: [10.10.10.10] => (item={u'dest': u'/www/pigsty.repo', u'src': u'local.repo.j2'})
  75. TASK [Disable selinux for repo server] ***************************************************************
  76. [WARNING]: SELinux state temporarily changed from 'enforcing' to 'permissive'. State change will take
  77. effect next reboot.
  78. changed: [10.10.10.10]
  79. TASK [Launch repo nginx server] **********************************************************************
  80. changed: [10.10.10.10]
  81. TASK [Waits repo server online] **********************************************************************
  82. ok: [10.10.10.10]
  83. TASK [Download repo packages] ************************************************************************
  84. skipping: [10.10.10.10] => (item=epel-release nginx wget yum-utils yum createrepo sshpass zip unzip)
  85. skipping: [10.10.10.10] => (item=ntp chrony uuid lz4 bzip2 nc pv jq vim-enhanced make patch bash lsof wget git tuned perf ftp lrzsz rsync)
  86. skipping: [10.10.10.10] => (item=numactl grubby sysstat dstat iotop bind-utils net-tools tcpdump socat ipvsadm telnet ca-certificates keepalived)
  87. skipping: [10.10.10.10] => (item=readline zlib openssl openssh-clients libyaml libxml2 libxslt libevent perl perl-devel perl-ExtUtils*)
  88. skipping: [10.10.10.10] => (item=readline-devel zlib-devel uuid-devel libuuid-devel libxml2-devel libxslt-devel openssl-devel libicu-devel)
  89. skipping: [10.10.10.10] => (item=grafana prometheus2 pushgateway alertmanager mtail consul consul_exporter consul-template etcd dnsmasq)
  90. skipping: [10.10.10.10] => (item=node_exporter nginx_exporter blackbox_exporter redis_exporter)
  91. skipping: [10.10.10.10] => (item=ansible python python-pip python-psycopg2)
  92. skipping: [10.10.10.10] => (item=python3 python3-psycopg2 python36-requests python3-etcd python3-consul python36-urllib3 python36-idna python36-pyOpenSSL python36-cryptography)
  93. skipping: [10.10.10.10] => (item=patroni patroni-consul patroni-etcd pgbouncer pg_cli pgbadger pg_activity tail_n_mail)
  94. skipping: [10.10.10.10] => (item=pgcenter boxinfo check_postgres emaj pgbconsole pg_bloat_check pgquarrel barman barman-cli pgloader pgFormatter pitrery pspg pgxnclient PyGreSQL)
  95. skipping: [10.10.10.10] => (item=postgresql14* postgis32_14* citus_14* pglogical_14* timescaledb-2-postgresql-14 pg_repack_14 wal2json_14)
  96. skipping: [10.10.10.10] => (item=pg_qualstats_14 pg_stat_kcache_14 pg_stat_monitor_14 pg_top_14 pg_track_settings_14 pg_wait_sampling_14 pg_probackup-std-14)
  97. skipping: [10.10.10.10] => (item=pg_statement_rollback_14 system_stats_14 plproxy_14 plsh_14 pldebugger_14 plpgsql_check_14 pgmemcache_14)
  98. skipping: [10.10.10.10] => (item=mysql_fdw_14 ogr_fdw_14 tds_fdw_14 sqlite_fdw_14 firebird_fdw_14 hdfs_fdw_14 mongo_fdw_14 osm_fdw_14 pgbouncer_fdw_14)
  99. skipping: [10.10.10.10] => (item=hypopg_14 geoip_14 rum_14 hll_14 ip4r_14 prefix_14 pguri_14 tdigest_14 topn_14 periods_14)
  100. skipping: [10.10.10.10] => (item=bgw_replstatus_14 count_distinct_14 credcheck_14 ddlx_14 extra_window_functions_14 logerrors_14 mysqlcompat_14 orafce_14)
  101. skipping: [10.10.10.10] => (item=repmgr_14 pg_auth_mon_14 pg_auto_failover_14 pg_background_14 pg_bulkload_14 pg_catcheck_14 pg_comparator_14)
  102. skipping: [10.10.10.10] => (item=pg_cron_14 pg_fkpart_14 pg_jobmon_14 pg_partman_14 pg_permissions_14 pg_prioritize_14 pgagent_14)
  103. skipping: [10.10.10.10] => (item=pgaudit16_14 pgauditlogtofile_14 pgcryptokey_14 pgexportdoc_14 pgfincore_14 pgimportdoc_14 powa_14 pgmp_14 pgq_14)
  104. skipping: [10.10.10.10] => (item=pgquarrel-0.7.0-1 pgsql_tweaks_14 pgtap_14 pgtt_14 postgresql-unit_14 postgresql_anonymizer_14 postgresql_faker_14)
  105. skipping: [10.10.10.10] => (item=safeupdate_14 semver_14 set_user_14 sslutils_14 table_version_14)
  106. skipping: [10.10.10.10] => (item=clang coreutils diffutils rpm-build rpm-devel rpmlint rpmdevtools bison flex)
  107. skipping: [10.10.10.10] => (item=docker-ce docker-compose kubelet kubectl kubeadm kubernetes-cni helm)
  108. TASK [repo : Download web url packages] **************************************************************
  109. skipping: [10.10.10.10] => (item=https://github.com/Vonng/loki-rpm/releases/download/v2.5.0/loki-2.5.0.x86_64.rpm)
  110. skipping: [10.10.10.10] => (item=https://github.com/Vonng/loki-rpm/releases/download/v2.5.0/promtail-2.5.0.x86_64.rpm)
  111. skipping: [10.10.10.10] => (item=https://github.com/Vonng/pg_exporter/releases/download/v0.5.0/pg_exporter-0.5.0.x86_64.rpm)
  112. skipping: [10.10.10.10] => (item=https://github.com/cybertec-postgresql/vip-manager/releases/download/v1.0.2/vip-manager-1.0.2-1.x86_64.rpm)
  113. skipping: [10.10.10.10] => (item=https://github.com/Vonng/haproxy-rpm/releases/download/v2.5.7/haproxy-2.5.7-1.el7.x86_64.rpm)
  114. skipping: [10.10.10.10] => (item=https://github.com/Vonng/pigsty-pkg/releases/download/misc/redis-6.2.7-1.el7.remi.x86_64.rpm)
  115. skipping: [10.10.10.10] => (item=https://github.com/dalibo/pev2/releases/download/v0.24.0/pev2.tar.gz)
  116. skipping: [10.10.10.10] => (item=https://github.com/Vonng/pigsty-pkg/releases/download/misc/polysh-0.4-1.noarch.rpm)
  117. TASK [Download repo pkg dependencies] ****************************************************************
  118. skipping: [10.10.10.10] => (item=epel-release nginx wget yum-utils yum createrepo sshpass zip unzip)
  119. skipping: [10.10.10.10] => (item=ntp chrony uuid lz4 bzip2 nc pv jq vim-enhanced make patch bash lsof wget git tuned perf ftp lrzsz rsync)
  120. skipping: [10.10.10.10] => (item=numactl grubby sysstat dstat iotop bind-utils net-tools tcpdump socat ipvsadm telnet ca-certificates keepalived)
  121. skipping: [10.10.10.10] => (item=readline zlib openssl openssh-clients libyaml libxml2 libxslt libevent perl perl-devel perl-ExtUtils*)
  122. skipping: [10.10.10.10] => (item=readline-devel zlib-devel uuid-devel libuuid-devel libxml2-devel libxslt-devel openssl-devel libicu-devel)
  123. skipping: [10.10.10.10] => (item=grafana prometheus2 pushgateway alertmanager mtail consul consul_exporter consul-template etcd dnsmasq)
  124. skipping: [10.10.10.10] => (item=node_exporter nginx_exporter blackbox_exporter redis_exporter)
  125. skipping: [10.10.10.10] => (item=ansible python python-pip python-psycopg2)
  126. skipping: [10.10.10.10] => (item=python3 python3-psycopg2 python36-requests python3-etcd python3-consul python36-urllib3 python36-idna python36-pyOpenSSL python36-cryptography)
  127. skipping: [10.10.10.10] => (item=patroni patroni-consul patroni-etcd pgbouncer pg_cli pgbadger pg_activity tail_n_mail)
  128. skipping: [10.10.10.10] => (item=pgcenter boxinfo check_postgres emaj pgbconsole pg_bloat_check pgquarrel barman barman-cli pgloader pgFormatter pitrery pspg pgxnclient PyGreSQL)
  129. skipping: [10.10.10.10] => (item=postgresql14* postgis32_14* citus_14* pglogical_14* timescaledb-2-postgresql-14 pg_repack_14 wal2json_14)
  130. skipping: [10.10.10.10] => (item=pg_qualstats_14 pg_stat_kcache_14 pg_stat_monitor_14 pg_top_14 pg_track_settings_14 pg_wait_sampling_14 pg_probackup-std-14)
  131. skipping: [10.10.10.10] => (item=pg_statement_rollback_14 system_stats_14 plproxy_14 plsh_14 pldebugger_14 plpgsql_check_14 pgmemcache_14)
  132. skipping: [10.10.10.10] => (item=mysql_fdw_14 ogr_fdw_14 tds_fdw_14 sqlite_fdw_14 firebird_fdw_14 hdfs_fdw_14 mongo_fdw_14 osm_fdw_14 pgbouncer_fdw_14)
  133. skipping: [10.10.10.10] => (item=hypopg_14 geoip_14 rum_14 hll_14 ip4r_14 prefix_14 pguri_14 tdigest_14 topn_14 periods_14)
  134. skipping: [10.10.10.10] => (item=bgw_replstatus_14 count_distinct_14 credcheck_14 ddlx_14 extra_window_functions_14 logerrors_14 mysqlcompat_14 orafce_14)
  135. skipping: [10.10.10.10] => (item=repmgr_14 pg_auth_mon_14 pg_auto_failover_14 pg_background_14 pg_bulkload_14 pg_catcheck_14 pg_comparator_14)
  136. skipping: [10.10.10.10] => (item=pg_cron_14 pg_fkpart_14 pg_jobmon_14 pg_partman_14 pg_permissions_14 pg_prioritize_14 pgagent_14)
  137. skipping: [10.10.10.10] => (item=pgaudit16_14 pgauditlogtofile_14 pgcryptokey_14 pgexportdoc_14 pgfincore_14 pgimportdoc_14 powa_14 pgmp_14 pgq_14)
  138. skipping: [10.10.10.10] => (item=pgquarrel-0.7.0-1 pgsql_tweaks_14 pgtap_14 pgtt_14 postgresql-unit_14 postgresql_anonymizer_14 postgresql_faker_14)
  139. skipping: [10.10.10.10] => (item=safeupdate_14 semver_14 set_user_14 sslutils_14 table_version_14)
  140. skipping: [10.10.10.10] => (item=clang coreutils diffutils rpm-build rpm-devel rpmlint rpmdevtools bison flex)
  141. skipping: [10.10.10.10] => (item=docker-ce docker-compose kubelet kubectl kubeadm kubernetes-cni helm)
  142. TASK [Create local repo] *****************************************************************************
  143. skipping: [10.10.10.10]
  144. PLAY [Meta Node Init] ********************************************************************************
  145. TASK [Set hostname from nodename] ********************************************************************
  146. changed: [10.10.10.10]
  147. TASK [node : Fetch hostname from server] *************************************************************
  148. skipping: [10.10.10.10]
  149. TASK [node : Exchange hostname among servers] ********************************************************
  150. skipping: [10.10.10.10]
  151. TASK [node : Write static dns records to /etc/hosts] *************************************************
  152. changed: [10.10.10.10] => (item=10.10.10.10 meta pigsty p.pigsty g.pigsty a.pigsty c.pigsty l.pigsty)
  153. changed: [10.10.10.10] => (item=10.10.10.10 api.pigsty adm.pigsty cli.pigsty ddl.pigsty lab.pigsty git.pigsty sss.pigsty)
  154. TASK [node : Write extra static dns records to /etc/hosts] *******************************************
  155. TASK [node : Get old nameservers] ********************************************************************
  156. changed: [10.10.10.10]
  157. TASK [node : Write tmp resolv file] ******************************************************************
  158. changed: [10.10.10.10]
  159. TASK [node : Write resolv options] *******************************************************************
  160. changed: [10.10.10.10] => (item=options single-request-reopen timeout:1 rotate)
  161. changed: [10.10.10.10] => (item=domain service.consul)
  162. TASK [node : Write additional nameservers] ***********************************************************
  163. changed: [10.10.10.10] => (item=10.10.10.10)
  164. TASK [node : Append existing nameservers] ************************************************************
  165. changed: [10.10.10.10] => (item=10.0.2.3)
  166. TASK [node : Swap resolv.conf] ***********************************************************************
  167. changed: [10.10.10.10]
  168. TASK [node : Node configure disable firewall] ********************************************************
  169. ok: [10.10.10.10]
  170. TASK [node : Node disable selinux by default] ********************************************************
  171. [WARNING]: SELinux state change will take effect next reboot
  172. ok: [10.10.10.10]
  173. TASK [node : Backup existing repos] ******************************************************************
  174. changed: [10.10.10.10]
  175. TASK [node : Install upstream repo] ******************************************************************
  176. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Base', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/os/$basearch/', u'http://mirror.centos.org/centos/$releasever/os/$basearch/'], u'name': u'base'})
  177. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Updates', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/', u'http://mirror.centos.org/centos/$releasever/updates/$basearch/'], u'name': u'updates'})
  178. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Extras', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/', u'http://mirror.centos.org/centos/$releasever/extras/$basearch/'], u'name': u'extras'})
  179. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS $releasever - epel', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/epel/$releasever/$basearch', u'http://mirrors.aliyun.com/epel/$releasever/$basearch', u'http://download.fedoraproject.org/pub/epel/$releasever/$basearch'], u'name': u'epel'})
  180. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'enabled': True, u'description': u'Grafana', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm', u'https://packages.grafana.com/oss/rpm'], u'name': u'grafana'})
  181. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'Prometheus and exporters', u'baseurl': u'https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch', u'name': u'prometheus'})
  182. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'PostgreSQL common RPMs for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'http://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/common/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg-common'})
  183. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'PostgreSQL 14 for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/14/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg14'})
  184. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'TimescaleDB for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://packagecloud.io/timescale/timescaledb/el/7/$basearch'], u'name': u'timescaledb'})
  185. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/sclo/', u'name': u'centos-sclo'})
  186. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo rh', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/rh/', u'name': u'centos-sclo-rh'})
  187. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'nginx', u'baseurl': u'http://nginx.org/packages/centos/$releasever/$basearch/', u'description': u'Nginx Official Yum Repo'})
  188. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'harbottle', u'baseurl': u'https://download.copr.fedorainfracloud.org/results/harbottle/main/epel-$releasever-$basearch/', u'description': u'Copr repo for main owned by harbottle'})
  189. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'pg_probackup', u'baseurl': u'https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/centos-$releasever-$basearch', u'description': u'PG_PROBACKUP Centos packages for PostgresPro Standard and Enterprise - $basearch'})
  190. skipping: [10.10.10.10] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'docker-ce', u'baseurl': [u'https://mirrors.aliyun.com/docker-ce/linux/centos/$releasever/$basearch/stable', u'https://download.docker.com/linux/centos/$releasever/$basearch/stable'], u'description': u'Docker CE Stable - $basearch'})
  191. TASK [node : Install local repo] *********************************************************************
  192. changed: [10.10.10.10] => (item=http://pigsty/pigsty.repo)
  193. TASK [Install node basic packages] *******************************************************************
  194. skipping: [10.10.10.10] => (item=[])
  195. TASK [Install node extra packages] *******************************************************************
  196. TASK [node : Install meta specific packages] *********************************************************
  197. skipping: [10.10.10.10] => (item=[])
  198. TASK [Install node basic packages] *******************************************************************
  199. changed: [10.10.10.10] => (item=[u'wget,sshpass,ntp,chrony,tuned,uuid,lz4,make,patch,bash,lsof,wget,unzip,git,ftp,vim-minimal,ca-certificates', u'numactl,grubby,sysstat,dstat,iotop,bind-utils,net-tools,tcpdump,socat,ipvsadm,telnet,tuned,nc,pv,jq,perf', u'readline,zlib,openssl,openssl-libs,openssh-clients,python3,python36-requests,node_exporter,consul,etcd,promtail'])
  200. TASK [Install node extra packages] *******************************************************************
  201. TASK [node : Install meta specific packages] *********************************************************
  202. changed: [10.10.10.10] => (item=[u'grafana,prometheus2,alertmanager,loki,nginx_exporter,blackbox_exporter,pushgateway,redis,postgresql14', u'nginx,ansible,pgbadger,python-psycopg2,dnsmasq,coreutils,diffutils,polysh,docker-ce,docker-compose'])
  203. TASK [Install pip3 packages on meta node] ************************************************************
  204. changed: [10.10.10.10]
  205. TASK [node : Node configure disable numa] ************************************************************
  206. skipping: [10.10.10.10]
  207. TASK [node : Node configure disable swap] ************************************************************
  208. skipping: [10.10.10.10]
  209. TASK [node : Node configure unmount swap] ************************************************************
  210. skipping: [10.10.10.10] => (item=swap)
  211. skipping: [10.10.10.10] => (item=none)
  212. TASK [node : Node setup static network] **************************************************************
  213. changed: [10.10.10.10]
  214. TASK [node : Node configure disable firewall] ********************************************************
  215. changed: [10.10.10.10]
  216. TASK [node : Node configure disk prefetch] ***********************************************************
  217. skipping: [10.10.10.10]
  218. TASK [node : Enable linux kernel modules] ************************************************************
  219. changed: [10.10.10.10] => (item=softdog)
  220. changed: [10.10.10.10] => (item=br_netfilter)
  221. changed: [10.10.10.10] => (item=ip_vs)
  222. changed: [10.10.10.10] => (item=ip_vs_rr)
  223. ok: [10.10.10.10] => (item=ip_vs_rr)
  224. changed: [10.10.10.10] => (item=ip_vs_wrr)
  225. changed: [10.10.10.10] => (item=ip_vs_sh)
  226. TASK [node : Enable kernel module on reboot] *********************************************************
  227. changed: [10.10.10.10]
  228. TASK [node : Get config parameter page count] ********************************************************
  229. changed: [10.10.10.10]
  230. TASK [node : Get config parameter page size] *********************************************************
  231. changed: [10.10.10.10]
  232. TASK [node : Tune shmmax and shmall via mem] *********************************************************
  233. skipping: [10.10.10.10]
  234. TASK [node : Create tuned profiles] ******************************************************************
  235. changed: [10.10.10.10] => (item=oltp)
  236. changed: [10.10.10.10] => (item=olap)
  237. changed: [10.10.10.10] => (item=crit)
  238. changed: [10.10.10.10] => (item=tiny)
  239. TASK [node : Render tuned profiles] ******************************************************************
  240. changed: [10.10.10.10] => (item=oltp)
  241. changed: [10.10.10.10] => (item=olap)
  242. changed: [10.10.10.10] => (item=crit)
  243. changed: [10.10.10.10] => (item=tiny)
  244. TASK [node : Active tuned profile] *******************************************************************
  245. changed: [10.10.10.10]
  246. TASK [node : Change additional sysctl params] ********************************************************
  247. TASK [node : Copy default user bash profile] *********************************************************
  248. changed: [10.10.10.10]
  249. TASK [Setup node default pam ulimits] ****************************************************************
  250. changed: [10.10.10.10]
  251. TASK [Create node data dir if exists] ****************************************************************
  252. changed: [10.10.10.10]
  253. TASK [node : Create os user group admin] *************************************************************
  254. changed: [10.10.10.10]
  255. TASK [node : Create os user admin] *******************************************************************
  256. changed: [10.10.10.10]
  257. TASK [node : Grant admin group nopass sudo] **********************************************************
  258. changed: [10.10.10.10]
  259. TASK [node : Add no host checking to ssh config] *****************************************************
  260. changed: [10.10.10.10]
  261. TASK [node : Add admin ssh no host checking] *********************************************************
  262. ok: [10.10.10.10]
  263. TASK [node : Fetch all admin public keys] ************************************************************
  264. changed: [10.10.10.10]
  265. TASK [node : Exchange all admin ssh keys] ************************************************************
  266. changed: [10.10.10.10 -> 10.10.10.10] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPzzw6XqahkKgDyQunmjTQEfs5+28oPrhW02REQBlhsw58dlTJWnfQEQFB4BTGznT5Xd4wcqp4nNNbiznWikwgD0rhYMFdxmFClyYXCDllSkzpQqFIbDlt+/9MmzSfAA64n0goffgJC1MbiZXBsrSsteNq96qGkDZpaQXp5PIeeoLiVkwI5GICGHIoKj4vnPUjzgLnRo0hr9K+bJ8os972AcbzxEh/dlMs71PRbIvPD46lxWy6zdINk1fd8XBdMmuoynVRuehUsOd72m1umLCK9fXWAilU1oSRT25y5SLQqQZ+dhHyxKL+wuu03vLHWrDGo/+0ocYEqH261JgQInF5 ansible-generated on pg-meta-1', u'10.10.10.10'])
  267. TASK [node : Install public keys] ********************************************************************
  268. changed: [10.10.10.10] => (item=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7IMAMNavYtWwzAJajKqwdn3ar5BhvcwCnBTxxEkXhGlCO2vfgosSAQMEflfgvkiI5nM1HIFQ8KINlx1XLO7SdL5KdInG5LIJjAFh0pujS4kNCT9a5IGvSq1BrzGqhbEcwWYdju1ZPYBcJm/MG+JD0dYCh8vfrYB/cYMD0SOmNkQ== vagrant@pigsty.com)
  269. TASK [node : Install current public key] *************************************************************
  270. ok: [10.10.10.10]
  271. TASK [Setup default node timezone] *******************************************************************
  272. changed: [10.10.10.10]
  273. TASK [node : Install ntp package] ********************************************************************
  274. ok: [10.10.10.10]
  275. TASK [node : Install chrony package] *****************************************************************
  276. skipping: [10.10.10.10]
  277. TASK [node : Copy the ntp.conf file] *****************************************************************
  278. changed: [10.10.10.10]
  279. TASK [node : Copy the chrony.conf template] **********************************************************
  280. changed: [10.10.10.10]
  281. TASK [node : Launch ntpd service] ********************************************************************
  282. changed: [10.10.10.10]
  283. TASK [node : Launch chronyd service] *****************************************************************
  284. skipping: [10.10.10.10]
  285. TASK [node : Append /etc/crontab] ********************************************************************
  286. skipping: [10.10.10.10] => (item=00 01 * * * postgres /pg/bin/pg-backup 2>>/pg/log/backup.log)
  287. skipping: [10.10.10.10] => (item=* * * * * postgres /usr/pgsql/bin/pgbench meta -nv -T10 -c2 2>>/pg/log/bench.log)
  288. TASK [node : Overwrite /etc/crontab] *****************************************************************
  289. changed: [10.10.10.10]
  290. TASK [Install docker and docker-compose] *************************************************************
  291. ok: [10.10.10.10] => (item=docker-ce)
  292. ok: [10.10.10.10] => (item=docker-compose)
  293. TASK [docker : Get current admin user] ***************************************************************
  294. changed: [10.10.10.10]
  295. TASK [Add admin user to docker group] ****************************************************************
  296. changed: [10.10.10.10] => (item=vagrant)
  297. changed: [10.10.10.10] => (item=dba)
  298. TASK [Make sure /etc/docker exists] ******************************************************************
  299. changed: [10.10.10.10]
  300. TASK [Overwrite /etc/docker/daemon.json] *************************************************************
  301. changed: [10.10.10.10]
  302. TASK [Launch docker service unit] ********************************************************************
  303. changed: [10.10.10.10]
  304. TASK [Check docker image cache exists] ***************************************************************
  305. ok: [10.10.10.10]
  306. TASK [Load docker image cache if exists] *************************************************************
  307. skipping: [10.10.10.10]
  308. TASK [Check for existing consul] *********************************************************************
  309. changed: [10.10.10.10]
  310. TASK [consul : Consul exists flag fact set] **********************************************************
  311. ok: [10.10.10.10]
  312. TASK [Abort due to existing consul instance] *********************************************************
  313. skipping: [10.10.10.10]
  314. TASK [Clean existing consul instance] ****************************************************************
  315. skipping: [10.10.10.10]
  316. TASK [Stop any running consul instance] **************************************************************
  317. changed: [10.10.10.10]
  318. TASK [Make sure consul is installed] *****************************************************************
  319. ok: [10.10.10.10]
  320. TASK [Create consul dir] *****************************************************************************
  321. changed: [10.10.10.10] => (item=/etc/consul.d)
  322. changed: [10.10.10.10] => (item=/data/consul)
  323. TASK [consul : Fetch hostname from server if no node name is given] **********************************
  324. skipping: [10.10.10.10]
  325. TASK [consul : Setup nodename according to hostname] *************************************************
  326. skipping: [10.10.10.10]
  327. TASK [Make sure consul hcl absent] *******************************************************************
  328. ok: [10.10.10.10]
  329. TASK [Render consul main conf /etc/consul.d/consul.json] *********************************************
  330. changed: [10.10.10.10]
  331. TASK [Render consul node meta /etc/consul.d/consul-meta.json] ****************************************
  332. changed: [10.10.10.10]
  333. TASK [Get consul bootstrap expect quroum] ************************************************************
  334. ok: [10.10.10.10]
  335. TASK [Render consul server /etc/consul.d/consul-server.json] *****************************************
  336. changed: [10.10.10.10]
  337. TASK [Render consul ui conf /etc/consul.d/consul-server.json] ****************************************
  338. changed: [10.10.10.10]
  339. TASK [Copy consul systemd service] *******************************************************************
  340. changed: [10.10.10.10]
  341. TASK [Launch consul server service] ******************************************************************
  342. changed: [10.10.10.10]
  343. TASK [Wait for consul server online] *****************************************************************
  344. ok: [10.10.10.10]
  345. TASK [Launch consul agent service] *******************************************************************
  346. skipping: [10.10.10.10]
  347. TASK [Wait for consul agent online] ******************************************************************
  348. skipping: [10.10.10.10]
  349. TASK [Check for existing etcd] ***********************************************************************
  350. changed: [10.10.10.10]
  351. TASK [etcd : Etcd exists flag fact set] **************************************************************
  352. ok: [10.10.10.10]
  353. TASK [Abort due to etcd exists] **********************************************************************
  354. skipping: [10.10.10.10]
  355. TASK [Clean existing etcd instance] ******************************************************************
  356. skipping: [10.10.10.10]
  357. TASK [Stop any running etcd instance] ****************************************************************
  358. changed: [10.10.10.10]
  359. TASK [Create etcd dir] *******************************************************************************
  360. changed: [10.10.10.10] => (item=/etc/etcd)
  361. changed: [10.10.10.10] => (item=/data/etcd)
  362. TASK [etcd : Get dcs server key as dcs nodename] *****************************************************
  363. ok: [10.10.10.10]
  364. TASK [Copy etcd server service unit] *****************************************************************
  365. changed: [10.10.10.10]
  366. TASK [Copy /etc/etcd.d/etcd.conf] ********************************************************************
  367. changed: [10.10.10.10]
  368. TASK [Launch etcd server service] ********************************************************************
  369. changed: [10.10.10.10]
  370. TASK [Wait for etcd server online] *******************************************************************
  371. ok: [10.10.10.10]
  372. TASK [Write etcd endpoint env profile] ***************************************************************
  373. changed: [10.10.10.10]
  374. PLAY [Setup Infrastructure on meta nodes] ************************************************************
  375. TASK [Create local ca directory] *********************************************************************
  376. changed: [10.10.10.10]
  377. TASK [Copy ca cert from local files] *****************************************************************
  378. skipping: [10.10.10.10] => (item=ca.key)
  379. skipping: [10.10.10.10] => (item=ca.crt)
  380. TASK [Check ca key cert exists] **********************************************************************
  381. ok: [10.10.10.10]
  382. TASK [ca : Create self-signed CA key-cert] ***********************************************************
  383. changed: [10.10.10.10]
  384. TASK [nameserver : Make sure dnsmasq package installed] **********************************************
  385. ok: [10.10.10.10]
  386. TASK [nameserver : Copy dnsmasq /etc/dnsmasq.d/config] ***********************************************
  387. changed: [10.10.10.10]
  388. TASK [nameserver : Add dynamic dns records to meta] **************************************************
  389. changed: [10.10.10.10] => (item=10.10.10.2 pg-meta)
  390. changed: [10.10.10.10] => (item=10.10.10.3 pg-test)
  391. changed: [10.10.10.10] => (item=10.10.10.10 pg-meta-1)
  392. changed: [10.10.10.10] => (item=10.10.10.11 pg-test-1)
  393. changed: [10.10.10.10] => (item=10.10.10.12 pg-test-2)
  394. changed: [10.10.10.10] => (item=10.10.10.13 pg-test-3)
  395. TASK [nameserver : Launch meta dnsmasq service] ******************************************************
  396. skipping: [10.10.10.10]
  397. TASK [nameserver : Wait for meta dnsmasq online] *****************************************************
  398. skipping: [10.10.10.10]
  399. TASK [Make sure nginx installed] *********************************************************************
  400. ok: [10.10.10.10]
  401. TASK [nginx : Create local html directory] ***********************************************************
  402. ok: [10.10.10.10] => (item=/www)
  403. changed: [10.10.10.10] => (item=/www/pev2)
  404. changed: [10.10.10.10] => (item=/www/docs)
  405. changed: [10.10.10.10] => (item=/www/logs)
  406. changed: [10.10.10.10] => (item=/www/schema)
  407. changed: [10.10.10.10] => (item=/www/report)
  408. TASK [nginx : Copy pigsty logo file] *****************************************************************
  409. changed: [10.10.10.10]
  410. TASK [Render default nginx home page] ****************************************************************
  411. changed: [10.10.10.10]
  412. TASK [Create nginx haproxy config dir] ***************************************************************
  413. changed: [10.10.10.10]
  414. TASK [Copy nginx main config] ************************************************************************
  415. changed: [10.10.10.10]
  416. TASK [Copy nginx default config] *********************************************************************
  417. changed: [10.10.10.10]
  418. TASK [Copy nginx upstream conf] **********************************************************************
  419. skipping: [10.10.10.10] => (item={u'domain': u'pigsty', u'endpoint': u'10.10.10.10:80', u'name': u'home'})
  420. changed: [10.10.10.10] => (item={u'domain': u'g.pigsty', u'endpoint': u'10.10.10.10:3000', u'name': u'grafana'})
  421. changed: [10.10.10.10] => (item={u'domain': u'l.pigsty', u'endpoint': u'10.10.10.10:3100', u'name': u'loki'})
  422. changed: [10.10.10.10] => (item={u'domain': u'p.pigsty', u'endpoint': u'10.10.10.10:9090', u'name': u'prometheus'})
  423. changed: [10.10.10.10] => (item={u'domain': u'a.pigsty', u'endpoint': u'10.10.10.10:9093', u'name': u'alertmanager'})
  424. changed: [10.10.10.10] => (item={u'domain': u'c.pigsty', u'endpoint': u'127.0.0.1:8500', u'name': u'consul'})
  425. changed: [10.10.10.10] => (item={u'domain': u'api.pigsty.cc', u'endpoint': u'127.0.0.1:8884', u'name': u'postgrest'})
  426. changed: [10.10.10.10] => (item={u'domain': u'adm.pigsty.cc', u'endpoint': u'127.0.0.1:8885', u'name': u'pgadmin'})
  427. changed: [10.10.10.10] => (item={u'domain': u'cli.pigsty.cc', u'endpoint': u'127.0.0.1:8886', u'name': u'pgweb'})
  428. changed: [10.10.10.10] => (item={u'domain': u'ddl.pigsty.cc', u'endpoint': u'127.0.0.1:8887', u'name': u'bytebase'})
  429. changed: [10.10.10.10] => (item={u'domain': u'lab.pigsty.cc', u'endpoint': u'127.0.0.1:8888', u'name': u'jupyter'})
  430. changed: [10.10.10.10] => (item={u'domain': u'git.pigsty.cc', u'endpoint': u'127.0.0.1:8889', u'name': u'gitea'})
  431. changed: [10.10.10.10] => (item={u'domain': u'sss.pigsty.cc', u'endpoint': u'127.0.0.1:9000', u'name': u'minio'})
  432. TASK [nginx : Setup docs if exists] ******************************************************************
  433. changed: [10.10.10.10]
  434. TASK [nginx : Setup pev2 if exists] ******************************************************************
  435. changed: [10.10.10.10]
  436. TASK [Restart meta nginx service] ********************************************************************
  437. changed: [10.10.10.10]
  438. TASK [Wait for nginx service online] *****************************************************************
  439. ok: [10.10.10.10]
  440. TASK [Make sure nginx exporter installed] ************************************************************
  441. ok: [10.10.10.10]
  442. TASK [Config nginx_exporter options] *****************************************************************
  443. changed: [10.10.10.10]
  444. TASK [Restart nginx_exporter service] ****************************************************************
  445. changed: [10.10.10.10]
  446. TASK [Wait for nginx exporter online] ****************************************************************
  447. ok: [10.10.10.10]
  448. TASK [Install prometheus and alertmanager] ***********************************************************
  449. ok: [10.10.10.10] => (item=prometheus2)
  450. ok: [10.10.10.10] => (item=alertmanager)
  451. TASK [Wipe out prometheus config dir] ****************************************************************
  452. changed: [10.10.10.10]
  453. TASK [Wipe out existing prometheus data] *************************************************************
  454. ok: [10.10.10.10]
  455. TASK [Create prometheus directories] *****************************************************************
  456. changed: [10.10.10.10] => (item=/etc/prometheus)
  457. changed: [10.10.10.10] => (item=/etc/prometheus/bin)
  458. changed: [10.10.10.10] => (item=/etc/prometheus/rules)
  459. changed: [10.10.10.10] => (item=/etc/prometheus/targets)
  460. changed: [10.10.10.10] => (item=/etc/prometheus/targets/infra)
  461. changed: [10.10.10.10] => (item=/etc/prometheus/targets/nodes)
  462. changed: [10.10.10.10] => (item=/etc/prometheus/targets/pgsql)
  463. changed: [10.10.10.10] => (item=/etc/prometheus/targets/redis)
  464. changed: [10.10.10.10] => (item=/data/prometheus/data)
  465. TASK [Copy prometheus bin scripts] *******************************************************************
  466. changed: [10.10.10.10]
  467. TASK [Copy prometheus rules] *************************************************************************
  468. changed: [10.10.10.10]
  469. TASK [Render prometheus config] **********************************************************************
  470. changed: [10.10.10.10]
  471. TASK [prometheus : Render altermanager config] *******************************************************
  472. changed: [10.10.10.10]
  473. TASK [Config /etc/prometheus opts] *******************************************************************
  474. changed: [10.10.10.10]
  475. TASK [Launch prometheus service] *********************************************************************
  476. changed: [10.10.10.10]
  477. TASK [Wait for prometheus online] ********************************************************************
  478. ok: [10.10.10.10]
  479. TASK [prometheus : Launch alertmanager service] ******************************************************
  480. changed: [10.10.10.10]
  481. TASK [prometheus : Wait for alertmanager online] *****************************************************
  482. ok: [10.10.10.10]
  483. TASK [Reload prometheus service] *********************************************************************
  484. changed: [10.10.10.10]
  485. TASK [Make sure grafana installed] *******************************************************************
  486. ok: [10.10.10.10]
  487. TASK [Stop grafana service] **************************************************************************
  488. changed: [10.10.10.10]
  489. TASK [Check grafana plugin cache exists] *************************************************************
  490. ok: [10.10.10.10]
  491. TASK [Provision grafana plugins via cache if exists] *************************************************
  492. changed: [10.10.10.10]
  493. TASK [Download grafana plugins via internet] *********************************************************
  494. skipping: [10.10.10.10] => (item=marcusolsson-csv-datasource)
  495. skipping: [10.10.10.10] => (item=marcusolsson-json-datasource)
  496. skipping: [10.10.10.10] => (item=marcusolsson-treemap-panel)
  497. TASK [Download grafana plugins via git] **************************************************************
  498. skipping: [10.10.10.10] => (item=https://github.com/Vonng/vonng-echarts-panel)
  499. TASK [Remove grafana provisioning config] ************************************************************
  500. ok: [10.10.10.10] => (item=/etc/grafana/provisioning/dashboards/pigsty.yml)
  501. ok: [10.10.10.10] => (item=/etc/grafana/provisioning/datasources/pigsty.yml)
  502. TASK [Remake grafana resource dir] *******************************************************************
  503. changed: [10.10.10.10] => (item=/etc/grafana/)
  504. changed: [10.10.10.10] => (item=/etc/dashboards)
  505. changed: [10.10.10.10] => (item=/etc/grafana/provisioning/dashboards)
  506. changed: [10.10.10.10] => (item=/etc/grafana/provisioning/datasources)
  507. TASK [Copy grafana systemd service] ******************************************************************
  508. changed: [10.10.10.10]
  509. TASK [Templating /etc/grafana/grafana.ini] ***********************************************************
  510. changed: [10.10.10.10]
  511. TASK [grafana : Templating datasources provisioning config] ******************************************
  512. changed: [10.10.10.10]
  513. TASK [grafana : Templating dashboards provisioning config] *******************************************
  514. changed: [10.10.10.10]
  515. TASK [Customize grafana logo icon] *******************************************************************
  516. changed: [10.10.10.10]
  517. TASK [Launch grafana service] ************************************************************************
  518. changed: [10.10.10.10]
  519. TASK [Wait for grafana online] ***********************************************************************
  520. ok: [10.10.10.10]
  521. TASK [Sync grafana home and core dashboards] *********************************************************
  522. changed: [10.10.10.10]
  523. TASK [Provisioning grafana with grafana.py] **********************************************************
  524. changed: [10.10.10.10]
  525. TASK [Install loki via yum] **************************************************************************
  526. ok: [10.10.10.10]
  527. TASK [Cleanup loki] **********************************************************************************
  528. skipping: [10.10.10.10]
  529. TASK [Make sure loki data & rule dir exists] *********************************************************
  530. changed: [10.10.10.10]
  531. TASK [Copy loki systemd service] *********************************************************************
  532. ok: [10.10.10.10]
  533. TASK [Templating loki.yml main config] ***************************************************************
  534. changed: [10.10.10.10]
  535. TASK [Render loki default config] ********************************************************************
  536. changed: [10.10.10.10]
  537. TASK [loki : Launch Loki] ****************************************************************************
  538. changed: [10.10.10.10]
  539. TASK [Wait for loki online] **************************************************************************
  540. ok: [10.10.10.10]
  541. TASK [infra_register : Register nginx service to consul] *********************************************
  542. changed: [10.10.10.10]
  543. TASK [infra_register : Register nginx-exporter service to consul] ************************************
  544. changed: [10.10.10.10]
  545. TASK [infra_register : Register prometheus service to consul] ****************************************
  546. changed: [10.10.10.10]
  547. TASK [infra_register : Register alertmanager service to consul] **************************************
  548. changed: [10.10.10.10]
  549. TASK [infra_register : Register grafana service to consul] *******************************************
  550. changed: [10.10.10.10]
  551. TASK [infra_register : Register loki service to consul] **********************************************
  552. changed: [10.10.10.10]
  553. TASK [infra_register : Register dnsmasq service to consul] *******************************************
  554. skipping: [10.10.10.10]
  555. TASK [infra_register : Reload consul] ****************************************************************
  556. changed: [10.10.10.10]
  557. TASK [infra_register : Render infra file-sd targets targets for prometheus] **************************
  558. changed: [10.10.10.10 -> 10.10.10.10] => (item=10.10.10.10)
  559. PLAY [Meta Node Monitor] *****************************************************************************
  560. TASK [Add yum repo for node_exporter] ****************************************************************
  561. skipping: [10.10.10.10]
  562. TASK [Install node_exporter via yum] *****************************************************************
  563. skipping: [10.10.10.10]
  564. TASK [Install node_exporter via binary] **************************************************************
  565. skipping: [10.10.10.10]
  566. TASK [Config node_exporter systemd unit] *************************************************************
  567. changed: [10.10.10.10]
  568. TASK [Config default node_exporter options] **********************************************************
  569. changed: [10.10.10.10]
  570. TASK [Launch node_exporter systemd unit] *************************************************************
  571. changed: [10.10.10.10]
  572. TASK [Wait for node_exporter online] *****************************************************************
  573. ok: [10.10.10.10]
  574. TASK [Install promtail via yum] **********************************************************************
  575. ok: [10.10.10.10]
  576. TASK [Cleanup promtail positions] ********************************************************************
  577. skipping: [10.10.10.10]
  578. TASK [Copy promtail systemd service] *****************************************************************
  579. ok: [10.10.10.10]
  580. TASK [promtail : Fetch hostname from server if no node name is given] ********************************
  581. skipping: [10.10.10.10]
  582. TASK [promtail : Setup nodename according to hostname] ***********************************************
  583. skipping: [10.10.10.10]
  584. TASK [Render promtail main config] *******************************************************************
  585. changed: [10.10.10.10]
  586. TASK [Render promtail default config] ****************************************************************
  587. changed: [10.10.10.10]
  588. TASK [Launch promtail] *******************************************************************************
  589. changed: [10.10.10.10]
  590. TASK [Wait for promtail online] **********************************************************************
  591. ok: [10.10.10.10]
  592. TASK [node_register : Fetch hostname from server if no node name is given] ***************************
  593. skipping: [10.10.10.10]
  594. TASK [node_register : Setup nodename according to hostname] ******************************************
  595. skipping: [10.10.10.10]
  596. TASK [node_register : Register docker service to consul] *********************************************
  597. changed: [10.10.10.10]
  598. TASK [node_register : Register node-exporter service to consul] **************************************
  599. changed: [10.10.10.10]
  600. TASK [node_register : Register promtail service to consul] *******************************************
  601. changed: [10.10.10.10]
  602. TASK [node_register : Reload consul] *****************************************************************
  603. changed: [10.10.10.10]
  604. TASK [node_register : Fetch hostname from server if no node name is given] ***************************
  605. skipping: [10.10.10.10]
  606. TASK [node_register : Setup nodename according to hostname] ******************************************
  607. skipping: [10.10.10.10]
  608. TASK [node_register : Register node exporter as prometheus target] ***********************************
  609. changed: [10.10.10.10 -> 10.10.10.10] => (item=10.10.10.10)
  610. PLAY [Meta PGSQL Init] *******************************************************************************
  611. TASK [Create os group postgres] **********************************************************************
  612. changed: [10.10.10.10]
  613. TASK [postgres : Make sure dcs group exists] *********************************************************
  614. ok: [10.10.10.10] => (item=consul)
  615. ok: [10.10.10.10] => (item=etcd)
  616. TASK [Create dbsu postgres] **************************************************************************
  617. changed: [10.10.10.10]
  618. TASK [postgres : Grant dbsu nopass sudo] *************************************************************
  619. skipping: [10.10.10.10]
  620. TASK [postgres : Grant dbsu all sudo] ****************************************************************
  621. skipping: [10.10.10.10]
  622. TASK [postgres : Grant dbsu limited sudo] ************************************************************
  623. changed: [10.10.10.10]
  624. TASK [postgres : Config watchdog onwer to dbsu] ******************************************************
  625. changed: [10.10.10.10]
  626. TASK [postgres : Add dbsu ssh no host checking] ******************************************************
  627. changed: [10.10.10.10]
  628. TASK [postgres : Fetch dbsu public keys] *************************************************************
  629. changed: [10.10.10.10]
  630. TASK [postgres : Exchange dbsu ssh keys] *************************************************************
  631. changed: [10.10.10.10 -> 10.10.10.10] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTnoEpVwp2k88FlqB16plsoYpvXVv9BIPajheil8DGMsgir/IHYT9pQhhLrKfStV9zZiLu96oCjTqHQdzKt04gbEcT/kD4kdnVrpbA/Z7CcoDlahHDEcRZoVPTL0Ba+TNKc9UslDm3JxgxLFr2KDigC0AoG8xzGGdHSxsPdlDz59/n+7WWJRuE5jicPIwVy70KNaSdlYfYnqlnWHhAwNXROsLoKiTBoYsxIRuuQfWEZsUmxDhwJ3ESUUgEE+F5B7R2/wh/UBcBZRfDpc4OzNkZKLiQz3UJ+P6FkQJD5Uy1ZfoPdF8cVFNoPSBpN3KJ0jXiEe6cNBbstsGkCmd6DxFD ansible-generated on pg-meta-1', u'10.10.10.10'])
  632. TASK [postgres : Install offical pgdg yum repo] ******************************************************
  633. skipping: [10.10.10.10] => (item=postgresql${pg_version}*)
  634. skipping: [10.10.10.10] => (item=postgis32_${pg_version}*)
  635. skipping: [10.10.10.10] => (item=citus_${pg_version}*)
  636. skipping: [10.10.10.10] => (item=timescaledb-2-postgresql-${pg_version})
  637. skipping: [10.10.10.10] => (item=pgbouncer pg_exporter pgbadger pg_activity node_exporter consul haproxy vip-manager)
  638. skipping: [10.10.10.10] => (item=patroni patroni-consul patroni-etcd python3 python3-psycopg2 python36-requests python3-etcd)
  639. skipping: [10.10.10.10] => (item=python3-consul python36-urllib3 python36-idna python36-pyOpenSSL python36-cryptography)
  640. TASK [postgres : Install pg packages] ****************************************************************
  641. changed: [10.10.10.10] => (item=[u'postgresql14*', u'postgis32_14*', u'citus_14*', u'timescaledb-2-postgresql-14', u'pgbouncer,pg_exporter,pgbadger,pg_activity,node_exporter,consul,haproxy,vip-manager', u'patroni,patroni-consul,patroni-etcd,python3,python3-psycopg2,python36-requests,python3-etcd', u'python3-consul,python36-urllib3,python36-idna,python36-pyOpenSSL,python36-cryptography'])
  642. TASK [postgres : Install pg extensions] **************************************************************
  643. changed: [10.10.10.10] => (item=[u'pg_repack_14,pg_qualstats_14,pg_stat_kcache_14,pg_stat_monitor_14,wal2json_14'])
  644. TASK [postgres : Link /usr/pgsql to current version] *************************************************
  645. changed: [10.10.10.10]
  646. TASK [postgres : Add pg bin dir to profile path] *****************************************************
  647. changed: [10.10.10.10]
  648. TASK [postgres : Fix directory ownership] ************************************************************
  649. ok: [10.10.10.10]
  650. TASK [Remove default postgres service] ***************************************************************
  651. changed: [10.10.10.10]
  652. TASK [postgres : Check necessary variables exists] ***************************************************
  653. ok: [10.10.10.10] => {
  654. "changed": false,
  655. "msg": "All assertions passed"
  656. }
  657. TASK [postgres : Fetch variables via pg_cluster] *****************************************************
  658. ok: [10.10.10.10]
  659. TASK [postgres : Set cluster basic facts for hosts] **************************************************
  660. ok: [10.10.10.10]
  661. TASK [postgres : Assert cluster primary singleton] ***************************************************
  662. ok: [10.10.10.10] => {
  663. "changed": false,
  664. "msg": "All assertions passed"
  665. }
  666. TASK [postgres : Setup cluster primary ip address] ***************************************************
  667. ok: [10.10.10.10]
  668. TASK [postgres : Setup repl upstream for primary] ****************************************************
  669. skipping: [10.10.10.10]
  670. TASK [postgres : Setup repl upstream for replicas] ***************************************************
  671. skipping: [10.10.10.10]
  672. TASK [postgres : Debug print instance summary] *******************************************************
  673. ok: [10.10.10.10] => {
  674. "msg": "cluster=pg-meta service=pg-meta-primary instance=pg-meta-1 replication=[primary:itself]->10.10.10.10"
  675. }
  676. TASK [Check for existing postgres instance] **********************************************************
  677. changed: [10.10.10.10]
  678. TASK [postgres : Set fact whether pg port is open] ***************************************************
  679. ok: [10.10.10.10]
  680. TASK [Abort due to existing postgres instance] *******************************************************
  681. skipping: [10.10.10.10]
  682. TASK [postgres : CLEAN RUNNING POSTGRESQL INSTANCE <DANGEROUSE!>] ************************************
  683. skipping: [10.10.10.10]
  684. TASK [Shutdown existing postgres service] ************************************************************
  685. changed: [10.10.10.10]
  686. TASK [postgres : Remove registerd consul service] ****************************************************
  687. changed: [10.10.10.10]
  688. TASK [Remove postgres metadata in consul] ************************************************************
  689. changed: [10.10.10.10]
  690. TASK [Remove postgres metadata in etcd] **************************************************************
  691. skipping: [10.10.10.10]
  692. TASK [Remove existing postgres data] *****************************************************************
  693. ok: [10.10.10.10] => (item=/pg)
  694. ok: [10.10.10.10] => (item=/data/postgres)
  695. ok: [10.10.10.10] => (item=/data/backups/postgres)
  696. changed: [10.10.10.10] => (item=/etc/pgbouncer)
  697. changed: [10.10.10.10] => (item=/var/log/pgbouncer)
  698. changed: [10.10.10.10] => (item=/var/run/pgbouncer)
  699. TASK [postgres : Make sure main and backup dir exists] ***********************************************
  700. ok: [10.10.10.10] => (item=/data)
  701. changed: [10.10.10.10] => (item=/data/backups)
  702. TASK [Create postgres directory structure] ***********************************************************
  703. changed: [10.10.10.10] => (item=/data/postgres)
  704. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14)
  705. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/bin)
  706. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/log)
  707. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/tmp)
  708. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/conf)
  709. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/data)
  710. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/meta)
  711. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/stat)
  712. changed: [10.10.10.10] => (item=/data/postgres/pg-meta-14/change)
  713. changed: [10.10.10.10] => (item=/data/backups/postgres/pg-meta-14/postgres)
  714. changed: [10.10.10.10] => (item=/data/backups/postgres/pg-meta-14/arcwal)
  715. changed: [10.10.10.10] => (item=/data/backups/postgres/pg-meta-14/backup)
  716. changed: [10.10.10.10] => (item=/data/backups/postgres/pg-meta-14/remote)
  717. TASK [postgres : Create pgbouncer directory structure] ***********************************************
  718. changed: [10.10.10.10] => (item=/etc/pgbouncer)
  719. changed: [10.10.10.10] => (item=/var/log/pgbouncer)
  720. changed: [10.10.10.10] => (item=/var/run/pgbouncer)
  721. TASK [postgres : Create links from pgbkup to pgroot] *************************************************
  722. changed: [10.10.10.10] => (item=arcwal)
  723. changed: [10.10.10.10] => (item=backup)
  724. changed: [10.10.10.10] => (item=remote)
  725. TASK [postgres : Create links from current cluster] **************************************************
  726. changed: [10.10.10.10]
  727. TASK [postgres : Create dummy placeholder file] ******************************************************
  728. changed: [10.10.10.10]
  729. TASK [Copy postgres scripts to /pg/bin/] *************************************************************
  730. changed: [10.10.10.10]
  731. TASK [postgres : Copy alias profile to /etc/profile.d] ***********************************************
  732. changed: [10.10.10.10]
  733. TASK [Copy psqlrc to postgres home] ******************************************************************
  734. changed: [10.10.10.10]
  735. TASK [postgres : Get config parameter page count] ****************************************************
  736. changed: [10.10.10.10]
  737. TASK [postgres : Get config parameter page size] *****************************************************
  738. changed: [10.10.10.10]
  739. TASK [postgres : Tune shared buffer and work mem] ****************************************************
  740. ok: [10.10.10.10]
  741. TASK [postgres : Hanlde small size mem occasion] *****************************************************
  742. ok: [10.10.10.10]
  743. TASK [Calculate postgres mem params] *****************************************************************
  744. skipping: [10.10.10.10]
  745. TASK [postgres : create patroni config dir] **********************************************************
  746. changed: [10.10.10.10]
  747. TASK [postgres : use predefined patroni template] ****************************************************
  748. skipping: [10.10.10.10]
  749. TASK [postgres : Render default /pg/conf/patroni.yml] ************************************************
  750. changed: [10.10.10.10]
  751. TASK [postgres : Link /pg/conf/patroni to /pg/bin/] **************************************************
  752. changed: [10.10.10.10]
  753. TASK [postgres : Link /pg/bin/patroni.yml to /etc/patroni/] ******************************************
  754. changed: [10.10.10.10]
  755. TASK [postgres : Config patroni watchdog support] ****************************************************
  756. ok: [10.10.10.10]
  757. TASK [postgres : Copy patroni systemd service file] **************************************************
  758. changed: [10.10.10.10]
  759. TASK [postgres : create patroni systemd drop-in dir] *************************************************
  760. changed: [10.10.10.10]
  761. TASK [Copy postgres systemd service file] ************************************************************
  762. changed: [10.10.10.10]
  763. TASK [postgres : Drop-In systemd config for patroni] *************************************************
  764. changed: [10.10.10.10]
  765. TASK [postgres : Launch patroni on primary instance] *************************************************
  766. changed: [10.10.10.10]
  767. TASK [postgres : Wait for patroni primary online] ****************************************************
  768. ok: [10.10.10.10]
  769. TASK [Wait for postgres primary online] **************************************************************
  770. ok: [10.10.10.10]
  771. TASK [Check primary postgres service ready] **********************************************************
  772. [WARNING]: Module remote_tmp /var/lib/pgsql/.ansible/tmp did not exist and was created with a mode of
  773. 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir
  774. with the correct permissions manually
  775. changed: [10.10.10.10]
  776. TASK [postgres : Check replication connectivity on primary] ******************************************
  777. changed: [10.10.10.10]
  778. TASK [postgres : Render init roles sql] **************************************************************
  779. changed: [10.10.10.10]
  780. TASK [postgres : Render init template sql] ***********************************************************
  781. changed: [10.10.10.10]
  782. TASK [postgres : Render default pg-init scripts] *****************************************************
  783. changed: [10.10.10.10]
  784. TASK [postgres : Execute initialization scripts] *****************************************************
  785. changed: [10.10.10.10]
  786. TASK [postgres : Check primary instance ready] *******************************************************
  787. changed: [10.10.10.10]
  788. TASK [postgres : Add dbsu password to pgpass if exists] **********************************************
  789. skipping: [10.10.10.10]
  790. TASK [postgres : Add system user to pgpass] **********************************************************
  791. changed: [10.10.10.10] => (item={u'username': u'replicator', u'password': u'DBUser.Replicator'})
  792. changed: [10.10.10.10] => (item={u'username': u'dbuser_monitor', u'password': u'DBUser.Monitor'})
  793. changed: [10.10.10.10] => (item={u'username': u'dbuser_dba', u'password': u'DBUser.DBA'})
  794. TASK [postgres : Check replication connectivity to primary] ******************************************
  795. skipping: [10.10.10.10]
  796. TASK [postgres : Launch patroni on replica instances] ************************************************
  797. skipping: [10.10.10.10]
  798. TASK [postgres : Wait for patroni replica online] ****************************************************
  799. skipping: [10.10.10.10]
  800. TASK [Wait for postgres replica online] **************************************************************
  801. skipping: [10.10.10.10]
  802. TASK [Check replica postgres service ready] **********************************************************
  803. skipping: [10.10.10.10]
  804. TASK [postgres : Render hba rules] *******************************************************************
  805. changed: [10.10.10.10]
  806. TASK [postgres : Reload hba rules] *******************************************************************
  807. changed: [10.10.10.10]
  808. TASK [postgres : Reload patroni] *********************************************************************
  809. changed: [10.10.10.10]
  810. TASK [postgres : Pause patroni] **********************************************************************
  811. skipping: [10.10.10.10]
  812. TASK [postgres : Stop patroni on replica instance] ***************************************************
  813. skipping: [10.10.10.10]
  814. TASK [postgres : Stop patroni on primary instance] ***************************************************
  815. skipping: [10.10.10.10]
  816. TASK [Launch raw postgres on primary] ****************************************************************
  817. skipping: [10.10.10.10]
  818. TASK [Launch raw postgres on replicas] ***************************************************************
  819. skipping: [10.10.10.10]
  820. TASK [Wait for postgres online] **********************************************************************
  821. skipping: [10.10.10.10]
  822. TASK [postgres : Check pgbouncer is installed] *******************************************************
  823. changed: [10.10.10.10]
  824. TASK [postgres : Stop existing pgbouncer service] ****************************************************
  825. ok: [10.10.10.10]
  826. TASK [postgres : Remove existing pgbouncer dirs] *****************************************************
  827. changed: [10.10.10.10] => (item=/etc/pgbouncer)
  828. changed: [10.10.10.10] => (item=/var/log/pgbouncer)
  829. changed: [10.10.10.10] => (item=/var/run/pgbouncer)
  830. TASK [Recreate dirs with owner postgres] *************************************************************
  831. changed: [10.10.10.10] => (item=/etc/pgbouncer)
  832. changed: [10.10.10.10] => (item=/var/log/pgbouncer)
  833. changed: [10.10.10.10] => (item=/var/run/pgbouncer)
  834. TASK [postgres : Copy /etc/pgbouncer/pgbouncer.ini] **************************************************
  835. changed: [10.10.10.10]
  836. TASK [postgres : Copy /etc/pgbouncer/pgb_hba.conf] ***************************************************
  837. changed: [10.10.10.10]
  838. TASK [postgres : Touch userlist and database list] ***************************************************
  839. changed: [10.10.10.10] => (item=database.txt)
  840. changed: [10.10.10.10] => (item=userlist.txt)
  841. TASK [postgres : Add default users to pgbouncer] *****************************************************
  842. changed: [10.10.10.10]
  843. TASK [postgres : Init pgbouncer business database list] **********************************************
  844. changed: [10.10.10.10] => (item={u'comment': u'pigsty meta database', u'schemas': [u'pigsty'], u'extensions': [{u'name': u'adminpack', u'schema': u'pg_catalog'}, {u'name': u'postgis', u'schema': u'public'}, {u'name': u'timescaledb'}], u'baseline': u'cmdb.sql', u'name': u'meta'})
  845. changed: [10.10.10.10] => (item={u'owner': u'dbuser_grafana', u'comment': u'grafana primary database', u'name': u'grafana', u'revokeconn': True})
  846. changed: [10.10.10.10] => (item={u'owner': u'dbuser_bytebase', u'comment': u'bytebase primary database', u'name': u'bytebase', u'revokeconn': True})
  847. changed: [10.10.10.10] => (item={u'owner': u'dbuser_kong', u'comment': u'kong the api gateway database', u'name': u'kong', u'revokeconn': True})
  848. changed: [10.10.10.10] => (item={u'owner': u'dbuser_gitea', u'comment': u'gitea meta database', u'name': u'gitea', u'revokeconn': True})
  849. TASK [postgres : Init pgbouncer business user list] **************************************************
  850. changed: [10.10.10.10] => (item={u'comment': u'pigsty cmdb admin user', u'roles': [u'dbrole_admin'], u'password': u'DBUser.Meta', u'name': u'dbuser_meta', u'pgbouncer': True})
  851. changed: [10.10.10.10] => (item={u'comment': u'read-only viewer for meta database', u'roles': [u'dbrole_readonly'], u'password': u'DBUser.Viewer', u'name': u'dbuser_view', u'pgbouncer': True})
  852. changed: [10.10.10.10] => (item={u'comment': u'admin user for grafana database', u'roles': [u'dbrole_admin'], u'password': u'DBUser.Grafana', u'name': u'dbuser_grafana', u'pgbouncer': True})
  853. changed: [10.10.10.10] => (item={u'comment': u'admin user for bytebase database', u'roles': [u'dbrole_admin'], u'password': u'DBUser.Bytebase', u'name': u'dbuser_bytebase', u'pgbouncer': True})
  854. changed: [10.10.10.10] => (item={u'comment': u'admin user for kong api gateway', u'roles': [u'dbrole_admin'], u'password': u'DBUser.Kong', u'name': u'dbuser_kong', u'pgbouncer': True})
  855. changed: [10.10.10.10] => (item={u'comment': u'admin user for gitea service', u'roles': [u'dbrole_admin'], u'password': u'DBUser.Gitea', u'name': u'dbuser_gitea', u'pgbouncer': True})
  856. TASK [postgres : Copy pgbouncer systemd service] *****************************************************
  857. changed: [10.10.10.10]
  858. TASK [postgres : Launch pgbouncer pool service] ******************************************************
  859. changed: [10.10.10.10]
  860. TASK [postgres : Wait for pgbouncer service online] **************************************************
  861. ok: [10.10.10.10]
  862. TASK [postgres : Check pgbouncer service is ready] ***************************************************
  863. changed: [10.10.10.10]
  864. TASK [postgres : include_tasks] **********************************************************************
  865. included: /home/vagrant/pigsty/roles/postgres/tasks/createuser.yml for 10.10.10.10
  866. included: /home/vagrant/pigsty/roles/postgres/tasks/createuser.yml for 10.10.10.10
  867. included: /home/vagrant/pigsty/roles/postgres/tasks/createuser.yml for 10.10.10.10
  868. included: /home/vagrant/pigsty/roles/postgres/tasks/createuser.yml for 10.10.10.10
  869. included: /home/vagrant/pigsty/roles/postgres/tasks/createuser.yml for 10.10.10.10
  870. included: /home/vagrant/pigsty/roles/postgres/tasks/createuser.yml for 10.10.10.10
  871. TASK [postgres : Render user dbuser_meta creation sql] ***********************************************
  872. changed: [10.10.10.10]
  873. TASK [postgres : Execute user dbuser_meta creation sql on primary] ***********************************
  874. changed: [10.10.10.10]
  875. TASK [postgres : Add business user to pgbouncer] *****************************************************
  876. changed: [10.10.10.10]
  877. TASK [postgres : Render user dbuser_view creation sql] ***********************************************
  878. changed: [10.10.10.10]
  879. TASK [postgres : Execute user dbuser_view creation sql on primary] ***********************************
  880. changed: [10.10.10.10]
  881. TASK [postgres : Add business user to pgbouncer] *****************************************************
  882. changed: [10.10.10.10]
  883. TASK [postgres : Render user dbuser_grafana creation sql] ********************************************
  884. changed: [10.10.10.10]
  885. TASK [postgres : Execute user dbuser_grafana creation sql on primary] ********************************
  886. changed: [10.10.10.10]
  887. TASK [postgres : Add business user to pgbouncer] *****************************************************
  888. changed: [10.10.10.10]
  889. TASK [postgres : Render user dbuser_bytebase creation sql] *******************************************
  890. changed: [10.10.10.10]
  891. TASK [postgres : Execute user dbuser_bytebase creation sql on primary] *******************************
  892. changed: [10.10.10.10]
  893. TASK [postgres : Add business user to pgbouncer] *****************************************************
  894. changed: [10.10.10.10]
  895. TASK [postgres : Render user dbuser_kong creation sql] ***********************************************
  896. changed: [10.10.10.10]
  897. TASK [postgres : Execute user dbuser_kong creation sql on primary] ***********************************
  898. changed: [10.10.10.10]
  899. TASK [postgres : Add business user to pgbouncer] *****************************************************
  900. changed: [10.10.10.10]
  901. TASK [postgres : Render user dbuser_gitea creation sql] **********************************************
  902. changed: [10.10.10.10]
  903. TASK [postgres : Execute user dbuser_gitea creation sql on primary] **********************************
  904. changed: [10.10.10.10]
  905. TASK [postgres : Add business user to pgbouncer] *****************************************************
  906. changed: [10.10.10.10]
  907. TASK [postgres : include_tasks] **********************************************************************
  908. included: /home/vagrant/pigsty/roles/postgres/tasks/createdb.yml for 10.10.10.10
  909. included: /home/vagrant/pigsty/roles/postgres/tasks/createdb.yml for 10.10.10.10
  910. included: /home/vagrant/pigsty/roles/postgres/tasks/createdb.yml for 10.10.10.10
  911. included: /home/vagrant/pigsty/roles/postgres/tasks/createdb.yml for 10.10.10.10
  912. included: /home/vagrant/pigsty/roles/postgres/tasks/createdb.yml for 10.10.10.10
  913. TASK [postgres : debug] ******************************************************************************
  914. ok: [10.10.10.10] => {
  915. "msg": {
  916. "baseline": "cmdb.sql",
  917. "comment": "pigsty meta database",
  918. "extensions": [
  919. {
  920. "name": "adminpack",
  921. "schema": "pg_catalog"
  922. },
  923. {
  924. "name": "postgis",
  925. "schema": "public"
  926. },
  927. {
  928. "name": "timescaledb"
  929. }
  930. ],
  931. "name": "meta",
  932. "schemas": [
  933. "pigsty"
  934. ]
  935. }
  936. }
  937. TASK [postgres : Render database meta creation sql] **************************************************
  938. changed: [10.10.10.10]
  939. TASK [postgres : Render database meta baseline sql] **************************************************
  940. changed: [10.10.10.10]
  941. TASK [postgres : Execute database meta creation command] *********************************************
  942. changed: [10.10.10.10]
  943. TASK [postgres : Execute database meta creation sql] *************************************************
  944. changed: [10.10.10.10]
  945. TASK [postgres : Execute database meta baseline sql] *************************************************
  946. changed: [10.10.10.10]
  947. TASK [postgres : Add biz database to pgbouncer] ******************************************************
  948. changed: [10.10.10.10]
  949. TASK [postgres : debug] ******************************************************************************
  950. ok: [10.10.10.10] => {
  951. "msg": {
  952. "comment": "grafana primary database",
  953. "name": "grafana",
  954. "owner": "dbuser_grafana",
  955. "revokeconn": true
  956. }
  957. }
  958. TASK [postgres : Render database grafana creation sql] ***********************************************
  959. changed: [10.10.10.10]
  960. TASK [postgres : Render database grafana baseline sql] ***********************************************
  961. skipping: [10.10.10.10]
  962. TASK [postgres : Execute database grafana creation command] ******************************************
  963. changed: [10.10.10.10]
  964. TASK [postgres : Execute database grafana creation sql] **********************************************
  965. changed: [10.10.10.10]
  966. TASK [postgres : Execute database grafana baseline sql] **********************************************
  967. skipping: [10.10.10.10]
  968. TASK [postgres : Add biz database to pgbouncer] ******************************************************
  969. changed: [10.10.10.10]
  970. TASK [postgres : debug] ******************************************************************************
  971. ok: [10.10.10.10] => {
  972. "msg": {
  973. "comment": "bytebase primary database",
  974. "name": "bytebase",
  975. "owner": "dbuser_bytebase",
  976. "revokeconn": true
  977. }
  978. }
  979. TASK [postgres : Render database bytebase creation sql] **********************************************
  980. changed: [10.10.10.10]
  981. TASK [postgres : Render database bytebase baseline sql] **********************************************
  982. skipping: [10.10.10.10]
  983. TASK [postgres : Execute database bytebase creation command] *****************************************
  984. changed: [10.10.10.10]
  985. TASK [postgres : Execute database bytebase creation sql] *********************************************
  986. changed: [10.10.10.10]
  987. TASK [postgres : Execute database bytebase baseline sql] *********************************************
  988. skipping: [10.10.10.10]
  989. TASK [postgres : Add biz database to pgbouncer] ******************************************************
  990. changed: [10.10.10.10]
  991. TASK [postgres : debug] ******************************************************************************
  992. ok: [10.10.10.10] => {
  993. "msg": {
  994. "comment": "kong the api gateway database",
  995. "name": "kong",
  996. "owner": "dbuser_kong",
  997. "revokeconn": true
  998. }
  999. }
  1000. TASK [postgres : Render database kong creation sql] **************************************************
  1001. changed: [10.10.10.10]
  1002. TASK [postgres : Render database kong baseline sql] **************************************************
  1003. skipping: [10.10.10.10]
  1004. TASK [postgres : Execute database kong creation command] *********************************************
  1005. changed: [10.10.10.10]
  1006. TASK [postgres : Execute database kong creation sql] *************************************************
  1007. changed: [10.10.10.10]
  1008. TASK [postgres : Execute database kong baseline sql] *************************************************
  1009. skipping: [10.10.10.10]
  1010. TASK [postgres : Add biz database to pgbouncer] ******************************************************
  1011. changed: [10.10.10.10]
  1012. TASK [postgres : debug] ******************************************************************************
  1013. ok: [10.10.10.10] => {
  1014. "msg": {
  1015. "comment": "gitea meta database",
  1016. "name": "gitea",
  1017. "owner": "dbuser_gitea",
  1018. "revokeconn": true
  1019. }
  1020. }
  1021. TASK [postgres : Render database gitea creation sql] *************************************************
  1022. changed: [10.10.10.10]
  1023. TASK [postgres : Render database gitea baseline sql] *************************************************
  1024. skipping: [10.10.10.10]
  1025. TASK [postgres : Execute database gitea creation command] ********************************************
  1026. changed: [10.10.10.10]
  1027. TASK [postgres : Execute database gitea creation sql] ************************************************
  1028. changed: [10.10.10.10]
  1029. TASK [postgres : Execute database gitea baseline sql] ************************************************
  1030. skipping: [10.10.10.10]
  1031. TASK [postgres : Add biz database to pgbouncer] ******************************************************
  1032. changed: [10.10.10.10]
  1033. TASK [postgres : Reload pgbouncer to add db and users] ***********************************************
  1034. changed: [10.10.10.10]
  1035. TASK [service : Make sure haproxy is installed] ******************************************************
  1036. ok: [10.10.10.10]
  1037. TASK [service : Create haproxy config directory] *****************************************************
  1038. ok: [10.10.10.10]
  1039. TASK [service : Create haproxy environment file] *****************************************************
  1040. changed: [10.10.10.10]
  1041. TASK [Copy haproxy systemd service file] *************************************************************
  1042. changed: [10.10.10.10]
  1043. TASK [service : Fetch postgres cluster memberships] **************************************************
  1044. ok: [10.10.10.10]
  1045. TASK [service : Templating /etc/haproxy/haproxy.cfg] *************************************************
  1046. changed: [10.10.10.10]
  1047. TASK [service : Reload Haproxy] **********************************************************************
  1048. changed: [10.10.10.10]
  1049. TASK [Launch haproxy load balancer service] **********************************************************
  1050. changed: [10.10.10.10]
  1051. TASK [service : Wait for haproxy load balancer online] ***********************************************
  1052. ok: [10.10.10.10]
  1053. TASK [service : Make sure vip-manager is installed] **************************************************
  1054. ok: [10.10.10.10]
  1055. TASK [Copy vip-manager systemd service file] *********************************************************
  1056. changed: [10.10.10.10]
  1057. TASK [service : create vip-manager systemd drop-in dir] **********************************************
  1058. changed: [10.10.10.10]
  1059. TASK [service : create vip-manager systemd drop-in file] *********************************************
  1060. changed: [10.10.10.10]
  1061. TASK [service : Templating /etc/default/vip-manager.yml] *********************************************
  1062. changed: [10.10.10.10]
  1063. TASK [service : Reload vip-manager config] ***********************************************************
  1064. changed: [10.10.10.10]
  1065. TASK [Add yum repo for pg_exporter] ******************************************************************
  1066. skipping: [10.10.10.10]
  1067. TASK [Install pg_exporter via yum] *******************************************************************
  1068. skipping: [10.10.10.10]
  1069. TASK [Install pg_exporter via binary] ****************************************************************
  1070. skipping: [10.10.10.10]
  1071. TASK [Copy default pg_exporter.yml config] ***********************************************************
  1072. changed: [10.10.10.10]
  1073. TASK [Config pg_exporter parameters] *****************************************************************
  1074. changed: [10.10.10.10]
  1075. TASK [Config pg_exporter systemd unit] ***************************************************************
  1076. changed: [10.10.10.10]
  1077. TASK [pg_exporter : Config pgbouncer_exporter parameters] ********************************************
  1078. changed: [10.10.10.10]
  1079. TASK [pg_exporter : Config pgbouncer_exporter systemd unit] ******************************************
  1080. changed: [10.10.10.10]
  1081. TASK [Launch pg_exporter systemd unit] ***************************************************************
  1082. changed: [10.10.10.10]
  1083. TASK [Wait for pg_exporter online] *******************************************************************
  1084. ok: [10.10.10.10]
  1085. TASK [pg_exporter : Launch pgbouncer_exporter systemd unit] ******************************************
  1086. changed: [10.10.10.10]
  1087. TASK [pg_exporter : Wait for pgbouncer_exporter online] **********************************************
  1088. ok: [10.10.10.10]
  1089. TASK [pg_register : Register postgres service to consul] *********************************************
  1090. changed: [10.10.10.10]
  1091. TASK [pg_register : Register patroni service to consul] **********************************************
  1092. changed: [10.10.10.10]
  1093. TASK [pg_register : Register pgbouncer service to consul] ********************************************
  1094. changed: [10.10.10.10]
  1095. TASK [pg_register : Register pg_exporter service to consul] ******************************************
  1096. changed: [10.10.10.10]
  1097. TASK [pg_register : Register pgbouncer_exporter service to consul] ***********************************
  1098. changed: [10.10.10.10]
  1099. TASK [pg_register : Register haproxy (exporter) service to consul] ***********************************
  1100. changed: [10.10.10.10]
  1101. TASK [pg_register : Register cluster service to consul] **********************************************
  1102. changed: [10.10.10.10] => (item={u'src_ip': u'*', u'check_url': u'/primary', u'src_port': 5433, u'name': u'primary', u'dst_port': u'pgbouncer', u'selector': u'[]'})
  1103. changed: [10.10.10.10] => (item={u'src_ip': u'*', u'check_url': u'/read-only', u'src_port': 5434, u'name': u'replica', u'selector_backup': u'[? pg_role == `primary` || pg_role == `offline` ]', u'dst_port': u'pgbouncer', u'selector': u'[]'})
  1104. changed: [10.10.10.10] => (item={u'haproxy': {u'default_server_options': u'inter 3s fastinter 1s downinter 5s rise 3 fall 3 on-marked-down shutdown-sessions slowstart 30s maxconn 3000 maxqueue 128 weight 100', u'balance': u'roundrobin', u'maxconn': 3000}, u'check_url': u'/primary', u'src_port': 5436, u'name': u'default', u'check_method': u'http', u'selector': u'[]', u'src_ip': u'*', u'dst_port': u'postgres', u'check_code': 200, u'check_port': u'patroni'})
  1105. changed: [10.10.10.10] => (item={u'src_ip': u'*', u'check_url': u'/replica', u'src_port': 5438, u'name': u'offline', u'selector_backup': u'[? pg_role == `replica` && !pg_offline_query]', u'dst_port': u'postgres', u'selector': u'[? pg_role == `offline` || pg_offline_query ]'})
  1106. TASK [pg_register : Reload consul to finish register] ************************************************
  1107. changed: [10.10.10.10]
  1108. TASK [pg_register : Register pgsql exporter as prometheus target] ************************************
  1109. changed: [10.10.10.10 -> 10.10.10.10] => (item=10.10.10.10)
  1110. TASK [pg_register : Render datasource definition on meta node] ***************************************
  1111. changed: [10.10.10.10 -> meta] => (item={u'comment': u'pigsty meta database', u'schemas': [u'pigsty'], u'extensions': [{u'name': u'adminpack', u'schema': u'pg_catalog'}, {u'name': u'postgis', u'schema': u'public'}, {u'name': u'timescaledb'}], u'baseline': u'cmdb.sql', u'name': u'meta'})
  1112. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_grafana', u'comment': u'grafana primary database', u'name': u'grafana', u'revokeconn': True})
  1113. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_bytebase', u'comment': u'bytebase primary database', u'name': u'bytebase', u'revokeconn': True})
  1114. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_kong', u'comment': u'kong the api gateway database', u'name': u'kong', u'revokeconn': True})
  1115. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_gitea', u'comment': u'gitea meta database', u'name': u'gitea', u'revokeconn': True})
  1116. TASK [pg_register : Load grafana datasource on meta node] ********************************************
  1117. changed: [10.10.10.10 -> meta] => (item={u'comment': u'pigsty meta database', u'schemas': [u'pigsty'], u'extensions': [{u'name': u'adminpack', u'schema': u'pg_catalog'}, {u'name': u'postgis', u'schema': u'public'}, {u'name': u'timescaledb'}], u'baseline': u'cmdb.sql', u'name': u'meta'})
  1118. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_grafana', u'comment': u'grafana primary database', u'name': u'grafana', u'revokeconn': True})
  1119. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_bytebase', u'comment': u'bytebase primary database', u'name': u'bytebase', u'revokeconn': True})
  1120. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_kong', u'comment': u'kong the api gateway database', u'name': u'kong', u'revokeconn': True})
  1121. changed: [10.10.10.10 -> meta] => (item={u'owner': u'dbuser_gitea', u'comment': u'gitea meta database', u'name': u'gitea', u'revokeconn': True})
  1122. TASK [pg_register : Create haproxy config dir resource dirs on /etc/pigsty] **************************
  1123. ok: [10.10.10.10 -> 10.10.10.10] => (item=10.10.10.10)
  1124. TASK [pg_register : Register haproxy upstream to nginx] **********************************************
  1125. changed: [10.10.10.10 -> 10.10.10.10] => (item=10.10.10.10)
  1126. TASK [pg_register : Register haproxy url location to nginx] ******************************************
  1127. changed: [10.10.10.10 -> 10.10.10.10] => (item=10.10.10.10)
  1128. TASK [pg_register : Reload nginx to finish haproxy register] *****************************************
  1129. changed: [10.10.10.10 -> 10.10.10.10] => (item=10.10.10.10)
  1130. PLAY RECAP *******************************************************************************************
  1131. 10.10.10.10 : ok=351 changed=266 unreachable=0 failed=0 skipped=80 rescued=0 ignored=0

nodes(可选)

完成单机安装后,使用 nodes.yml 完成 node-1, node-2 , node-3 三个节点的初始化:

nodes.yml

  1. [vagrant@meta pigsty]$ ./nodes.yml -l pg-test
  2. PLAY [Node Identity] *********************************************************************************
  3. TASK [Overwrite node_cluster] ************************************************************************
  4. ok: [10.10.10.12]
  5. ok: [10.10.10.11]
  6. ok: [10.10.10.13]
  7. TASK [Overwrite nodename] ****************************************************************************
  8. ok: [10.10.10.11]
  9. ok: [10.10.10.13]
  10. ok: [10.10.10.12]
  11. TASK [debug] *****************************************************************************************
  12. ok: [10.10.10.11] => {
  13. "msg": "ins=pg-test-1 cls=pg-test"
  14. }
  15. ok: [10.10.10.13] => {
  16. "msg": "ins=pg-test-3 cls=pg-test"
  17. }
  18. ok: [10.10.10.12] => {
  19. "msg": "ins=pg-test-2 cls=pg-test"
  20. }
  21. PLAY [Node Init] *************************************************************************************
  22. TASK [Set hostname from nodename] ********************************************************************
  23. changed: [10.10.10.11]
  24. changed: [10.10.10.12]
  25. changed: [10.10.10.13]
  26. TASK [node : Fetch hostname from server] *************************************************************
  27. skipping: [10.10.10.11]
  28. skipping: [10.10.10.13]
  29. skipping: [10.10.10.12]
  30. TASK [node : Exchange hostname among servers] ********************************************************
  31. skipping: [10.10.10.11]
  32. skipping: [10.10.10.13]
  33. skipping: [10.10.10.12]
  34. TASK [node : Write static dns records to /etc/hosts] *************************************************
  35. changed: [10.10.10.13] => (item=10.10.10.10 meta pigsty p.pigsty g.pigsty a.pigsty c.pigsty l.pigsty)
  36. changed: [10.10.10.12] => (item=10.10.10.10 meta pigsty p.pigsty g.pigsty a.pigsty c.pigsty l.pigsty)
  37. changed: [10.10.10.11] => (item=10.10.10.10 meta pigsty p.pigsty g.pigsty a.pigsty c.pigsty l.pigsty)
  38. changed: [10.10.10.12] => (item=10.10.10.10 api.pigsty adm.pigsty cli.pigsty ddl.pigsty lab.pigsty git.pigsty sss.pigsty)
  39. changed: [10.10.10.11] => (item=10.10.10.10 api.pigsty adm.pigsty cli.pigsty ddl.pigsty lab.pigsty git.pigsty sss.pigsty)
  40. changed: [10.10.10.13] => (item=10.10.10.10 api.pigsty adm.pigsty cli.pigsty ddl.pigsty lab.pigsty git.pigsty sss.pigsty)
  41. TASK [node : Write extra static dns records to /etc/hosts] *******************************************
  42. TASK [node : Get old nameservers] ********************************************************************
  43. changed: [10.10.10.11]
  44. changed: [10.10.10.13]
  45. changed: [10.10.10.12]
  46. TASK [node : Write tmp resolv file] ******************************************************************
  47. changed: [10.10.10.11]
  48. changed: [10.10.10.12]
  49. changed: [10.10.10.13]
  50. TASK [node : Write resolv options] *******************************************************************
  51. changed: [10.10.10.13] => (item=options single-request-reopen timeout:1 rotate)
  52. changed: [10.10.10.11] => (item=options single-request-reopen timeout:1 rotate)
  53. changed: [10.10.10.12] => (item=options single-request-reopen timeout:1 rotate)
  54. changed: [10.10.10.13] => (item=domain service.consul)
  55. changed: [10.10.10.11] => (item=domain service.consul)
  56. changed: [10.10.10.12] => (item=domain service.consul)
  57. TASK [node : Write additional nameservers] ***********************************************************
  58. changed: [10.10.10.13] => (item=10.10.10.10)
  59. changed: [10.10.10.11] => (item=10.10.10.10)
  60. changed: [10.10.10.12] => (item=10.10.10.10)
  61. TASK [node : Append existing nameservers] ************************************************************
  62. changed: [10.10.10.11] => (item=10.0.2.3)
  63. changed: [10.10.10.13] => (item=10.0.2.3)
  64. changed: [10.10.10.12] => (item=10.0.2.3)
  65. TASK [node : Swap resolv.conf] ***********************************************************************
  66. changed: [10.10.10.11]
  67. changed: [10.10.10.13]
  68. changed: [10.10.10.12]
  69. TASK [node : Node configure disable firewall] ********************************************************
  70. ok: [10.10.10.12]
  71. ok: [10.10.10.11]
  72. ok: [10.10.10.13]
  73. TASK [node : Node disable selinux by default] ********************************************************
  74. [WARNING]: SELinux state temporarily changed from 'enforcing' to 'permissive'. State change will take
  75. effect next reboot.
  76. changed: [10.10.10.11]
  77. changed: [10.10.10.13]
  78. changed: [10.10.10.12]
  79. TASK [node : Backup existing repos] ******************************************************************
  80. changed: [10.10.10.11]
  81. changed: [10.10.10.13]
  82. changed: [10.10.10.12]
  83. TASK [node : Install upstream repo] ******************************************************************
  84. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Base', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/os/$basearch/', u'http://mirror.centos.org/centos/$releasever/os/$basearch/'], u'name': u'base'})
  85. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Updates', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/', u'http://mirror.centos.org/centos/$releasever/updates/$basearch/'], u'name': u'updates'})
  86. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Extras', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/', u'http://mirror.centos.org/centos/$releasever/extras/$basearch/'], u'name': u'extras'})
  87. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Base', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/os/$basearch/', u'http://mirror.centos.org/centos/$releasever/os/$basearch/'], u'name': u'base'})
  88. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Updates', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/', u'http://mirror.centos.org/centos/$releasever/updates/$basearch/'], u'name': u'updates'})
  89. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Extras', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/', u'http://mirror.centos.org/centos/$releasever/extras/$basearch/'], u'name': u'extras'})
  90. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'CentOS $releasever - epel', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/epel/$releasever/$basearch', u'http://mirrors.aliyun.com/epel/$releasever/$basearch', u'http://download.fedoraproject.org/pub/epel/$releasever/$basearch'], u'name': u'epel'})
  91. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'CentOS $releasever - epel', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/epel/$releasever/$basearch', u'http://mirrors.aliyun.com/epel/$releasever/$basearch', u'http://download.fedoraproject.org/pub/epel/$releasever/$basearch'], u'name': u'epel'})
  92. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'enabled': True, u'description': u'Grafana', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm', u'https://packages.grafana.com/oss/rpm'], u'name': u'grafana'})
  93. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'enabled': True, u'description': u'Grafana', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm', u'https://packages.grafana.com/oss/rpm'], u'name': u'grafana'})
  94. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'Prometheus and exporters', u'baseurl': u'https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch', u'name': u'prometheus'})
  95. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'PostgreSQL common RPMs for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'http://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/common/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg-common'})
  96. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'Prometheus and exporters', u'baseurl': u'https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch', u'name': u'prometheus'})
  97. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Base', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/os/$basearch/', u'http://mirror.centos.org/centos/$releasever/os/$basearch/'], u'name': u'base'})
  98. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Updates', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/', u'http://mirror.centos.org/centos/$releasever/updates/$basearch/'], u'name': u'updates'})
  99. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'PostgreSQL 14 for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/14/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg14'})
  100. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - Extras', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/', u'http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/', u'http://mirror.centos.org/centos/$releasever/extras/$basearch/'], u'name': u'extras'})
  101. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'PostgreSQL common RPMs for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'http://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/common/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg-common'})
  102. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'TimescaleDB for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://packagecloud.io/timescale/timescaledb/el/7/$basearch'], u'name': u'timescaledb'})
  103. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'CentOS $releasever - epel', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/epel/$releasever/$basearch', u'http://mirrors.aliyun.com/epel/$releasever/$basearch', u'http://download.fedoraproject.org/pub/epel/$releasever/$basearch'], u'name': u'epel'})
  104. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/sclo/', u'name': u'centos-sclo'})
  105. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'PostgreSQL 14 for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/14/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg14'})
  106. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo rh', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/rh/', u'name': u'centos-sclo-rh'})
  107. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'enabled': True, u'description': u'Grafana', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm', u'https://packages.grafana.com/oss/rpm'], u'name': u'grafana'})
  108. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'TimescaleDB for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://packagecloud.io/timescale/timescaledb/el/7/$basearch'], u'name': u'timescaledb'})
  109. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'nginx', u'baseurl': u'http://nginx.org/packages/centos/$releasever/$basearch/', u'description': u'Nginx Official Yum Repo'})
  110. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'harbottle', u'baseurl': u'https://download.copr.fedorainfracloud.org/results/harbottle/main/epel-$releasever-$basearch/', u'description': u'Copr repo for main owned by harbottle'})
  111. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'Prometheus and exporters', u'baseurl': u'https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch', u'name': u'prometheus'})
  112. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/sclo/', u'name': u'centos-sclo'})
  113. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'pg_probackup', u'baseurl': u'https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/centos-$releasever-$basearch', u'description': u'PG_PROBACKUP Centos packages for PostgresPro Standard and Enterprise - $basearch'})
  114. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'PostgreSQL common RPMs for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'http://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/common/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg-common'})
  115. skipping: [10.10.10.13] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'docker-ce', u'baseurl': [u'https://mirrors.aliyun.com/docker-ce/linux/centos/$releasever/$basearch/stable', u'https://download.docker.com/linux/centos/$releasever/$basearch/stable'], u'description': u'Docker CE Stable - $basearch'})
  116. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo rh', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/rh/', u'name': u'centos-sclo-rh'})
  117. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'PostgreSQL 14 for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/yum/14/redhat/rhel-$releasever-$basearch', u'https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-$releasever-$basearch'], u'name': u'pgdg14'})
  118. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'nginx', u'baseurl': u'http://nginx.org/packages/centos/$releasever/$basearch/', u'description': u'Nginx Official Yum Repo'})
  119. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'TimescaleDB for RHEL/CentOS $releasever - $basearch', u'baseurl': [u'https://packagecloud.io/timescale/timescaledb/el/7/$basearch'], u'name': u'timescaledb'})
  120. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'harbottle', u'baseurl': u'https://download.copr.fedorainfracloud.org/results/harbottle/main/epel-$releasever-$basearch/', u'description': u'Copr repo for main owned by harbottle'})
  121. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/sclo/', u'name': u'centos-sclo'})
  122. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'pg_probackup', u'baseurl': u'https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/centos-$releasever-$basearch', u'description': u'PG_PROBACKUP Centos packages for PostgresPro Standard and Enterprise - $basearch'})
  123. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'description': u'CentOS-$releasever - SCLo rh', u'baseurl': u'http://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/rh/', u'name': u'centos-sclo-rh'})
  124. skipping: [10.10.10.11] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'docker-ce', u'baseurl': [u'https://mirrors.aliyun.com/docker-ce/linux/centos/$releasever/$basearch/stable', u'https://download.docker.com/linux/centos/$releasever/$basearch/stable'], u'description': u'Docker CE Stable - $basearch'})
  125. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'nginx', u'baseurl': u'http://nginx.org/packages/centos/$releasever/$basearch/', u'description': u'Nginx Official Yum Repo'})
  126. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'harbottle', u'baseurl': u'https://download.copr.fedorainfracloud.org/results/harbottle/main/epel-$releasever-$basearch/', u'description': u'Copr repo for main owned by harbottle'})
  127. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'pg_probackup', u'baseurl': u'https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/centos-$releasever-$basearch', u'description': u'PG_PROBACKUP Centos packages for PostgresPro Standard and Enterprise - $basearch'})
  128. skipping: [10.10.10.12] => (item={u'gpgcheck': False, u'skip_if_unavailable': True, u'name': u'docker-ce', u'baseurl': [u'https://mirrors.aliyun.com/docker-ce/linux/centos/$releasever/$basearch/stable', u'https://download.docker.com/linux/centos/$releasever/$basearch/stable'], u'description': u'Docker CE Stable - $basearch'})
  129. TASK [node : Install local repo] *********************************************************************
  130. changed: [10.10.10.12] => (item=http://pigsty/pigsty.repo)
  131. changed: [10.10.10.11] => (item=http://pigsty/pigsty.repo)
  132. changed: [10.10.10.13] => (item=http://pigsty/pigsty.repo)
  133. TASK [Install node basic packages] *******************************************************************
  134. skipping: [10.10.10.11] => (item=[])
  135. skipping: [10.10.10.13] => (item=[])
  136. skipping: [10.10.10.12] => (item=[])
  137. TASK [Install node extra packages] *******************************************************************
  138. TASK [node : Install meta specific packages] *********************************************************
  139. skipping: [10.10.10.11] => (item=[])
  140. skipping: [10.10.10.13] => (item=[])
  141. skipping: [10.10.10.12] => (item=[])
  142. TASK [Install node basic packages] *******************************************************************
  143. changed: [10.10.10.11] => (item=[u'wget,sshpass,ntp,chrony,tuned,uuid,lz4,make,patch,bash,lsof,wget,unzip,git,ftp,vim-minimal,ca-certificates', u'numactl,grubby,sysstat,dstat,iotop,bind-utils,net-tools,tcpdump,socat,ipvsadm,telnet,tuned,nc,pv,jq,perf', u'readline,zlib,openssl,openssl-libs,openssh-clients,python3,python36-requests,node_exporter,consul,etcd,promtail'])
  144. changed: [10.10.10.12] => (item=[u'wget,sshpass,ntp,chrony,tuned,uuid,lz4,make,patch,bash,lsof,wget,unzip,git,ftp,vim-minimal,ca-certificates', u'numactl,grubby,sysstat,dstat,iotop,bind-utils,net-tools,tcpdump,socat,ipvsadm,telnet,tuned,nc,pv,jq,perf', u'readline,zlib,openssl,openssl-libs,openssh-clients,python3,python36-requests,node_exporter,consul,etcd,promtail'])
  145. changed: [10.10.10.13] => (item=[u'wget,sshpass,ntp,chrony,tuned,uuid,lz4,make,patch,bash,lsof,wget,unzip,git,ftp,vim-minimal,ca-certificates', u'numactl,grubby,sysstat,dstat,iotop,bind-utils,net-tools,tcpdump,socat,ipvsadm,telnet,tuned,nc,pv,jq,perf', u'readline,zlib,openssl,openssl-libs,openssh-clients,python3,python36-requests,node_exporter,consul,etcd,promtail'])
  146. TASK [Install node extra packages] *******************************************************************
  147. TASK [node : Install meta specific packages] *********************************************************
  148. skipping: [10.10.10.11] => (item=[])
  149. skipping: [10.10.10.13] => (item=[])
  150. skipping: [10.10.10.12] => (item=[])
  151. TASK [Install pip3 packages on meta node] ************************************************************
  152. skipping: [10.10.10.11]
  153. skipping: [10.10.10.13]
  154. skipping: [10.10.10.12]
  155. TASK [node : Node configure disable numa] ************************************************************
  156. skipping: [10.10.10.11]
  157. skipping: [10.10.10.13]
  158. skipping: [10.10.10.12]
  159. TASK [node : Node configure disable swap] ************************************************************
  160. skipping: [10.10.10.11]
  161. skipping: [10.10.10.13]
  162. skipping: [10.10.10.12]
  163. TASK [node : Node configure unmount swap] ************************************************************
  164. skipping: [10.10.10.11] => (item=swap)
  165. skipping: [10.10.10.11] => (item=none)
  166. skipping: [10.10.10.13] => (item=swap)
  167. skipping: [10.10.10.12] => (item=swap)
  168. skipping: [10.10.10.12] => (item=none)
  169. skipping: [10.10.10.13] => (item=none)
  170. TASK [node : Node setup static network] **************************************************************
  171. changed: [10.10.10.11]
  172. changed: [10.10.10.13]
  173. changed: [10.10.10.12]
  174. TASK [node : Node configure disable firewall] ********************************************************
  175. changed: [10.10.10.11]
  176. changed: [10.10.10.13]
  177. changed: [10.10.10.12]
  178. TASK [node : Node configure disk prefetch] ***********************************************************
  179. skipping: [10.10.10.11]
  180. skipping: [10.10.10.13]
  181. skipping: [10.10.10.12]
  182. TASK [node : Enable linux kernel modules] ************************************************************
  183. changed: [10.10.10.11] => (item=softdog)
  184. changed: [10.10.10.12] => (item=softdog)
  185. changed: [10.10.10.13] => (item=softdog)
  186. changed: [10.10.10.11] => (item=br_netfilter)
  187. changed: [10.10.10.13] => (item=br_netfilter)
  188. changed: [10.10.10.12] => (item=br_netfilter)
  189. changed: [10.10.10.11] => (item=ip_vs)
  190. changed: [10.10.10.13] => (item=ip_vs)
  191. changed: [10.10.10.12] => (item=ip_vs)
  192. changed: [10.10.10.13] => (item=ip_vs_rr)
  193. changed: [10.10.10.11] => (item=ip_vs_rr)
  194. changed: [10.10.10.12] => (item=ip_vs_rr)
  195. ok: [10.10.10.13] => (item=ip_vs_rr)
  196. ok: [10.10.10.11] => (item=ip_vs_rr)
  197. ok: [10.10.10.12] => (item=ip_vs_rr)
  198. changed: [10.10.10.13] => (item=ip_vs_wrr)
  199. changed: [10.10.10.11] => (item=ip_vs_wrr)
  200. changed: [10.10.10.12] => (item=ip_vs_wrr)
  201. changed: [10.10.10.13] => (item=ip_vs_sh)
  202. changed: [10.10.10.11] => (item=ip_vs_sh)
  203. changed: [10.10.10.12] => (item=ip_vs_sh)
  204. TASK [node : Enable kernel module on reboot] *********************************************************
  205. changed: [10.10.10.11]
  206. changed: [10.10.10.12]
  207. changed: [10.10.10.13]
  208. TASK [node : Get config parameter page count] ********************************************************
  209. changed: [10.10.10.11]
  210. changed: [10.10.10.13]
  211. changed: [10.10.10.12]
  212. TASK [node : Get config parameter page size] *********************************************************
  213. changed: [10.10.10.11]
  214. changed: [10.10.10.12]
  215. changed: [10.10.10.13]
  216. TASK [node : Tune shmmax and shmall via mem] *********************************************************
  217. skipping: [10.10.10.11]
  218. skipping: [10.10.10.13]
  219. skipping: [10.10.10.12]
  220. TASK [node : Create tuned profiles] ******************************************************************
  221. changed: [10.10.10.12] => (item=oltp)
  222. changed: [10.10.10.13] => (item=oltp)
  223. changed: [10.10.10.11] => (item=oltp)
  224. changed: [10.10.10.12] => (item=olap)
  225. changed: [10.10.10.13] => (item=olap)
  226. changed: [10.10.10.11] => (item=olap)
  227. changed: [10.10.10.13] => (item=crit)
  228. changed: [10.10.10.11] => (item=crit)
  229. changed: [10.10.10.12] => (item=crit)
  230. changed: [10.10.10.13] => (item=tiny)
  231. changed: [10.10.10.12] => (item=tiny)
  232. changed: [10.10.10.11] => (item=tiny)
  233. TASK [node : Render tuned profiles] ******************************************************************
  234. changed: [10.10.10.11] => (item=oltp)
  235. changed: [10.10.10.12] => (item=oltp)
  236. changed: [10.10.10.13] => (item=oltp)
  237. changed: [10.10.10.13] => (item=olap)
  238. changed: [10.10.10.11] => (item=olap)
  239. changed: [10.10.10.12] => (item=olap)
  240. changed: [10.10.10.13] => (item=crit)
  241. changed: [10.10.10.11] => (item=crit)
  242. changed: [10.10.10.12] => (item=crit)
  243. changed: [10.10.10.11] => (item=tiny)
  244. changed: [10.10.10.12] => (item=tiny)
  245. changed: [10.10.10.13] => (item=tiny)
  246. TASK [node : Active tuned profile] *******************************************************************
  247. changed: [10.10.10.12]
  248. changed: [10.10.10.11]
  249. changed: [10.10.10.13]
  250. TASK [node : Change additional sysctl params] ********************************************************
  251. TASK [node : Copy default user bash profile] *********************************************************
  252. changed: [10.10.10.11]
  253. changed: [10.10.10.13]
  254. changed: [10.10.10.12]
  255. TASK [Setup node default pam ulimits] ****************************************************************
  256. changed: [10.10.10.11]
  257. changed: [10.10.10.13]
  258. changed: [10.10.10.12]
  259. TASK [Create node data dir if exists] ****************************************************************
  260. changed: [10.10.10.13]
  261. changed: [10.10.10.12]
  262. changed: [10.10.10.11]
  263. TASK [node : Create os user group admin] *************************************************************
  264. changed: [10.10.10.11]
  265. changed: [10.10.10.12]
  266. changed: [10.10.10.13]
  267. TASK [node : Create os user admin] *******************************************************************
  268. changed: [10.10.10.11]
  269. changed: [10.10.10.13]
  270. changed: [10.10.10.12]
  271. TASK [node : Grant admin group nopass sudo] **********************************************************
  272. changed: [10.10.10.11]
  273. changed: [10.10.10.12]
  274. changed: [10.10.10.13]
  275. TASK [node : Add no host checking to ssh config] *****************************************************
  276. changed: [10.10.10.12]
  277. changed: [10.10.10.11]
  278. changed: [10.10.10.13]
  279. TASK [node : Add admin ssh no host checking] *********************************************************
  280. ok: [10.10.10.11]
  281. ok: [10.10.10.13]
  282. ok: [10.10.10.12]
  283. TASK [node : Fetch all admin public keys] ************************************************************
  284. changed: [10.10.10.11]
  285. changed: [10.10.10.13]
  286. changed: [10.10.10.12]
  287. TASK [node : Exchange all admin ssh keys] ************************************************************
  288. changed: [10.10.10.11 -> 10.10.10.11] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkTNwjSFHA06ZaMe+iQz0TRfKAEFqFYpynY/j39VsZyF1D0Yb5tmjxKQTbPM8BTvaFf8WHb5cgdnCkXe3h5JcBPRDWyyKiK7N/reCLwFGilPB1jMlvAS5FoRSlafcyz4GgoYUoB8qQ9Q9QXYpOFnHVWzpbB1zUo57DZbcSgy4BLVl6bwnotJPfI/5vPrq8u/DFYMkmJC3d/XSQUTlkcf1PW4HkJGT/MS8KLkVAbmVIwyubXKxPqb+f2cKAUemXrdTlMms+kKwkqGAMoCejTFojqziLbh+QRUOCGsZfT74U5hHzFYuaRIV+F+HEpWulskY1M2eVrMyT0Ybu9v7RQL6T ansible-generated on pg-test-1', u'10.10.10.11'])
  289. changed: [10.10.10.13 -> 10.10.10.11] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+JPJizHg8wpC71Qz930m7cOaALWXl/QfdCnccy19/xBVBkgLCe9zkUKtopNaRLzhiPKrchcq5bCHZhCqQH4tOwsM1QpXU8yWbILv3yOuxAtFD9Uvor7XJubb8COqWCnoE3zp3AOtD1I+PA5ukanyW4mQKsIOVZBkSxkN2J2BYhMiIQ27VpM9ecLXx0JKCwLWBx3Z0X96QL6D5pw13nMctZ81FvIopmzu6ZGcNm0tAKd/0lzKJA+jfAuxhxvfPhAO8QhH6s9OnYbfKTS1ttYhIN2qvurFeLjxebNMe01YujZb43vpErKm8F7X7Mr2IFqjwnXKuyB2aP12iNhJbGf4l ansible-generated on pg-test-3', u'10.10.10.11'])
  290. changed: [10.10.10.12 -> 10.10.10.11] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDedbpfcV5RWRXfZEApOTRBkdOqZtlAKcsLAdoOg+cvnRrXeOWhUpuga6WF4CMTEafJKB1HZL4WUW7bzX4YMIFC4FO+LaqV+Q+hrEbCQ44R6MKfuLncPutVZjrp0zr0v5zfX78qR9Qd/Sg6bRNQGICBM2BrH0z7ws6WPbzFUrTeOo+O6+JeKY+Tei9OydyZF/GooYsbU4X/sFE6bfdhyxjeiHR7o8zBM3LsCiFv1L6+lJK83Z7pqHwS/rQonO0nQDKbmsFL5in5fT4Hsw11NbTCUUTO2W/6qzCzlK3WwJFMr5GNi0D9f85ES1kqJlHyacMHGhYkq/AXDNIkTai+MnVl ansible-generated on pg-test-2', u'10.10.10.11'])
  291. changed: [10.10.10.11 -> 10.10.10.13] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkTNwjSFHA06ZaMe+iQz0TRfKAEFqFYpynY/j39VsZyF1D0Yb5tmjxKQTbPM8BTvaFf8WHb5cgdnCkXe3h5JcBPRDWyyKiK7N/reCLwFGilPB1jMlvAS5FoRSlafcyz4GgoYUoB8qQ9Q9QXYpOFnHVWzpbB1zUo57DZbcSgy4BLVl6bwnotJPfI/5vPrq8u/DFYMkmJC3d/XSQUTlkcf1PW4HkJGT/MS8KLkVAbmVIwyubXKxPqb+f2cKAUemXrdTlMms+kKwkqGAMoCejTFojqziLbh+QRUOCGsZfT74U5hHzFYuaRIV+F+HEpWulskY1M2eVrMyT0Ybu9v7RQL6T ansible-generated on pg-test-1', u'10.10.10.13'])
  292. changed: [10.10.10.13 -> 10.10.10.13] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+JPJizHg8wpC71Qz930m7cOaALWXl/QfdCnccy19/xBVBkgLCe9zkUKtopNaRLzhiPKrchcq5bCHZhCqQH4tOwsM1QpXU8yWbILv3yOuxAtFD9Uvor7XJubb8COqWCnoE3zp3AOtD1I+PA5ukanyW4mQKsIOVZBkSxkN2J2BYhMiIQ27VpM9ecLXx0JKCwLWBx3Z0X96QL6D5pw13nMctZ81FvIopmzu6ZGcNm0tAKd/0lzKJA+jfAuxhxvfPhAO8QhH6s9OnYbfKTS1ttYhIN2qvurFeLjxebNMe01YujZb43vpErKm8F7X7Mr2IFqjwnXKuyB2aP12iNhJbGf4l ansible-generated on pg-test-3', u'10.10.10.13'])
  293. changed: [10.10.10.12 -> 10.10.10.13] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDedbpfcV5RWRXfZEApOTRBkdOqZtlAKcsLAdoOg+cvnRrXeOWhUpuga6WF4CMTEafJKB1HZL4WUW7bzX4YMIFC4FO+LaqV+Q+hrEbCQ44R6MKfuLncPutVZjrp0zr0v5zfX78qR9Qd/Sg6bRNQGICBM2BrH0z7ws6WPbzFUrTeOo+O6+JeKY+Tei9OydyZF/GooYsbU4X/sFE6bfdhyxjeiHR7o8zBM3LsCiFv1L6+lJK83Z7pqHwS/rQonO0nQDKbmsFL5in5fT4Hsw11NbTCUUTO2W/6qzCzlK3WwJFMr5GNi0D9f85ES1kqJlHyacMHGhYkq/AXDNIkTai+MnVl ansible-generated on pg-test-2', u'10.10.10.13'])
  294. changed: [10.10.10.11 -> 10.10.10.12] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDkTNwjSFHA06ZaMe+iQz0TRfKAEFqFYpynY/j39VsZyF1D0Yb5tmjxKQTbPM8BTvaFf8WHb5cgdnCkXe3h5JcBPRDWyyKiK7N/reCLwFGilPB1jMlvAS5FoRSlafcyz4GgoYUoB8qQ9Q9QXYpOFnHVWzpbB1zUo57DZbcSgy4BLVl6bwnotJPfI/5vPrq8u/DFYMkmJC3d/XSQUTlkcf1PW4HkJGT/MS8KLkVAbmVIwyubXKxPqb+f2cKAUemXrdTlMms+kKwkqGAMoCejTFojqziLbh+QRUOCGsZfT74U5hHzFYuaRIV+F+HEpWulskY1M2eVrMyT0Ybu9v7RQL6T ansible-generated on pg-test-1', u'10.10.10.12'])
  295. changed: [10.10.10.13 -> 10.10.10.12] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+JPJizHg8wpC71Qz930m7cOaALWXl/QfdCnccy19/xBVBkgLCe9zkUKtopNaRLzhiPKrchcq5bCHZhCqQH4tOwsM1QpXU8yWbILv3yOuxAtFD9Uvor7XJubb8COqWCnoE3zp3AOtD1I+PA5ukanyW4mQKsIOVZBkSxkN2J2BYhMiIQ27VpM9ecLXx0JKCwLWBx3Z0X96QL6D5pw13nMctZ81FvIopmzu6ZGcNm0tAKd/0lzKJA+jfAuxhxvfPhAO8QhH6s9OnYbfKTS1ttYhIN2qvurFeLjxebNMe01YujZb43vpErKm8F7X7Mr2IFqjwnXKuyB2aP12iNhJbGf4l ansible-generated on pg-test-3', u'10.10.10.12'])
  296. changed: [10.10.10.12 -> 10.10.10.12] => (item=[u'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDedbpfcV5RWRXfZEApOTRBkdOqZtlAKcsLAdoOg+cvnRrXeOWhUpuga6WF4CMTEafJKB1HZL4WUW7bzX4YMIFC4FO+LaqV+Q+hrEbCQ44R6MKfuLncPutVZjrp0zr0v5zfX78qR9Qd/Sg6bRNQGICBM2BrH0z7ws6WPbzFUrTeOo+O6+JeKY+Tei9OydyZF/GooYsbU4X/sFE6bfdhyxjeiHR7o8zBM3LsCiFv1L6+lJK83Z7pqHwS/rQonO0nQDKbmsFL5in5fT4Hsw11NbTCUUTO2W/6qzCzlK3WwJFMr5GNi0D9f85ES1kqJlHyacMHGhYkq/AXDNIkTai+MnVl ansible-generated on pg-test-2', u'10.10.10.12'])
  297. TASK [node : Install public keys] ********************************************************************
  298. changed: [10.10.10.13] => (item=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7IMAMNavYtWwzAJajKqwdn3ar5BhvcwCnBTxxEkXhGlCO2vfgosSAQMEflfgvkiI5nM1HIFQ8KINlx1XLO7SdL5KdInG5LIJjAFh0pujS4kNCT9a5IGvSq1BrzGqhbEcwWYdju1ZPYBcJm/MG+JD0dYCh8vfrYB/cYMD0SOmNkQ== vagrant@pigsty.com)
  299. changed: [10.10.10.11] => (item=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7IMAMNavYtWwzAJajKqwdn3ar5BhvcwCnBTxxEkXhGlCO2vfgosSAQMEflfgvkiI5nM1HIFQ8KINlx1XLO7SdL5KdInG5LIJjAFh0pujS4kNCT9a5IGvSq1BrzGqhbEcwWYdju1ZPYBcJm/MG+JD0dYCh8vfrYB/cYMD0SOmNkQ== vagrant@pigsty.com)
  300. changed: [10.10.10.12] => (item=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7IMAMNavYtWwzAJajKqwdn3ar5BhvcwCnBTxxEkXhGlCO2vfgosSAQMEflfgvkiI5nM1HIFQ8KINlx1XLO7SdL5KdInG5LIJjAFh0pujS4kNCT9a5IGvSq1BrzGqhbEcwWYdju1ZPYBcJm/MG+JD0dYCh8vfrYB/cYMD0SOmNkQ== vagrant@pigsty.com)
  301. TASK [node : Install current public key] *************************************************************
  302. ok: [10.10.10.11]
  303. ok: [10.10.10.12]
  304. ok: [10.10.10.13]
  305. TASK [Setup default node timezone] *******************************************************************
  306. changed: [10.10.10.12]
  307. changed: [10.10.10.11]

pgsql(可选)

完成节点初始化后,使用 pgsql.yml 完成 pg-test 数据库集群的初始化:

nodes.yml

redis(可选)

您还可以使用 redis.yml 完成 Redis 数据库集群的初始化:

redis.yml

最后修改 2022-06-18: v1.5.1 (8de4142)