环境准备
操作系统要求:centos8.x
Libc 要求
ls -l /lib64/libc.so.6
"""
/lib64/libc.so.6 -> libc-2.28.so
"""
确定主运行 IP,所有 Ansible 部署操作都将在主运行 IP 上执行。在本例中,主运行 IP 为 172.20.3.200。
为非 sudo 用户设置无密码 sudo 登录
如果每台机器的密码都相同,并且在清单/主机中使用了根用户名和密码,则不需要此步骤。
vim /etc/sudoers
"""
dingo ALL=(ALL) NOPASSWD:ALL
"""
使用 IP 地址无密码登录
如果每台机器的密码相同,并且在清单/主机中使用了根用户名和密码,则无需执行以下步骤。
生成 SSH 公钥和私钥
ssh-keygen -f ~/.ssh/id_rsa -N '' -t rsa -q -b 2048
将公钥复制到所有主机节点,包括本地节点
ssh-copy-id root@ip
ssh-copy-id root@ip
ssh-copy-id root@ip
测试无密码登录是否成功
ssh root@ip
目录结构规划
目录类型 |
路径 |
|---|---|
程序安装路径 |
${installer_root_path} |
数据路径 |
${installer_root_path}/data |
日志路径 |
${installer_root_path}/log |
dingo-store 脚本路径 |
${installer_root_path}/dingo-store/scripts |
dingo-store 部署路径 |
${installer_root_path}/dingo-store/dist |
用户组规划
部署方法 |
用户名称 |
群组名称 |
|---|---|---|
ansible 部署 |
dingodb |
dingodb |
组件清单和端口使用情况
组件 |
版本 |
Port |
备注 |
|---|---|---|---|
DingoDB |
0.6.0 |
raft:22101/20101 |
实时分析数据库 |
Prometheus |
2.14.0 |
19115 |
实时分析数据库时间序列数据库,指标监测 |
节点输出器 |
0.18.1 |
19100 |
监视节点信息的 Prometheus 组件 |
进程输出 |
0.7.10 |
19090 |
Prometheus 组件,监控进程信息 |
grafana |
8.3.3 |
3000 |
数据可视化平台 |
Ansible 安装
在线安装
#Ensure that Python environment is installed on each machine using Python 3
#Install Ansible on the main IP, if it is not already installed.
pip3 install pip -U
pip3 install ansible==2.9.27 # Install with fixed version number, non-mandatory
pip3 install pyopenssl -U
脱机安装
# Preparation of files:
wget -r -nH http://ip:9000 # Download all required package files with one click
ansible_installer_centos8.sh Place the files separately and proceed with Ansible installation
Place other files in the deployment package dingo-deploy/artifacts directory
# Installing Ansible requires root user
bash ansible_installer_centos8.sh # This needs to be executed on all three machines to ensure that the path to Python 3 is consistent on each machine
#Note to modify inventory/hosts before deployment
ansible_python_interpreter=/usr/local/miniconda3/bin/python
# Replace all Ansible and Python commands below with full path, for example:
/usr/local/miniconda3/bin/ansible-playbook playbook.yml