1、新增节点信息

  增加节点如下,请将xxx改为自己的域名

node6.xxx.net

Node

192.168.8.90

8G

20G/60G

4C

node7.xxx.net

Node

192.168.8.91

8G

20G/60G

4C

2、基本配置

  关闭Firewalld

[root@node6 ~]# systemctl stop firewalld
[root@node6 ~]# systemctl disabled firewalld
Unknown operation 'disabled'.
[root@node6 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

  更改所有节点hosts

192.168.10.110 master1.xxx.net
192.168.10.112 node1.xxx.net
192.168.10.113 node2.xxx.net
192.168.10.116 node3.xxx.net
192.168.10.114 node4.xxx.net
192.168.10.117 node5.xxx.net
192.168.10.109 etcd1.xxx.net
192.168.10.111 etcd2.xxx.net
192.168.10.115 etcd3.xxx.net
192.168.8.90 node6.xxx.net
192.168.8.91 node7.xxx.net

  Master1节点SSH互信

[root@master1 ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:yFOKV/QRdQoxQ12uW8v0UWmpLcrxDQo8VNyVEuRWHlE root@master1.xxx.net
The key's randomart image is:
+---[RSA ]----+
| ..X*++==E|
| . ..*o*o.+|
| o.. .oo=.|
| o =o ..+ .|
| . * S+ ..+oo |
| . . + ==+o.|
| +..o..|
| |
| |
+----[SHA256]-----+ for i in node6.xxx.net node7.xxx.net;do ssh-copy-id -i ~/.ssh/id_rsa.pub $i;done

  所有节点更改时区并同步时间

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate time.windows.com

  所有节点安装基本环境

yum install wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct vim -y

  # 剩余步骤与之前一致,参考上一篇文档

  master1更改/etc/ansible/hosts

# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd
new_nodes
#lb
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
ansible_become=yes
debug_level=
openshift_deployment_type=origin
# If ansible_ssh_user is not root, ansible_become must be set to true
#ansible_become=true
openshift_repos_enable_testing=true
openshift_enable_service_catalog=false
template_service_broker_install=false
# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_disable_check=disk_availability,docker_storage,memory_availability,docker_image_availability,package_version
# config for metrics
openshift_release=3.6.
openshift_metrics_install_metrics=true
openshift_metrics_cassandra_storage_type=emptydir
openshift_metrics_hawkular_hostname=metrics.xxx.net
openshift_clock_enabled=true
#openshift_master_cluster_method=native
#openshift_master_cluster_hostname=openshift.xxx.net
#openshift_master_cluster_public_hostname=openshift.xxx.net
#openshift_node_kubelet_args={'pods-per-core': [''], 'max-pods': [''], 'image-gc-high-threshold': [''], 'image-gc-low-threshold': ['']}
# host group for masters
[masters]
master1.xxx.net
#master2.xxx.net # host group for lb
#[lb]
#lb.xxx.net # host group for etcd
[etcd]
etcd1.xxx.net
etcd2.xxx.net
etcd3.xxx.net
# host group for nodes, includes region info
[nodes]
master1.xxx.net
#master2.xxx.net
node1.xxx.net openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node2.xxx.net openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node3.xxx.net openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node4.xxx.net
node5.xxx.net
#
[new_nodes]
node6.xxx.net openshift_node_labels="{'region': 'subnet8', 'zone': 'default'}"
node7.xxx.net openshift_node_labels="{'region': 'subnet8', 'zone': 'default'}"

3、安装 

  执行安装:

ansible-playbook -i /etc/ansible/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-node/scaleup.yml

  安装完成后,新加节点修改docker配置/etc/sysconfig/docker

OPTIONS=' --selinux-enabled  --log-driver=journald --registry-mirror=https://docker.mirrors.ustc.edu.cn --insecure-registry=172.30.0.0/16 --insecure-registry 192.168.10.110:5000'

4、其他组件

  其他组件如etcd、master节点扩容类似,参考文档:https://docs.openshift.org/3.6/install_config/adding_hosts_to_existing_cluster.html

OpenShift实战(二):OpenShift节点扩容的更多相关文章

  1. kubernetes实战(二十八):Kubernetes一键式资源管理平台Ratel安装及使用

    1. Ratel是什么? Ratel是一个Kubernetes资源平台,基于管理Kubernetes的资源开发,可以管理Kubernetes的Deployment.DaemonSet.Stateful ...

  2. etcd安全集群三节点扩容至四个节点

    规划:先安装三台组建集群,然后扩容一个安全节点进来 .环境: 三台centos7. 主机 192.168.0.91 192.168.0.92 192.168.0.93 都关闭防火墙 都关闭selinu ...

  3. coreseek实战(二):windows下mysql数据源部分配置说明

    coreseek实战(二):windows下mysql数据源部分配置说明 关于coreseek在windows使用mysql数据源的配置,以及中文分词的详细说明,请参考官方文档: mysql数据源配置 ...

  4. 【NFS项目实战二】NFS共享数据的时时同步推送备份

    [NFS项目实战二]NFS共享数据的时时同步推送备份 标签(空格分隔): Linux服务搭建-陈思齐 ---本教学笔记是本人学习和工作生涯中的摘记整理而成,此为初稿(尚有诸多不完善之处),为原创作品, ...

  5. chrome调试工具高级不完整使用指南(实战二)

    3.3 给页面添加测试脚本 在现实的工作中,我们往往会遇到一些问题在线上就会触发然后本地就触发不了的问题.或者是,要给某个元素写一个测试脚本.这个时候如果是浏览器有提供一个添加脚本的功能的话,那么我们 ...

  6. Mycat 分片规则详解--数据迁移及节点扩容

    使用的是 Mycat 提供的 dataMigrate 脚本进行对数据进行迁移和节点扩容,目前支持的 Mycat 是1.6 版本,由于 Mycat 是由 Java 编写的因此在做数据迁移及节点扩容时需要 ...

  7. Python爬虫实战二之爬取百度贴吧帖子

    大家好,上次我们实验了爬取了糗事百科的段子,那么这次我们来尝试一下爬取百度贴吧的帖子.与上一篇不同的是,这次我们需要用到文件的相关操作. 前言 亲爱的们,教程比较旧了,百度贴吧页面可能改版,可能代码不 ...

  8. 转 Python爬虫实战二之爬取百度贴吧帖子

    静觅 » Python爬虫实战二之爬取百度贴吧帖子 大家好,上次我们实验了爬取了糗事百科的段子,那么这次我们来尝试一下爬取百度贴吧的帖子.与上一篇不同的是,这次我们需要用到文件的相关操作. 本篇目标 ...

  9. Netty 仿QQ聊天室 (实战二)

    Netty 聊天器(百万级流量实战二):仿QQ客户端 疯狂创客圈 Java 分布式聊天室[ 亿级流量]实战系列之15 [博客园 总入口 ] 源码IDEA工程获取链接:Java 聊天室 实战 源码 写在 ...

随机推荐

  1. 内嵌tomcat启动速度慢

    项目上最近要把内置的jetty换成tomcat, 来更好的支持servlet 3.0 本来以为换个容器, 几十行代码就好了. 实际上换了tomcat后, 一开始启动tomcat, 非常的慢. jett ...

  2. Windows Live Writer 2014版绿色版制作及主题获取

    前年才建好博客的时候就尝试用Windows Live Writer(WLW)写博客,用的是直接在网上找到的一个WLW 2009绿色美化版.但因为当时WLW获取的博客主题是主页的,预览的时候特别不爽,就 ...

  3. 《深入理解Bootstrap》读书笔记(一)

    栅格系统 实现原理 通过定义容器大小,平分12份,再调整内外边距,最后结合媒体查询. 通过一系列包含内容的行和列来创建页面布局.下面列出了 Bootstrap 栅格系统是如何工作的: 1.行必须放置在 ...

  4. java中断

    理解java中断 Java中断机制是一种协作机制,即通过中断并不能直接终止另一个线程,而需要被中断的线程自己处理中断.例如,当线程t1想中断线程t2,只需要在线程t1中将线程t2对象的中断标识置为tr ...

  5. ES6之promise的使用

    let checkLogin = function () { return new Promise(function (resolve,reject) { let flag = document.co ...

  6. Cloudera Manager及CDH最新版本安装全程记录

    大家都知道,Apache Hadoop的配置很繁琐,而且很零散,为此Cloudera公司提供了Clouder Manager工具,而且还封装了Apache Hadoop,flume,spark,hiv ...

  7. 【吐槽向】iOS 中的仿射变换

    什么是仿射变换矩阵 CGAffineTransform 实际上就是一个用于绘制 2D 图形的的仿射变换矩阵.仿射变换矩阵用于旋转.缩放.平移.扭曲(skew)在图形上下文中绘制的对象.CGAffine ...

  8. Java 缩写总结

    1.JVM:Java Virtual Machine(Java虚拟机)的缩写. 它是一个虚构出来的计算机,是通过在实际的计算机上仿真模拟各种计算机功能来实现的. Java语言的一个非常重要的特点就是与 ...

  9. 使用 win10 的正确姿势

    17年9月初,写了第一篇<使用 win10 的正确姿势>,而现在半年多过去,觉得文章得更新一些了,索性直接来个第二版吧. -----2018.3.24 写 一. 重新定义桌面 我的桌面: ...

  10. MyBatis报错:Caused by: java.lang.NumberFormatException: For input string: "XX"

    <select id="sltTreatment" resultType="com.vitaminmd.sunny.core.bo.Treatment"& ...