c50df69045
Currently CentOS gates use btrfs storage driver and create /docker device backing btrfs. This patch is to sync the gate run with Ubuntu. (post-Trusty) does not use btrfs, only overlay2. Change-Id: Ic5caa8cf0271b21f71f03fd33c35b3c7bc93ccf4
37 lines
907 B
Bash
Executable File
37 lines
907 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o xtrace
|
|
set -o errexit
|
|
|
|
# (SamYaple)TODO: Remove the path overriding
|
|
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
|
|
sudo yum-config-manager \
|
|
--add-repo \
|
|
https://download.docker.com/linux/centos/docker-ce.repo
|
|
|
|
sudo yum -y install libffi-devel openssl-devel docker-ce btrfs-progs
|
|
|
|
# Disable SELinux
|
|
setenforce 0
|
|
|
|
# Setup Docker
|
|
sudo mkdir /etc/systemd/system/docker.service.d
|
|
sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
|
|
[Service]
|
|
ExecStart=
|
|
ExecStart=/usr/bin/dockerd --storage-driver overlay2 --insecure-registry=0.0.0.0/0
|
|
MountFlags=shared
|
|
EOF
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo systemctl start docker
|
|
sudo docker info
|
|
|
|
# disable ipv6 until we're sure routes to fedora mirrors work properly
|
|
sudo sh -c 'echo "net.ipv6.conf.all.disable_ipv6 = 1" > /etc/sysctl.d/disable_ipv6.conf'
|
|
sudo /usr/sbin/sysctl -p
|
|
|
|
echo "Completed $0."
|