Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request #3 from VoiceAddrBook/revert-2-master #4

Open
wants to merge 608 commits into
base: revert-2-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
608 commits
Select commit Hold shift + click to select a range
c53b411
移除08.cluster-storage.yml
lusyoe Jul 25, 2018
4318da1
Merge branch 'dev' of https://github.com/gjmzj/kubeasz into dev
lusyoe Jul 25, 2018
f239533
Merge branch 'storage' into dev
lusyoe Jul 25, 2018
3876c90
修改storage yml语法问题
lusyoe Jul 25, 2018
88a150e
移除示例中的storage变量
lusyoe Jul 25, 2018
f25c910
更新自定义配置工具脚本
gjmzj Jul 26, 2018
93e041c
增加centos7关闭Selinux,Firewalld,swap交换内存 (#270)
Jul 26, 2018
c1719b7
禁止节点使用系统swap
gjmzj Jul 26, 2018
d4a130a
Merge pull request #267 from lusyoe/dev
gjmzj Jul 26, 2018
72c31d8
kube-apiserver增加batch/v2alpha支持
Jul 27, 2018
6a12ba7
Merge branch 'dev' of https://github.com/Hello-Linux/kubeasz into dev
Jul 27, 2018
5976f61
调整nfs 动态存储相关脚本
gjmzj Jul 28, 2018
4cf1678
更新cluster-storage 相关
gjmzj Jul 28, 2018
51accb9
更新集群存储使用文档
gjmzj Jul 29, 2018
0b77078
Merge pull request #272 from Hello-Linux/dev
gjmzj Jul 29, 2018
5485971
fix 解压后的harbor安装文件没有执行权限问题
klgd Aug 2, 2018
befc656
fix: 解决Ubuntu 18.04无法安装haproxy、keepalived问题
yuyicai Aug 2, 2018
012c6d8
Merge pull request #276 from klgd/patch-1
gjmzj Aug 2, 2018
70bcf6e
Merge pull request #277 from yuyicai/dev
gjmzj Aug 2, 2018
a045dd1
Merge branch 'dev' of https://github.com/gjmzj/kubeasz into dev
gjmzj Aug 3, 2018
6686b6c
add network plugin: cilium
gjmzj Aug 5, 2018
be08287
支持deploy与ansible执行节点分离
lusyoe Aug 5, 2018
7119c70
优化storage结构,修复deploy节点分离nas部署失败
lusyoe Aug 5, 2018
b3a0e1b
优化storage,抽取tasks
lusyoe Aug 5, 2018
fb5557e
update docs
gjmzj Aug 10, 2018
30b6ebb
fix 兼容ansible执行节点与deploy节点分离
gjmzj Aug 11, 2018
7261653
update calico v3.1.3
gjmzj Aug 11, 2018
c7e4ac7
fix: cilium clean up
gjmzj Aug 11, 2018
e10b9e6
update kube-router v0.2.0-beta.9
gjmzj Aug 12, 2018
4cd887f
update offline images 0.3
gjmzj Aug 12, 2018
f2a75c6
增加docker 配置文件
gjmzj Aug 12, 2018
d1cdcaf
优化cluster-addon 安装脚本
gjmzj Aug 12, 2018
b246265
minor fix in .gitignore
gjmzj Aug 12, 2018
50862bc
调整storage变量,更新相关文档 (#285)
lusyoe Aug 12, 2018
3475121
kubeasz 0.3.0 release
gjmzj Aug 12, 2018
e1e4524
修复calicoctl配置;修复calico/node 跑在LB 主节点时使用IP地址错误
gjmzj Aug 14, 2018
0fb1f7d
fix 多lb节点配置文件格式错误 Issue #286
gjmzj Aug 14, 2018
ced4f34
fix2 多lb节点配置文件格式错误 Issue #286
gjmzj Aug 14, 2018
91812bb
fix3 多lb节点配置文件格式错误 Issue #286
gjmzj Aug 15, 2018
67ca82d
add chrony
gjmzj Aug 17, 2018
7054b57
fix add chrony
gjmzj Aug 17, 2018
20d5195
更新 chrony 相关文档
gjmzj Aug 18, 2018
f0bff40
update cilium docs
gjmzj Aug 19, 2018
e467d0a
更新cilium文档、滚动更新文档
gjmzj Aug 19, 2018
b6e7cce
Update 01-创建CA证书和环境配置.md
luyx30 Aug 18, 2018
2ebc31c
Update harbor.md
luyx30 Aug 21, 2018
0036c62
删除ansible hosts中自动生成的etcd 相关变量
gjmzj Aug 22, 2018
c911d2f
简化ansible hosts中 harbor变量配置
gjmzj Aug 23, 2018
8892cfc
更新harbor v1.5.2,优化安装流程允许连接已有harbor仓库
gjmzj Aug 26, 2018
b1256ad
跟新集群部署文档
aikin Aug 23, 2018
f90cc8a
增加ipvs依赖包和管理包
pennpeng Aug 24, 2018
1680235
fix jq安装错误,补充ipset和ipvsadm安装
gjmzj Aug 26, 2018
6232dc6
fix 清除单节点脚本
gjmzj Aug 28, 2018
a86bd89
fix 网络插件离线镜像不存在时安装的错误信息
gjmzj Aug 30, 2018
6c8b3d6
fix:当node多网卡时可以设置参数使flannel/calico正常运行
gjmzj Aug 30, 2018
520a33d
修改默认支持多网卡node节点的flannel和calico插件安装
gjmzj Aug 30, 2018
37bcbbf
fix 99.clean.yml不应该删除harbor相关
gjmzj Aug 31, 2018
36d1034
添加docker存储目录
lusyoe Aug 29, 2018
2b4d92a
添加kubelet根目录
lusyoe Aug 29, 2018
8f0f792
modify kubedns doc
Aug 30, 2018
9e41498
设置ulimits和拆分prepare任务
gjmzj Sep 2, 2018
3f85b6d
fix ulimit settings
gjmzj Sep 2, 2018
d0e6131
增加可选配置lb 节点负载转发ingress NodePort的功能
gjmzj Sep 3, 2018
713dd81
fix 多lb备节点时route_id重复问题
gjmzj Sep 5, 2018
1b03585
锁定jenkins镜像tag、升级插件版本以及锁定安全插件
Sep 5, 2018
3efa846
更新 dashboard 镜像版本: v1.10.0
klgd Sep 6, 2018
a580a55
update kube-router v0.2.0
gjmzj Sep 9, 2018
cdf778b
取消 Node节点 Bootstrap机制
gjmzj Sep 11, 2018
867cc21
更新集群升级操作说明及脚本
gjmzj Sep 11, 2018
e71b188
更新java war应用部署实践
gjmzj Sep 13, 2018
93b48a4
更新公有云部署文档
gjmzj Sep 14, 2018
c3bac29
kubeasz 0.3.1 release
gjmzj Sep 14, 2018
6b21f30
调整安装步骤中kubectl的执行以适合公有云部署
gjmzj Sep 15, 2018
5446544
minor changes in README.md
gjmzj Sep 15, 2018
b6d99ce
minor docs update
gjmzj Sep 17, 2018
57ace89
update ansible-os-hardening 5.0.0
gjmzj Sep 17, 2018
9ff1ffb
fix 增加master节点变量未定义报错
gjmzj Sep 18, 2018
df059f9
推送ansible执行节点的ssh密钥对至deploy节点
gjmzj Sep 18, 2018
6249aa2
fix 推送ansible执行节点的ssh密钥对至deploy节点,调整设置内核参数
gjmzj Sep 20, 2018
914b3c6
调整安装步骤中kubectl的执行以适合公有云部署2
gjmzj Sep 21, 2018
51b1003
调整网络插件安装中kubectl在deploy节点执行
gjmzj Sep 21, 2018
c366125
fix网络组件偶尔连不上svc kubernetes的错误
gjmzj Sep 21, 2018
c53768a
更新tools/change_k8s_network.yml
gjmzj Sep 25, 2018
8caa842
升级jenkins安全插件和k8s插件版本 (#325)
lusyoe Sep 25, 2018
eab1d62
translate playbooks comments into english -1
gjmzj Sep 29, 2018
9eeb3dd
update coredns 1.2.2
gjmzj Oct 1, 2018
64e3871
update metrics-server v0.3.1
gjmzj Oct 5, 2018
aa869e1
set kubelet authentication/authorization webhook
gjmzj Oct 6, 2018
deef038
update: promethus chart 7.1.4, grafana chart 1.16.0
gjmzj Oct 7, 2018
333b56c
fix: Ansible 2.7 环境下 提示 “[DEPRECATION WARNING]: Invoking "yum" only o…
klgd Oct 9, 2018
f483d7e
minor fix in 99.clean.yml
gjmzj Oct 11, 2018
53ccd81
update doc: kubeasz on public cloud
gjmzj Oct 12, 2018
e6edece
update setup docs
gjmzj Oct 12, 2018
681cf49
add docs: set up es-cluster on k8s
gjmzj Oct 12, 2018
56b2c8e
minor fix in docs
gjmzj Oct 13, 2018
6802913
fix: 在本地目录检查离线镜像下载情况
gjmzj Oct 14, 2018
c0b4c8d
update kube-dns 1.14.13, heapster v1.5.4
gjmzj Oct 14, 2018
2e700c7
update traefik 1.7.2
gjmzj Oct 14, 2018
bbf4dc8
安装chrony之前确保已卸载ntp
lusyoe Oct 12, 2018
69bad96
fix: install kube-proxy in ipvs mode on CentOS
gjmzj Oct 16, 2018
980cd7b
docs update, release 0.4.0
gjmzj Oct 16, 2018
79e2b10
minor fix README.md
gjmzj Oct 21, 2018
4a3637c
fix url in docs/setup/00-planning_and_overall_intro.md
gjmzj Oct 23, 2018
913a713
use metallb as LoadBalancer Provider
gjmzj Oct 28, 2018
0b347bf
add donate page
gjmzj Oct 28, 2018
461fe48
update donate page
gjmzj Oct 28, 2018
ad3c56f
update docs 'kubeasz_on_public_cloud.md'
gjmzj Oct 28, 2018
59396f5
yaml 文件有误
pingod Oct 28, 2018
845ee61
update doc 'metallb.md'
gjmzj Nov 2, 2018
f6a5c00
minor update doc README.md
gjmzj Nov 2, 2018
c381639
修改dashboard文档链接路径
pingod Nov 2, 2018
320887d
add script easzctl: cluster manage tool
gjmzj Nov 5, 2018
f4b8a01
更新基础离线镜像包0.4,同步至百度盘
gjmzj Nov 5, 2018
69001e8
fix 阿里云nas动态pv脚本
gjmzj Nov 6, 2018
877a21a
fix 更新离线镜像0.4适用于kubeasz 0.4
gjmzj Nov 7, 2018
b5cd458
支持master证书添加公网ip和域名
gjmzj Nov 7, 2018
43c48e0
升级jenkins-lts版本和插件版本
lusyoe Nov 5, 2018
313d111
fix 内核4.19加载nf_conntrack #366
gjmzj Nov 10, 2018
12b5b16
Update 04-install_kube_master.md
EamonZhang Nov 8, 2018
f241168
Update 07-install_cluster_addon.md
EamonZhang Nov 7, 2018
3829829
Update 99.clean.yml
EamonZhang Nov 7, 2018
8bf71b2
Create istio.md
EamonZhang Nov 12, 2018
c723dfa
添加istio安装说明
EamonZhang Nov 12, 2018
785acf8
Update istio.md
EamonZhang Nov 12, 2018
839a38f
update calico v3.2.4
gjmzj Nov 21, 2018
2efb33a
添加istio sidecar自动注入webhook
lusyoe Nov 19, 2018
5d068d5
fix NodePorts settings in Calico/node
gjmzj Nov 21, 2018
14ad6f2
increasing the conntrack table size in sysctl setting
gjmzj Nov 21, 2018
a71ddd2
update helm v2.11.0
gjmzj Nov 25, 2018
47a8049
取消helms别名
gjmzj Nov 25, 2018
f716e8a
取消手动设置LB_IF参数
gjmzj Nov 26, 2018
bad294b
增加dashboard只读权限SA
gjmzj Nov 27, 2018
d803579
增加只读权限kubeconfig脚本与文档
gjmzj Nov 27, 2018
96c7572
更新 dashboard 权限控制文档说明
gjmzj Nov 27, 2018
7515816
更新example文档
gjmzj Nov 27, 2018
b542542
增加修改APISERVER证书的脚本与文档
gjmzj Nov 28, 2018
43de866
更新生成kubeconfig脚本与文档
gjmzj Nov 30, 2018
989433e
增加https ingress的配置和文档
gjmzj Nov 30, 2018
68e7cdc
增加配置ingress nodeport 负载转发的脚本与文档
gjmzj Nov 30, 2018
ecf2ba1
minor fix in ingress docs
gjmzj Nov 30, 2018
61d8f03
更新升级集群相关脚本和文档
gjmzj Dec 6, 2018
41370a3
update traefik 1.7.4
gjmzj Dec 6, 2018
dfc14ab
kubeasz release 0.5.0
gjmzj Dec 6, 2018
c3033dc
添加helm tls环境变量
lusyoe Dec 4, 2018
0a57c13
移除 kube-node csr 请求批准部分
lixianyang Dec 6, 2018
30e123c
update coredns 1.2.6
gjmzj Dec 11, 2018
6fc755f
fix dashboard ingress配置: issue #403
gjmzj Dec 11, 2018
e818b92
fix 特定环境下lb节点变量LB_IF自动设置错误
gjmzj Dec 13, 2018
144b7ae
增加 nginx-ingress manifests
gjmzj Dec 19, 2018
21e6a48
fix traefik ingress 安装路径
gjmzj Dec 21, 2018
d6f04a9
更新cluster-addon部分可选自动安装nginx-ingress
gjmzj Dec 21, 2018
54e9eeb
fix: 等待ETCD同步完成,再返回成功
Dec 21, 2018
2802892
更新nginx-ingress manifests
gjmzj Dec 23, 2018
0b009d2
增加k8s dashboard 的ingress配置示例
gjmzj Dec 25, 2018
dcbfafc
更新calico 3.3.2,并保留3.2.4可选
gjmzj Jan 2, 2019
2c6023b
[FIX]修复创建证书和环境配置中超链接
Dec 25, 2018
c6e9cd8
[FIX]修复安装etcd集群文档中超链接
Dec 25, 2018
dbe58d0
[FIX]修复安装docker服务中超链接
Dec 25, 2018
b73d3db
[FIX]修复安装kube-master节点文档中超链接
Dec 25, 2018
e2fbe85
[FIX]修复安装kube-node节点中超链接
Jan 2, 2019
f289615
添加支持RedHat(only)
Jan 3, 2019
eb7ddd1
fix url in 'change_k8s_network.md'
gjmzj Jan 8, 2019
18c4620
增加calico设置route reflector文档
gjmzj Jan 10, 2019
a1be546
更新docker根目录存储命令
Jan 10, 2019
edd68c7
增加 pod-infra-container 可选择配置
gjmzj Jan 10, 2019
cf1822f
minor docs update
gjmzj Jan 11, 2019
44700b8
部分文档更新优化
gjmzj Jan 13, 2019
839a347
更新kube-schedule监听参数
Jan 14, 2019
802dd6c
kubeasz release 0.5.1
gjmzj Jan 15, 2019
26ce05d
minor docs update
gjmzj Jan 16, 2019
c5b1ff8
Update helm.md
j4ckzh0u Jan 14, 2019
a430bd6
Update helm.md
j4ckzh0u Jan 16, 2019
de67545
Merge branch 'master' of https://github.com/gjmzj/kubeasz
gjmzj Jan 16, 2019
0ae2b43
更新 gitlab 安装维护文档
gjmzj Jan 18, 2019
e6b7336
为兼容k8s版本 <= 1.11,revert PR #440
gjmzj Jan 18, 2019
407dbce
修改 traefik-controller 配置
gjmzj Jan 18, 2019
6f23fe4
更新gitlab-ci文档part1
gjmzj Jan 21, 2019
818fba4
更新gitlab-ci文档part2
gjmzj Jan 23, 2019
644747d
gitlab 文档更新
gjmzj Jan 23, 2019
7ab8fff
增加开机启动k8s相关内核模块配置
gjmzj Jan 24, 2019
b97f0cf
增加helm部署mariadb集群
gjmzj Jan 25, 2019
0dc014b
coredns add metrics port
Jan 24, 2019
5a1140f
calico add metrics ENV
Jan 24, 2019
9fd4c2f
calico_3.3.2 rbac 新增nodes/status
Jan 21, 2019
917e973
添加开启docker远程API
lusyoe Jan 18, 2019
957fc1f
调整docker远程API默认为关闭
lusyoe Jan 21, 2019
6ac413e
Merge branch 'dev' of https://github.com/gjmzj/kubeasz into dev
gjmzj Jan 25, 2019
999afbb
完善chrony文档
gjmzj Jan 26, 2019
f9d0a49
文档修复00-planning_and_overall_intro.md
gjmzj Jan 26, 2019
f39ec34
增加helm部署redis-ha集群
gjmzj Jan 30, 2019
8bb3b29
增加k8s官方mysql集群示意配置
gjmzj Jan 30, 2019
3699369
更新文档mariadb_cluster.md
gjmzj Jan 31, 2019
f19339d
调整prepare tasks,避免把证书和kubeconfig分发到不需要的节点
gjmzj Feb 1, 2019
ad3ea3e
更新 prometheus 告警发送钉钉配置和文档
gjmzj Feb 2, 2019
f28fc48
支持harbor 1.6.3,调整部分安装步骤
gjmzj Feb 5, 2019
06ef648
更新 harbor 安装流程和文档
gjmzj Feb 5, 2019
0e04736
增加可选附加负载均衡节点
gjmzj Feb 7, 2019
c54f229
minor changes in lb installing
gjmzj Feb 7, 2019
4898ae0
fixed: 修复清除iptables规则时,遇到关闭所有进入端口,无法连接节点
PowerDos Feb 9, 2019
d80404b
增加添加etcd节点脚本
gjmzj Feb 14, 2019
a417e84
增加etcd节点文档说明
gjmzj Feb 14, 2019
98e6623
更新example hosts
gjmzj Feb 15, 2019
81bb83b
优化增加node/增加master节点流程
gjmzj Feb 15, 2019
2cb94ff
update flannel v0.11.0-amd64
gjmzj Feb 15, 2019
6d544cc
更新支持 calico v3.4.x
gjmzj Feb 15, 2019
e895f7f
helm/kubedns文档更新
gjmzj Feb 15, 2019
7b82688
update helm v2.12.3
gjmzj Feb 16, 2019
9df8906
增加删除etcd节点脚本和文档
gjmzj Feb 17, 2019
a80351e
更新删除节点脚本和文档
gjmzj Feb 19, 2019
8a4035a
kubeasz release 0.6.0
gjmzj Feb 19, 2019
3a59e82
修复兼容docker 18.09.x 版本安装
gjmzj Feb 21, 2019
657a373
引入easzctl工具,更新添加node脚本
gjmzj Feb 23, 2019
faccf82
优化example ansible hosts配置
gjmzj Feb 23, 2019
ae5bd3f
清除 new-node/new-master 相关配置
gjmzj Feb 24, 2019
caabb89
优化添加etcd脚本,并集成到easzctl
gjmzj Feb 24, 2019
d6ed23c
优化删除节点脚本,并集成到easzctl
gjmzj Feb 25, 2019
4c6ec53
增加随机basic auth密码等脚本优化
gjmzj Feb 25, 2019
5a9af26
更新easzctl 帮助信息和部分文档
gjmzj Feb 26, 2019
98b39ef
修复docker安装获取版本任务的tags信息
gjmzj Feb 26, 2019
8839c67
修复docker安装获取版本任务的tags信息
gjmzj Feb 26, 2019
3efef87
更新op文档及minor脚本修改
gjmzj Feb 27, 2019
7b68c2a
minor docs update
gjmzj Feb 27, 2019
8b8fb54
增加docker安装时创建软链接
gjmzj Feb 27, 2019
224125c
安装流程修改以适应容器化运行kubeasz
gjmzj Feb 28, 2019
64350c4
优化脚本以兼容docker运行kubeasz
gjmzj Feb 28, 2019
bf2c935
废弃ansible hosts变量K8S_VER,改为自动识别
gjmzj Mar 1, 2019
399de72
update cilium v1.4.1
gjmzj Mar 3, 2019
3eb9dfb
add kubeasz dockerfiles
gjmzj Mar 3, 2019
5902acc
增加easzctl快速创建aio集群
gjmzj Mar 3, 2019
e2529a7
fix 增加easzctl快速创建aio集群
gjmzj Mar 3, 2019
ce6aba3
增加启动kubeasz 容器的脚本
gjmzj Mar 4, 2019
a776176
kubeasz release 1.0.0rc1
gjmzj Mar 5, 2019
b464fee
merge dev branch: kubeasz release 1.0.0rc1
gjmzj Mar 5, 2019
fe6a461
容器启动脚本kubeasz-docker中修复kubeasz镜像地址
gjmzj Mar 5, 2019
523d25c
Merge branch 'dev'
gjmzj Mar 5, 2019
2390410
修复项目bin目录下二进制不能执行的错误
gjmzj Mar 6, 2019
ca2e9a2
修复roles/docker/tasks/main.yml自动merge产生的错误
gjmzj Mar 6, 2019
cbb2923
修复docker版本判断逻辑
gjmzj Mar 6, 2019
27094d0
修复cilium安装时判断内核版本逻辑
gjmzj Mar 6, 2019
b0ebd24
update dashboard v1.10.1
gjmzj Mar 7, 2019
f7ebb5b
废弃ansible变量文件roles/xxx/vars/main.yml的配置方式
gjmzj Mar 11, 2019
53dfdbb
add 1.txt
JibinBao Jul 26, 2019
0f98414
Initial commit
JibinBao Mar 21, 2014
3342afa
first try
Jul 8, 2014
6668f69
commit
Jul 8, 2014
9d74d74
update test.md from yunfeng
Jul 8, 2014
d744ffb
Revert "update test.md from yunfeng"
Jul 8, 2014
5fddba2
update from zhoufeng
yunfeng1983 Jul 8, 2014
a9571ec
add 1.txt
JibinBao Jul 26, 2019
9f6e5db
merge of remote
JibinBao Jul 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
<<<<<<< HEAD
<<<<<<< HEAD
down/*
!down/download.sh
!down/offline_images

# k8s binaries directory
bin/*
!bin/readme.md

# ansible hosts
hosts

# k8s storage manifests
manifests/storage/*
!manifests/storage/test.yaml

# k8s backup directory
roles/cluster-backup/files/*
!roles/cluster-backup/files/readme.md

# role based variable settings, exclude roles/os-harden/vars/
/roles/*/vars/*
!/roles/os-harden/vars/

# cluster backups
.cluster/
=======
=======
>>>>>>> 53dfdbb4e1f8b5c083287ab4fca256fab9cdc731
# built application files
*.apk
*.ap_
Expand Down Expand Up @@ -27,3 +57,7 @@ proguard/
*.ipr
*.iws
.idea/
<<<<<<< HEAD
>>>>>>> Initial commit
=======
>>>>>>> 53dfdbb4e1f8b5c083287ab4fca256fab9cdc731
24 changes: 24 additions & 0 deletions 01.prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# [optional] to synchronize time of nodes with 'chrony'
- hosts: all
roles:
- { role: chrony, when: "hostvars[groups.deploy[0]]['NTP_ENABLED'] == 'yes'" }

# to create CA, kubeconfig, kube-proxy.kubeconfig etc. on 'deploy' node
- hosts: deploy
roles:
- deploy

# prepare tasks for all nodes
- hosts:
- kube-master
- kube-node
- deploy
- etcd
- lb
roles:
- prepare

# [optional] to install loadbalance service, only needed by multi-master cluster
- hosts: lb
roles:
- lb
4 changes: 4 additions & 0 deletions 02.etcd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# to install etcd cluster
- hosts: etcd
roles:
- etcd
6 changes: 6 additions & 0 deletions 03.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# to install docker service
- hosts:
- kube-master
- kube-node
roles:
- docker
16 changes: 16 additions & 0 deletions 04.kube-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# to set up 'kube-master' nodes
- hosts: kube-master
roles:
- kube-master
- kube-node
tasks:
- name: Making master nodes SchedulingDisabled
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
delegate_to: "{{ groups.deploy[0] }}"
when: DEPLOY_MODE != "allinone"
ignore_errors: true

- name: Setting master role name
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
ignore_errors: true
delegate_to: "{{ groups.deploy[0] }}"
4 changes: 4 additions & 0 deletions 05.kube-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# to set up 'kube-node' nodes
- hosts: kube-node
roles:
- kube-node
9 changes: 9 additions & 0 deletions 06.network.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# to install network plugin, only one can be choosen
- hosts:
- kube-master
- kube-node
roles:
- { role: calico, when: "CLUSTER_NETWORK == 'calico'" }
- { role: cilium, when: "CLUSTER_NETWORK == 'cilium'" }
- { role: flannel, when: "CLUSTER_NETWORK == 'flannel'" }
- { role: kube-router, when: "CLUSTER_NETWORK == 'kube-router'" }
5 changes: 5 additions & 0 deletions 07.cluster-addon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# to install clust-addons
- hosts:
- kube-node
roles:
- cluster-addon
1 change: 1 addition & 0 deletions 1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aaa
41 changes: 41 additions & 0 deletions 11.harbor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# [optional] to set up a HARBOR, and to integrate the HARBOR with k8s cluster
# read the guide: 'guide/harbor.md'

- hosts: harbor
roles:
- { role: chrony, when: "hostvars[groups.deploy[0]]['NTP_ENABLED'] == 'yes' and NEW_INSTALL == 'yes'" }
- { role: prepare, when: "NEW_INSTALL == 'yes'" }
- { role: docker, when: "NEW_INSTALL == 'yes'" }
- { role: harbor, when: "NEW_INSTALL == 'yes'" }
tasks:
- name: Fetching the HARBOR SERVER's CA cert
fetch:
src: "{{ ca_dir }}/ca.pem"
dest: "{{ base_dir }}/down/"
flat: yes

- hosts:
- kube-master
- kube-node
tasks:
- name: Define 'harbor_host', a domain
set_fact: harbor_host="{{ hostvars[groups.harbor[0]]['HARBOR_DOMAIN'] }}"

- name: Define 'harbor_host', an IP Addr
set_fact: harbor_host="{{ groups['harbor'][0] }}"
when: "hostvars[groups.harbor[0]]['HARBOR_DOMAIN'] == ''"

- name: Creating cert dir of the HARBOR SERVER for the docker daemon
file: name=/etc/docker/certs.d/{{ harbor_host }} state=directory

- name: Installing the HARBOR SERVER's cert on k8s nodes
copy: src={{ base_dir }}/down/ca.pem dest=/etc/docker/certs.d/{{ harbor_host }}/ca.crt

# [optional] if you have a DNS server, add an 'A record' instead
- name: Adding an '/etc/hosts' entry for the HARBOR DOMAIN
lineinfile:
dest: /etc/hosts
state: present
regexp: '{{ harbor_host }}'
line: "{{ groups['harbor'][0] }} {{ harbor_host }}"
when: "hostvars[groups.harbor[0]]['HARBOR_DOMAIN'] != ''"
23 changes: 23 additions & 0 deletions 22.upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# WARNING: Upgrade the k8s cluster can be risky. Make sure you know what you are doing.
# Read the guide: 'op/upgrade.md' .

# update kubectl binary
- hosts:
- kube-master
- kube-node
- deploy
roles:
- prepare

# update masters
- hosts:
- kube-master
roles:
- kube-master
- kube-node

# update nodes
- hosts:
- kube-node
roles:
- { role: kube-node, when: "DEPLOY_MODE != 'allinone'" }
51 changes: 51 additions & 0 deletions 23.backup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# cluster-backup playbook
# read the guide: 'op/cluster_restore.md'

- hosts:
- etcd
roles:
- cluster-backup

- hosts:
- deploy
tasks:
- name: Creating backup dirs
file: name={{ item }} state=directory
with_items:
- "{{ base_dir }}/roles/cluster-backup/files/ca"
- "{{ base_dir }}/roles/cluster-backup/files/hosts"
- "{{ base_dir }}/roles/cluster-backup/files/snapshot"

- name: Backing up CA sth
copy:
src: "{{ ca_dir }}/{{ item }}"
dest: "{{ base_dir }}/roles/cluster-backup/files/ca/{{ item }}"
with_items:
- ca.pem
- ca-key.pem
- ca.csr
- ca-csr.json
- ca-config.json

- name: Backing up ansible hosts-1
copy:
src: "{{ base_dir }}/hosts"
dest: "{{ base_dir }}/roles/cluster-backup/files/hosts/hosts"
register: p

- name: Backing up ansible hosts-2
shell: "cd {{ base_dir }}/roles/cluster-backup/files/hosts && \
cp -fp hosts hosts-$(date +'%Y%m%d%H%M')"
when: 'p is changed'

- name: Backing up etcd snapshot-1
copy:
src: "{{ base_dir }}/roles/cluster-backup/files/snapshot.db"
dest: "{{ base_dir }}/roles/cluster-backup/files/snapshot/snapshot.db"
register: q

- name: Backing up etcd snapshot-2
shell: "cd {{ base_dir }}/roles/cluster-backup/files/ && \
mv -f snapshot.db snapshot/snapshot-$(date +'%Y%m%d%H%M').db"
when: 'q is changed'

74 changes: 74 additions & 0 deletions 24.restore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# cluster-restore playbook
# read the guide: 'op/cluster_restore.md'

# to restore CA sth on 'deploy' node
- hosts: deploy
tasks:
- name: Restoring dirs of CA sth
file: name=/etc/kubernetes/ssl/ state=directory

- name: Restoring CA sth
copy:
src: "{{ base_dir }}/roles/cluster-backup/files/ca/{{ item }}"
dest: "{{ ca_dir }}/{{ item }}"
with_items:
- ca.pem
- ca-key.pem
- ca.csr
- ca-csr.json
- ca-config.json

- hosts: deploy
roles:
- deploy

# pre-tasks on all nodes
- hosts: all
roles:
- prepare

# [optional] only needed by multi-master cluster
- hosts: lb
roles:
- lb

# to install etcd cluster
- hosts: etcd
roles:
- etcd

# to install docker
- hosts:
- kube-master
- kube-node
roles:
- docker

# to set up 'kube-master' nodes
- hosts:
- kube-master
roles:
- kube-master
- kube-node
#
tasks:
- name: Making master nodes SchedulingDisabled
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
when: DEPLOY_MODE != "allinone"
ignore_errors: true

- name: Setting master role name
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
ignore_errors: true

# to set up 'kube-node' nodes
- hosts:
- kube-node
roles:
- kube-node

# to restore data of etcd cluster
- hosts: etcd
roles:
- cluster-restore

76 changes: 76 additions & 0 deletions 90.setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# [optional] to synchronize time of nodes with 'chrony'
- hosts: all
roles:
- { role: chrony, when: "hostvars[groups.deploy[0]]['NTP_ENABLED'] == 'yes'" }

# to create CA, kubeconfig, kube-proxy.kubeconfig etc. on 'deploy' node
- hosts: deploy
roles:
- deploy

# prepare tasks for all nodes
- hosts:
- kube-master
- kube-node
- deploy
- etcd
- lb
roles:
- prepare

# [optional] to install loadbalance service, only needed by multi-master cluster
- hosts: lb
roles:
- lb

# to install etcd cluster
- hosts: etcd
roles:
- etcd

# to install docker service
- hosts:
- kube-master
- kube-node
roles:
- docker

# to set up 'kube-master' nodes
- hosts: kube-master
roles:
- kube-master
- kube-node
#
tasks:
- name: Making master nodes SchedulingDisabled
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
delegate_to: "{{ groups.deploy[0] }}"
when: DEPLOY_MODE != "allinone"
ignore_errors: true

- name: Setting master role name
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
ignore_errors: true
delegate_to: "{{ groups.deploy[0] }}"

# to set up 'kube-node' nodes
- hosts: kube-node
roles:
- { role: kube-node, when: "DEPLOY_MODE != 'allinone'" }

# to install network plugin, only one can be choosen
- hosts:
- kube-master
- kube-node
roles:
- { role: calico, when: "CLUSTER_NETWORK == 'calico'" }
- { role: cilium, when: "CLUSTER_NETWORK == 'cilium'" }
- { role: flannel, when: "CLUSTER_NETWORK == 'flannel'" }
- { role: kube-router, when: "CLUSTER_NETWORK == 'kube-router'" }

# to install clust-addons
- hosts:
- kube-node
roles:
- cluster-addon

Loading