代码拉取完成,页面将自动刷新
#!/usr/bin/env ansible-playbook
---
#==============================================================#
# File : infra.yml
# Desc : init pigsty infrastructure on infra nodes
# Ctime : 2021-01-19
# Mtime : 2023-02-20
# Path : infra.yml
# Author : Ruohang Feng ([email protected])
# License : AGPLv3
#==============================================================#
#--------------------------------------------------------------#
# create CA on files/pki/ca @ localhost [ca]
#--------------------------------------------------------------#
- name: CA
become: yes
hosts: localhost
gather_facts: no
tags: ca
roles: [{ role: ca }]
#--------------------------------------------------------------#
# install module `INFRA` and `NODE` on infra nodes
#--------------------------------------------------------------#
- name: INFRA
become: yes
hosts: infra
gather_facts: no
roles:
# id
- { role: node_id ,tags: id } # generate node & pgsql identity
# repo
- { role: repo ,tags: repo } # create local yum repo
# node-init
- { role: node ,tags: node } # prepare node for pigsty
- { role: haproxy ,tags: haproxy } # init haproxy if enabled
# infra
- { role: infra ,tags: infra } # setup infra components
# node-monitor
- { role: node_monitor ,tags: monitor } # init node exporter & promtail
#--------------------------------------------------------------#
# Tasks
#--------------------------------------------------------------#
# ca : create self-signed CA on localhost files/pki
# - ca_dir : create CA directory
# - ca_private : generate ca private key: files/pki/ca/ca.key
# - ca_cert : signing ca cert: files/pki/ca/ca.crt
#
# id : generate node identity
#
# repo : bootstrap a local yum repo from internet or offline packages
# - repo_dir : create repo directory
# - repo_check : check repo exists
# - repo_prepare : use existing repo if exists
# - repo_build : build repo from upstream if not exists
# - repo_upstream : handle upstream repo files in /etc/yum.repos.d
# - repo_remove : remove existing repo file if repo_remove == true
# - repo_add : add upstream repo files to /etc/yum.repos.d
# - repo_url_pkg : download packages from internet defined by repo_url_packages
# - repo_cache : make upstream yum cache with yum makecache
# - repo_boot_pkg : install bootstrap pkg such as createrepo_c,yum-utils,...
# - repo_pkg : download packages & dependencies from upstream repo
# - repo_create : create a local yum repo with createrepo_c & modifyrepo_c
# - repo_use : add newly built repo into /etc/yum.repos.d
# - repo_nginx : launch a nginx for repo if no nginx is serving
#
# node/haproxy/docker/monitor : setup infra node as a common node (check node.yml)
# - node_name, node_hosts, node_resolv, node_firewall, node_ca, node_repo, node_pkg
# - node_feature, node_kernel, node_tune, node_sysctl, node_profile, node_ulimit
# - node_data, node_admin, node_timezone, node_ntp, node_crontab, node_vip
# - haproxy_install, haproxy_config, haproxy_launch, haproxy_reload
# - docker_install, docker_admin, docker_config, docker_launch, docker_image
# - haproxy_register, node_exporter, node_register, promtail
#
# infra : setup infra components
# - infra_env : env_dir, env_pg, env_var
# - infra_pkg : infra_pkg_yum, infra_pkg_pip
# - infra_user : setup infra os user group
# - infra_cert : issue cert for infra components
# - dns : dns_config, dns_record, dns_launch
# - nginx : nginx_config, nginx_cert, nginx_static, nginx_launch, nginx_exporter
# - prometheus : prometheus_clean, prometheus_dir, prometheus_config, prometheus_launch, prometheus_reload
# - alertmanager : alertmanager_config, alertmanager_launch
# - pushgateway : pushgateway_config, pushgateway_launch
# - blackbox : blackbox_config, blackbox_launch
# - grafana : grafana_clean, grafana_config, grafana_plugin, grafana_launch, grafana_provision
# - loki : loki clean, loki_dir, loki_config, loki_launch
# - infra_register : register infra components to prometheus
#--------------------------------------------------------------#
...
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。