SaltStack高可用multi-master-第十三篇
multi-master官方介绍
As of Salt 0.16.0, the ability to connect minions to multiple masters has been made available. The multi-master system allows for redundancy of Salt masters and facilitates multiple points of communication out to minions. When using a multi-master setup, all masters are running hot, and any active master can be used to send commands out to the minions.
实验环境
node1 192.168.56.11 角色 salt-master salt-minon (环境前面的文章中已配置好)
node2 192.168.56.12 角色 salt-master salt-minon
说明因测试机器数量有限 ,2台服务器做Master也做Minion,当2个Master启动时候都要处于可用状态
步骤
一,在2个节点上面分别安装Master和Minion
[root@linux-node2 ~]# yum install salt-master salt-minion -y
二,在Minion配置文件中添加多master节点
[root@linux-node2 ~]# more /etc/salt/minion
...
# resolved, then the minion will fail to start.
master:
- 192.168.56.11
- 192.168.56.12
...
三,同步Master配置文件和状态文件
[root@linux-node1 srv]# scp /etc/salt/master 192.168.56.12:/etc/salt/
[root@linux-node1 srv]# scp -r /srv/salt/ 192.168.56.12:/srv/
四,同步Master秘钥对
[root@linux-node2 pki]# mkdir master -p && chmod master/ #在node2节点上创建master文件并修改权限
[root@linux-node1 master]# scp /etc/salt/pki/master/master.pem master.pub 192.168.56.12:/etc/salt/pki/master/ #在node1上面scp
五,重启Master和Minion服务节点,生效Master和Minion配置文件
[root@linux-node2 pki]# systemctl restart salt-minion
六,在node2的master节点重新接受一下Minion认证
[root@linux-node2 master]# salt-key #查看发送申请的minon id
Accepted Keys:
Denied Keys:
Unaccepted Keys:
linux-node1.example.com
linux-node2.example.com
Rejected Keys: [root@linux-node2 master]# salt-key -A #接受申请,下面输入Y
The following keys are going to be accepted:
Unaccepted Keys:
linux-node1.example.com
linux-node2.example.com
Proceed? [n/Y] Y
Key for minion linux-node1.example.com accepted.
Key for minion linux-node2.example.com accepted.
七,在2个Master节点执行命令都可以正常工作
[root@linux-node1 master]# salt '*' test.ping #node1 Master节点
linux-node1.example.com:
True
linux-node2.example.com:
True [root@linux-node2 master]# salt '*' test.ping #node2 Master节点
linux-node2.example.com:
True
linux-node1.example.com:
True
总结
1.Master配置文件要一样
2.Master file_root路径及状态文件要一样
3.Master 公钥和私钥要一样
4.修改Minion配置中指定Master为列表形式
5.Master接受的minion_id key要保持同步,增删保持一致
6.生产环境可以用nginx做多个master的api负载均衡
7.Master上的key要考虑安全性问题
8.生产环境的状态文件管理可以用git管理
9.还可以通过 failover配置多个multiple masters,相对复杂一些
附英文参考文档
https://www.unixhot.com/docs/saltstack/topics/tutorials/multimaster.html
SaltStack高可用multi-master-第十三篇的更多相关文章
- kubernetes高可用设计-master节点和kubectl
部署master 节点 上一遍是CA证书和etcd的部署,这一篇继续搭建k8s,废话不多说.开始部署. kubernetes master 节点包含的组件有: kube-apiserver kube- ...
- 想要彻底搞懂大厂是如何实现Redis高可用的?看这篇文章就够了!(1.2W字,建议收藏)
高可用HA(High Availability)是分布式系统架构设计中必须考虑的因素之一,它通常是指,通过设计减少系统不能提供服务的时间. 假设系统一直能够提供服务,我们说系统的可用性是100%.如果 ...
- 3 saltstack高可用
高可用 如果我们依赖于saltmaster管理服务器,那么就需要对saltmaster做好高可用.那么saltstack-master怎么做高可用呢? 可以参考官网1,官网2 机器配置: 我们有两台机 ...
- Redis(九)高可用专栏之《简介篇》
在互联网的大趋势下,用户体验.服务的可用性日趋重要.任何一个服务的不可用,都可能导致连锁式功能故障. 前言 高可用模型的已经逐渐形成一种套路: 主备/主从模式 集群模式 主备/主从模式 至少有两台服务 ...
- 高可用Hadoop平台-答疑篇
1.概述 这篇博客不涉及到具体的编码,只是解答最近一些朋友心中的疑惑.最近,一些朋友和网友纷纷私密我,我总结了一下,疑问大致包含以下几点: 我学 Hadoop 后能从事什么岗位? 在遇到问题,我该如何 ...
- centos7部署postgresql集群高可用 patroni + etcd 之patroni篇
实验环境:centos7.4纯净版 postgres版本: 9.6.15 etcd版本:3.3.11 patroni版本:1.6.0 patroni介绍可参考:https://github.com/z ...
- 安装k8s,高可用3 master安装脚本
每个在新集群里,记得更改三个节点的IP即可. 第一步还是要执行那个root脚本,准备好系统环境,安装好软件. 先安装在每个节点上使用docker安装好etcd.(sh script domain et ...
- Linux 高可用(HA)集群之keepalived详解
http://freeloda.blog.51cto.com/2033581/1280962 大纲 一.前言 二.Keepalived 详解 三.环境准备 四.LVS+Keepalived 实现高可用 ...
- RocketMQ源码 — 六、 RocketMQ高可用(1)
高可用究竟指的是什么?请参考:关于高可用的系统 RocketMQ做了以下的事情来保证系统的高可用 多master部署,防止单点故障 消息冗余(主从结构),防止消息丢失 故障恢复(本篇暂不讨论) 那么问 ...
随机推荐
- 解决SecureCRT连接linux终端中文显示乱码
现象如下: 原因: SecureCRT的字符集编码不是Linux的默认编码:UTF-8 解决办法: 1.在“选项”找到“会话选项” 2.选择“外观”,设置字符编码为“UTF-8” 3.确定后,继续在终 ...
- 启动原生Hadoop集群或伪分布环境
一:启动Hadoop 集群或伪分布安装成功之后,通过执行./sbin/start-all.sh启动Hadoop环境 通过jps命令查看当前启动进程是否正确~ [root@neusoft-master ...
- php 乘除法原理
w $wdays = ceil(($wmaxutime-$wminutime)/(24*3600)); $wdays = ceil(($wmaxutime-$wminutime)/243600); 二 ...
- 苏宁易购微信端 全页通过background单图
w单图,绕开了显示的兼容性. http://res.m.suning.com/project/JoinGo/intro.html http://res.m.suning.com/project/Joi ...
- HTTP Transaction Delays
w客户端.服务器超载 HTTP The Definitive Guide 与建立TCP连接以及传输请求和相应报文的时间相比,事务处理的时间是很短的.除非客户端或服务器超载或正在处理复杂的动态资源,否则 ...
- Yii框架2.0的 验证码
最近看了一个Yii的教程视频,是按1.1的版本讲的,我想用Yii2.0的框架也参考他的学习开发下,结果发现好多不一样的,现在就说说验证码的事 首先加入一个actions 做验证码图片的显示,实际事调用 ...
- Drainage Ditches---hdu1532(最大流, 模板)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1532 最大流模板题: EK:(复杂度为n*m*m); #include<stdio.h> ...
- 二叉树的先序、中序、后序和中序遍历——Java实现
package treeTraverse; /** * 定义一个树的结点类 */ public class Node { private int data; private Node leftChil ...
- 【Servlet】把文件写到Respond输出流里面供用户下载
本文区分于<[Jsp]把Java写到Respond输出流里面供用户下载>(点击打开链接)把原本该打印到控制台的内容,直接打印到一个文本文件txt中给用户下载. 实际上是<[Strut ...
- Service Receiver Activity 之间的通信
一.Activity与Service 1. 通过Intent,例子如下: Intent intent = new Intent(this, Myservice.class); // intent .p ...