From 40a38095870eb0c7aec9498488ce38c65798623e Mon Sep 17 00:00:00 2001 From: ysicing Date: Thu, 23 Aug 2018 18:55:18 +0800 Subject: [PATCH 1/3] [REV] fmt #135 --- install/salt/docker/install.sls | 7 +------ setup.sh | 13 ++++++------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/install/salt/docker/install.sls b/install/salt/docker/install.sls index f2d4e83..83e1eaf 100644 --- a/install/salt/docker/install.sls +++ b/install/salt/docker/install.sls @@ -32,12 +32,7 @@ docker-repo: pkgrepo.managed: {% if grains['os_family']|lower == 'redhat' %} {% if pillar['install-type']=="offline" %} - {% if grains['id']=="manage01" %} - - humanname: local_repo - - baseurl: file://{{ pillar['install-script-path' ]}}/install/pkgs/centos/ - - enabled: 1 - - gpgcheck: 0 - {% else %} + {% if grains['id']!= "manage01" %} - humanname: local_repo - baseurl: http://repo.goodrain.me/ - enabled: 1 diff --git a/setup.sh b/setup.sh index 94e1a60..ee52548 100755 --- a/setup.sh +++ b/setup.sh @@ -117,18 +117,16 @@ END else mkdir -p /etc/yum.repos.d/backup >/dev/null 2>&1 mv -f /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup >/dev/null 2>&1 - cat > /etc/yum.repos.d/rainbond_local.repo << EOF -[rainbond_local] + cat > /etc/yum.repos.d/rbd-local.repo << EOF +[rbd-local] name=rainbond_offline_install_repo baseurl=file:///opt/rainbond/install/install/pkgs/centos/ gpgcheck=0 enabled=1 EOF - rpm -ivh /opt/rainbond/install/install/pkgs/centos/deltarpm-*.rpm 1>/dev/null - rpm -ivh /opt/rainbond/install/install/pkgs/centos/libxml2-python-*.rpm 1>/dev/null - rpm -ivh /opt/rainbond/install/install/pkgs/centos/python-deltarpm-*.rpm 1>/dev/null - rpm -ivh /opt/rainbond/install/install/pkgs/centos/createrepo-*.rpm 1>/dev/null + yum makecache fast >/dev/null 2>&1 + yum install createrepo -y 1>/dev/null createrepo /opt/rainbond/install/install/pkgs/centos/ 1>/dev/null fi @@ -147,6 +145,7 @@ else cat > /etc/apt/sources.list.d/salt.list << END deb https://mirrors.ustc.edu.cn/salt/apt/debian/9/amd64/2018.3 stretch main END + fi #=================== base show func ========================================== @@ -755,7 +754,7 @@ install_func(){ Echo_Error "Please check node status[uuid], Just Run systemctl status node" exit 1 fi - for ((i=1;i<=30;i++ ));do + for ((i=1;i<=60;i++ ));do sleep 1 notready=$(grctl node list | grep $uuid | grep offline) [ ! -z "$notready" ] && ( From 3bc5fdc88b28ee76704251855fbedd125216b542 Mon Sep 17 00:00:00 2001 From: ysicing Date: Thu, 23 Aug 2018 23:15:22 +0800 Subject: [PATCH 2/3] [REV] update network configuration --- install/salt/common/service.sls | 15 +++++++++++---- .../salt/install/files/network/system/calico.conf | 0 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 install/salt/install/files/network/system/calico.conf diff --git a/install/salt/common/service.sls b/install/salt/common/service.sls index ce81b40..745cf6b 100644 --- a/install/salt/common/service.sls +++ b/install/salt/common/service.sls @@ -28,10 +28,17 @@ remove_pkgs: # - cmd: kill-dhclient {% if grains['os_family']|lower == 'debian' %} -NetworkManager: - service.dead: - - name: NetworkManager - - enable: False +#NetworkManager: +# service.dead: +# - name: NetworkManager +# - enable: False +NetworkManager-conf: + file.managed: + - source: salt://install/files/network/system/calico.conf + - name: /etc/NetworkManager/conf.d/calico.conf + - template: jinja + - mode: 755 + - makedirs: True {% endif %} iptables: diff --git a/install/salt/install/files/network/system/calico.conf b/install/salt/install/files/network/system/calico.conf new file mode 100644 index 0000000..e69de29 From da43aa2e6e08496f41ddeb9e569e0ecb11b42663 Mon Sep 17 00:00:00 2001 From: ysicing Date: Fri, 24 Aug 2018 00:03:56 +0800 Subject: [PATCH 3/3] disable swap --- install/salt/common/init.sls | 4 ++-- install/salt/install/files/network/system/calico.conf | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install/salt/common/init.sls b/install/salt/common/init.sls index fa2789d..f85a94a 100644 --- a/install/salt/common/init.sls +++ b/install/salt/common/init.sls @@ -3,7 +3,7 @@ include: - common.key - common.user - common.limits - - common.swap +# - common.swap - common.create_dir - common.service - common.plugins @@ -18,7 +18,7 @@ include: {% else %} - common.user - common.create_dir - - common.swap +# - common.swap - common.limits - common.service - common.key diff --git a/install/salt/install/files/network/system/calico.conf b/install/salt/install/files/network/system/calico.conf index e69de29..1722715 100644 --- a/install/salt/install/files/network/system/calico.conf +++ b/install/salt/install/files/network/system/calico.conf @@ -0,0 +1,2 @@ +[keyfile] +unmanaged-devices=interface-name:cali*;interface-name:tunl* \ No newline at end of file