Commit 917cefdc by tingweiwang

add harbor.service and enable auto start

1 parent 31072927
Showing with 3 additions and 1 deletions
...@@ -435,7 +435,9 @@ ansible master -m shell -a "service docker restart" ...@@ -435,7 +435,9 @@ ansible master -m shell -a "service docker restart"
###########################安装harbor私有仓库############## ###########################安装harbor私有仓库##############
echo "解压harbor到/usr/local/目录" echo "解压harbor到/usr/local/目录"
tar -xvzf /root/k8s/package/harbor_aly.tar.gz -C /usr/local/ tar -xvzf /root/k8s/package/harbor_aly.tar.gz -C /usr/local/
cd /usr/local/harbor/ && sed -i s/new_harbor_ip/$new_harbor_ip/g harbor.yml && ./install.sh && echo "harbor安装成功" cd /usr/local/harbor/ && sed -i s/new_harbor_ip/$new_harbor_ip/g harbor.yml && ./install.sh && echo "harbor安装成功" && \
echo "拷贝harbor.service文件" && cp -a /root/k8s/service/harbor.service /lib/systemd/system/harbor.service && chmod 777 /lib/systemd/system/harbor.service && \
systemctl daemon-reload && echo "设置harbor开机自启" && systemctl enable harbor.service
echo "自动创建harbor项目目录" && sleep 3 echo "自动创建harbor项目目录" && sleep 3
for project in ${harbor_project_list[@]} for project in ${harbor_project_list[@]}
do do
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!