modify kolla.conf of target host

Change-Id: I74385f035bca3219b77b4aa6d539ad2f97780d5d
Signed-off-by: luyao <lu.yao135@zte.com.cn>
This commit is contained in:
luyao 2016-07-20 17:19:43 +08:00
parent fe79d346fc
commit cacc1dc749
1 changed files with 11 additions and 1 deletions

View File

@ -4,7 +4,17 @@ yum -y install epel-release
curl -sSL https://get.docker.io | bash
mkdir -p /etc/systemd/system/docker.service.d
config_path=/etc/systemd/system/docker.service.d/kolla.conf
echo -e "[Service]\nMountFlags=shared" > $config_path
daisy_config_file="/home/daisy_install/daisy.conf"
line=`sed '/^[[:space:]]*#/d' $daisy_config_file | sed /^[[:space:]]*$/d | grep -w "daisy_management_ip"| grep "daisy_management_ip[[:space:]]*=" -m1`
if [ -z "$line" ]; then
echo "daisy_management_ip of daisy.conf can't be empty!"
exit 1
else
daisy_management_ip=`echo $line | sed 's/=/ /' | sed -e 's/^\w*\ *//'`
fi
touch /etc/sysconfig/docker
echo -e "other_args="--insecure-registry $daisy_management_ip:4000"" > /etc/sysconfig/docker
echo -e "[Service]\nMountFlags=shared\nEnvironmentFile=/etc/sysconfig/docker\nExecStart=\nExecStart=/usr/bin/docker daemon -H fd:// \$other_args" > $config_path
systemctl daemon-reload
systemctl restart docker
yum install -y python-docker-py