#!/bin/sh
#***************************************************************#
# ScriptName: cephnodeready.sh
# Author: xhy
# Create Date: 2021-07-25 19:34
# Modify Author: xhy
# Modify Date: 2021-07-25 19:34
# Version: v1
#***************************************************************#

# Disable Firewall and SElinux
systemctl disable firewalld.service --now
sed -i 's/=enforcing/=disabled/g' /etc/selinux/config

# Install Docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum-config-manager --enable docker-ce-test
yum-config-manager --enable docker-ce-nightly
yum -y install docker-ce
mkdir -p /etc/docker

cat <<EOF > /etc/docker/daemon.json
{
    "registry-mirrors": ["https://dbzucv6w.mirror.aliyuncs.com"]
}
EOF

systemctl enable docker.service --now

# Update system
yum -y update

# Reboot
reboot
