OpenShift实战(二):OpenShift节点扩容
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节点扩容的更多相关文章
- kubernetes实战(二十八):Kubernetes一键式资源管理平台Ratel安装及使用
1. Ratel是什么? Ratel是一个Kubernetes资源平台,基于管理Kubernetes的资源开发,可以管理Kubernetes的Deployment.DaemonSet.Stateful ...
- etcd安全集群三节点扩容至四个节点
规划:先安装三台组建集群,然后扩容一个安全节点进来 .环境: 三台centos7. 主机 192.168.0.91 192.168.0.92 192.168.0.93 都关闭防火墙 都关闭selinu ...
- coreseek实战(二):windows下mysql数据源部分配置说明
coreseek实战(二):windows下mysql数据源部分配置说明 关于coreseek在windows使用mysql数据源的配置,以及中文分词的详细说明,请参考官方文档: mysql数据源配置 ...
- 【NFS项目实战二】NFS共享数据的时时同步推送备份
[NFS项目实战二]NFS共享数据的时时同步推送备份 标签(空格分隔): Linux服务搭建-陈思齐 ---本教学笔记是本人学习和工作生涯中的摘记整理而成,此为初稿(尚有诸多不完善之处),为原创作品, ...
- chrome调试工具高级不完整使用指南(实战二)
3.3 给页面添加测试脚本 在现实的工作中,我们往往会遇到一些问题在线上就会触发然后本地就触发不了的问题.或者是,要给某个元素写一个测试脚本.这个时候如果是浏览器有提供一个添加脚本的功能的话,那么我们 ...
- Mycat 分片规则详解--数据迁移及节点扩容
使用的是 Mycat 提供的 dataMigrate 脚本进行对数据进行迁移和节点扩容,目前支持的 Mycat 是1.6 版本,由于 Mycat 是由 Java 编写的因此在做数据迁移及节点扩容时需要 ...
- Python爬虫实战二之爬取百度贴吧帖子
大家好,上次我们实验了爬取了糗事百科的段子,那么这次我们来尝试一下爬取百度贴吧的帖子.与上一篇不同的是,这次我们需要用到文件的相关操作. 前言 亲爱的们,教程比较旧了,百度贴吧页面可能改版,可能代码不 ...
- 转 Python爬虫实战二之爬取百度贴吧帖子
静觅 » Python爬虫实战二之爬取百度贴吧帖子 大家好,上次我们实验了爬取了糗事百科的段子,那么这次我们来尝试一下爬取百度贴吧的帖子.与上一篇不同的是,这次我们需要用到文件的相关操作. 本篇目标 ...
- Netty 仿QQ聊天室 (实战二)
Netty 聊天器(百万级流量实战二):仿QQ客户端 疯狂创客圈 Java 分布式聊天室[ 亿级流量]实战系列之15 [博客园 总入口 ] 源码IDEA工程获取链接:Java 聊天室 实战 源码 写在 ...
随机推荐
- oracle sql model从句demo
model从句作用 sql model可以完成像EXCEL工作表的数据内容扩展.计算填充的功能 关键词解释 partition 分区关键词,白话就是分组 dimension 度量关键词,白话就是要取出 ...
- 浅析JavaScript的prototype
一.JavaScript对象的创建 (1)对象方法 function Student(name){ this.name=name; this.showName=function(){ alert(&q ...
- es6学习笔记--新数据类型Symbol
学习了es6语法的symbol类型,整理笔记,闲时复习. Symbol 是es6新增的第七种原始数据类型(null,string,number,undefined,boolean,object),是为 ...
- threejs - uv 映射 简要
啥也不说先上way+code+demo; https://github.com/Thinkia/threejs_/blob/master/test/test2-%20uv/readme.md 如何理解 ...
- 【Linux】 文本比较工具 diff和cmp
Linux 文本比较工具 ■ diff命令 diff用于逐行比较两个文本文件,列出其不同之处 diff [option] <file1> <file2> file1和file2 ...
- 如何在IOS上调试Hybrid应用
最近在找关于在xcode上调试Hybrid应用的方法,比如我想进行断点调试.日志打印.屏幕适配等等,刻意去搜了下方法,虽然之前已经大致知道了,这里系统归纳一下,原文在https://developer ...
- Matlab绘图基础——绘制等高线图
% 等高线矩阵的获取 C = contourc(peaks(20),3); % 获取3个等级的等高线矩阵 % 等高线图形的绘制 contour(peaks(20),10);c ...
- 使用cocopod管理第三方
扭捏了两年多一直不愿意使用cocopod来管理第三方,一直感觉直接拖拽第三方就挺方便的,直到今天使用第三方库WebViewJavascriptBridge,拖拽一直有问题,不得已研究.使用了cocop ...
- 以太坊开发DApp实战教程——用区块链、星际文件系统(IPFS)、Node.js和MongoDB来构建电商平台(一)
第一节 简介 欢迎和我们一起来用以太坊开发构建一个去中心化电商DApp!我们将用区块链.星际文件系统(IPFS).Node.js和MongoDB来构建电商平台类似淘宝的在线电商应用,卖家可以自由地出售 ...
- spring MVC 原理及源码解析
首先要知道springmvc的核心控制器dispatcherServlet(继承自httpServlet) 一般httpServlet的请求过程: 1.初始化(创建servlet实例时)时会执行ser ...