#!/usr/bin/env bash

# 需要在所有的节点执行

hostnamectl set-hostname master-node

sed -i "/search/ a nameserver 223.5.5.5"  /etc/resolv.conf

echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config
systemctl restart sshd

cat >> /etc/hosts << EOF
10.129.80.218 master-node
10.129.80.217 worker-1
10.129.80.245 worker-2
10.129.80.222 worker-3
10.129.80.223 storage-1
EOF


b64>>d2VuOjEyMjkwNTEyODcyNzVAcm9vdEAxMC4xMjkuODAuMjE4OjIyOlNTSDI=  master

b64>>d2VuOjk0NDg3MDMzMDU2NzBAcm9vdEAxMC4xMjkuODAuMjE3OjIyOlNTSDI=
b64>>d2VuOjM2MjE3MzA4NTc4MDhAcm9vdEAxMC4xMjkuODAuMjE3OjIyOlNTSDI=  10.129.80.217 worker-1
b64>>d2VuOjQwMzg1MzEyODQzNzhAcm9vdEAxMC4xMjkuODAuMjQ1OjIyOlNTSDI=  10.129.80.245 worker-2
b64>>d2VuOjQ0OTg0OTI1MjM1MDBAcm9vdEAxMC4xMjkuODAuMjQ1OjIyOlNTSDI=  10.129.80.222 worker-3
b64>>d2VuOjk2MjA1MjI1ODE0NTlAcm9vdEAxMC4xMjkuODAuMjIzOjIyOlNTSDI=  10.129.80.223 storage-1

ping worker-1

yum clean all && yum makecache

S@Znwr#113





