Rainbond安裝目錄:
Rainbond組建說明:
Rainbond節點屬性分類:
Master節點(管理節點)
Worker節點(計算節點)
Storage節點(存儲節點)
Rainbond各服務組件及其版本信息:
注意:
其他組建詳細說明請查看:
Rainbond 中rbd-dns服務內部組件互相訪問的域名解析:
Rainbond 部分服務端口說明:
提示:
etcd的4001爲非安全端口,2379爲安全端口
kube-apiserver的8181爲非安全端口,6443爲安全端口
rainbond API端口當只有一個數據中心時不需要對外開放,當多數據中心,且在不同網絡時需要對外開放,8888非安全端口,8443爲安全端口
rbd-lb提供的80與443端口是爲HTTP協議應用提供,20001~60000是爲TCP協議的應用提供。
Rainbond自動部署安裝過程:
公網環境(阿里雲,騰訊雲等雲上環境)可以指定公網ip --eip <公網ip>, 可選 # 雲幫版本,目前支持(v3.7.1,v3.7.2),v3.7版本默認爲最新版本v3.7.2 --rainbond-version <版本信息>, 可選
wget https://pkg.rainbond.com/releases/common/v3.7.2/grctl
chmod +x ./grctl
可選參數 eip,rainbond-version
./grctl init --eip <公網ip> --rainbond-version <版本信息>
Rainbond安裝完成後查看狀態與管理平臺登錄:
#集羣整體狀態
grctl cluster
集羣節點狀態
grctl node list
控制檯訪問地址
<管理節點>:7070 192.168.1.162:7070 yuechao zbbt1314
#Artifactory管理平臺 主要爲Java工程所需Maven管理
<管理節點>:8081 192.168.1.162:8081 admin password
命令維護:
1.grctl命令
grctl命令是rainbond自帶的集羣管理工具,它具備如下主要功能特性:
2.grclis批量管理服務
批量stop當前節點所有服務
grclis stop
批量start當前節點所有服務
grclis start
批量更新鏡像版本
grclis update all*
3.docker相關命令
docker:(1)docker基本命令使用及發佈鏡像:https://blog.csdn.net/yueaini10000/article/details/83784397
docker:(2)通過Dockerfile構建鏡像併發布web項目:https://blog.csdn.net/yueaini10000/article/details/83784535
docker:(3)docker容器掛載宿主主機目錄:https://blog.csdn.net/yueaini10000/article/details/83784656
4.GlusterFS的安裝
①hosts解析
[root@server1 ~]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.81.29.87 server1
10.81.9.115 server2
② 安裝glusterfs
#所有存儲節點執行
yum install centos-release-gluster -y
yum install glusterfs-server -y
③ 啓動GlusterFS服務
#所有存儲節點執行
systemctl start glusterd.service
systemctl enable glusterd.service
systemctl status glusterd.service
④ 配置信任池(一端添加就行)
[root@server1 ~]# gluster peer probe server2
peer probe: success.
[root@server1 ~]# gluster peer status
Number of Peers: 1
Hostname: server2
Uuid: be69468e-94b6-45a6-8a3d-bea86c2702dc
State: Peer in Cluster (Connected)
⑤ 創建卷
#所有節點都需執行
mkdir -p /data/glusterfs
#創建一個卷
gluster volume create data replica 2 server1:/data/glusterfs server2:/data/glusterfs
Replica 2 volumes are prone to split-brain. Use Arbiter or Replica 3 to avoid this. See: http://docs.gluster.org/en/latest/Administrator%20Guide/Split%20brain%20and%20ways%20to%20deal%20with%20it/.
Do you still want to continue?
(y/n) y
volume create: data: success: please start the volume to access data
⑥查看卷的信息
[root@server1 ~]# gluster volume info
Volume Name: data
Type: Replicate
Volume ID: 8c16603c-2fab-4117-8020-2310b0041b35
Status: Created
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: server1:/data/glusterfs
Brick2: server2:/data/glusterfs
Options Reconfigured:
transport.address-family: inet
nfs.disable: on
⑦啓動卷
[root@server1 ~]# gluster volume start data
volume start: data: success
⑧掛載測試
#server1 掛載
[root@server1 ~]# mount -t glusterfs server1:/data /mnt
#server2 掛載
[root@server2 ~]# mount -t glusterfs server2:/data /mnt
#在server2上創建文件
[root@server2 ~]# touch /mnt/{1..10}test.txt
#在server1上查看文件是否同步,如出現上一步創建的文件,說明同步成功
[root@server1 ~]# ls /mnt/
10test.txt 2test.txt 4test.txt 6test.txt 8test.txt
1test.txt 3test.txt 5test.txt 7test.txt 9test.txt
5.擴容計算節點:
grctl node add --host compute01 --iip <internal ip> -p <root pass> -r worker
grctl node add --host compute02 --iip <internal ip> -p <root pass> -r worker
6.Rainbond卸載
grclis stop
systemctl disable docker
systemctl disable etcd
systemctl disable node
systemctl disable calico
systemctl disable salt-master
systemctl disable salt-minion
systemctl disable kube-apiserver
systemctl disable kube-controller-manager
systemctl disable kube-scheduler
systemctl disable kubelet
cd /etc/systemd/system/
systemctl disable rbd-*
cclear
systemctl stop docker
systemctl stop salt-master
systemctl stop salt-minion
yum remove -y gr-docker*
yum remove -y salt-*
rm -rf /etc/systemd/system/kube-*
rm -rf /etc/systemd/system/rbd-*
rm -rf /etc/systemd/system/kubelet*
rm -rf /etc/systemd/system/node.service
rm -rf /etc/systemd/system/etcd.service
rm -rf /etc/systemd/system/calico.service
rm -rf /usr/lib/systemd/system/docker.service
rm -rf /opt/rainbond
rm -rf /cache
rm -rf /grdata/
rm -rf /etc/goodrain/
rm -rf /srv/
rm -rf /etc/salt/*
cat > /etc/hosts <<EOF 127.0.0.1 localhost EOF # /usr/local/bin/
可以根據需求刪除:calicoctl ctop dc-compose docker-compose domain-cli etcdctl grcert grctl kubectl kubelet node scope yq
管理節點維護:
http://www.rainbond.com/docs/stable/operation-manual/platform-maintenance/management-node.html
計算節點維護:
http://www.rainbond.com/docs/stable/operation-manual/platform-maintenance/compute-node.html
更多維護命令可查看:http://www.rainbond.com/docs/stable/operation-manual/cli.html