[root@master1 scripts]# ./install.sh
################################################
KubeSphere Installer Menu
################################################
- 1) All-in-one
- 2) Multi-node
- 3) Quit
################################################
https://kubesphere.io/ 2020-07-20
################################################
Please input an option: 2
2
Prerequisites:
It’s recommended that Your OS is clean (without any other software installed), otherwise there may be conflicts.
OS requirements (For Minimal Installation only)锛歛t least 2 vCPUs and 4GB RAM.
Please make sure the storage service is available if you’ve configured storage parameters in the conf directory.
Make sure the DNS address in /etc/resolv.conf is available.
If your network configuration uses an firewall锛寉ou must ensure infrastructure components can communicate with each other through specific ports.
It’s recommended that you turn off the firewall or follow the link configuriation:
https://github.com/kubesphere/ks-installer/blob/master/docs/NetWorkAccess.md
Please ensure that your environment has met the above requirements (yes/no) yes
repo already exists !
/etc/yum.repos.d /kubesphere-all-offline-v2.1.1/scripts
/etc/yum.repos.d
mount: /dev/loop0 is write-protected, mounting read-only
mount: /dev/loop1 is write-protected, mounting read-only
mount: /dev/loop2 is write-protected, mounting read-only
Loaded plugins: fastestmirror, langpacks
Cleaning repos: bash
Cleaning up list of fastest mirrors
Other repos take up 586 M of disk space (use –verbose for details)
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
bash | 2.9 kB 00:00:00
(⅓): bash/filelists_db | 291 kB 00:00:00
(⅔): bash/other_db | 168 kB 00:00:00
(3/3): bash/primary_db | 782 kB 00:00:00
Metadata Cache Created
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Package python-2.7.5-86.el7.x86_64 already installed and latest version
Package sshpass-1.06-2.el7.x86_64 already installed and latest version
Package 3:docker-ce-18.09.7-3.el7.x86_64 already installed and latest version
Nothing to do
Init successsful!
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: /kubeinstaller/pip_repo/pip27/iso
Processing /kubeinstaller/pip_repo/pip27/iso/pip-19.3.1-py2.py3-none-any.whl
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 19.3.1
Uninstalling pip-19.3.1:
Successfully uninstalled pip-19.3.1
Successfully installed pip-19.3.1
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: /kubeinstaller/pip_repo/pip27/iso
Processing /root/.cache/pip/wheels/9a/50/0d/d81fe4ad9da8e1eaf563d26a45321e78b0e9b545c5dbc70203/PyYAML-5.1.2-cp27-cp27mu-linux_x86_64.whl
Installing collected packages: PyYAML
Successfully installed PyYAML-5.1.2
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in links: /kubeinstaller/pip_repo/pip27/iso
Processing /root/.cache/pip/wheels/bf/3b/b0/266bd452456338ef2d819605de10b0d9bd7757e1bf52063ae2/ansible-2.7.12-cp27-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/Jinja2-2.10.1-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/netaddr-0.7.19-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/pbr-5.2.0-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/hvac-0.8.2-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/jmespath-0.9.4-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/ruamel.yaml-0.15.96-cp27-cp27mu-manylinux1_x86_64.whl
Processing /root/.cache/pip/wheels/9a/50/0d/d81fe4ad9da8e1eaf563d26a45321e78b0e9b545c5dbc70203/PyYAML-5.1.2-cp27-cp27mu-linux_x86_64.whl
Processing /kubeinstaller/pip_repo/pip27/iso/setuptools-41.6.0-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/paramiko-2.6.0-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/cryptography-2.8-cp27-cp27mu-manylinux2010_x86_64.whl
Processing /kubeinstaller/pip_repo/pip27/iso/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Processing /kubeinstaller/pip_repo/pip27/iso/requests-2.22.0-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/ruamel.ordereddict-0.4.14-cp27-cp27mu-manylinux1_x86_64.whl
Processing /kubeinstaller/pip_repo/pip27/iso/PyNaCl-1.3.0-cp27-cp27mu-manylinux1_x86_64.whl
Processing /kubeinstaller/pip_repo/pip27/iso/bcrypt-3.1.7-cp27-cp27mu-manylinux1_x86_64.whl
Processing /kubeinstaller/pip_repo/pip27/iso/enum34-1.1.6-py2-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/cffi-1.13.2-cp27-cp27mu-manylinux1_x86_64.whl
Processing /kubeinstaller/pip_repo/pip27/iso/six-1.13.0-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/ipaddress-1.0.23-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/chardet-3.0.4-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/idna-2.8-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/urllib3-1.25.7-py2.py3-none-any.whl
Processing /kubeinstaller/pip_repo/pip27/iso/certifi-2019.9.11-py2.py3-none-any.whl
Processing /root/.cache/pip/wheels/36/e4/01/7a519515f318aaeb1a1957bbad0f55e2a87021b384cab5ae0b/pycparser-2.19-py2.py3-none-any.whl
ERROR: ipapython 4.6.4 has requirement dnspython>=1.15, but you’ll have dnspython 1.12.0 which is incompatible.
ERROR: ipapython 4.6.4 has requirement python-ldap>=3.0.0b1, but you’ll have python-ldap 2.4.15 which is incompatible.
Installing collected packages: PyYAML, MarkupSafe, jinja2, setuptools, enum34, pycparser, cffi, six, ipaddress, cryptography, pynacl, bcrypt, paramiko, ansible, netaddr, pbr, chardet, idna, urllib3, certifi, requests, hvac, jmespath, ruamel.ordereddict, ruamel.yaml
Successfully installed MarkupSafe-1.1.1 PyYAML-5.1.2 ansible-2.7.12 bcrypt-3.1.7 certifi-2019.9.11 cffi-1.13.2 chardet-3.0.4 cryptography-2.8 enum34-1.1.6 hvac-0.8.2 idna-2.8 ipaddress-1.0.23 jinja2-2.10.1 jmespath-0.9.4 netaddr-0.7.19 paramiko-2.6.0 pbr-5.2.0 pycparser-2.19 pynacl-1.3.0 requests-2.22.0 ruamel.ordereddict-0.4.14 ruamel.yaml-0.15.96 setuptools-41.6.0 six-1.13.0 urllib3-1.25.7
- Initiating Environment
*********************************************
[WARNING] Ansible is being run in a world writable directory (/root/kubesphere-all-offline-v2.1.1/scripts), ignoring it as an ansible.cfg source. For more information see https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
PLAY [kube-master[0]] *********************************************************************************************************
[WARNING]: While constructing a mapping from /root/kubesphere-all-offline-v2.1.1/k8s/inventory/my_cluster/group_vars/k8s-
cluster/common.yaml, line 25, column 1, found a duplicate dict key (loadbalancer_apiserver). Using last defined value only.
TASK [loadbalancer_apiserver is not set] **************************************************************************************
Monday 20 July 2020 19:38:20 +0800 (0:00:00.152) 0:00:00.152 ***********
skipping: [master1]
PLAY [k8s-cluster] ************************************************************************************************************
TASK [Disable swap] ***********************************************************************************************************
Monday 20 July 2020 19:38:20 +0800 (0:00:00.074) 0:00:00.226 ***********
fatal: [master2]: FAILED! => {“msg”: “the connection plugin ‘10.52.23.203′ was not found”}
changed: [master1]
fatal: [master3]: FAILED! => {“msg”: “the connection plugin ‘10.52.23.205′ was not found”}
changed: [node1]
changed: [node2]
TASK [Swap off] ***************************************************************************************************************
Monday 20 July 2020 19:38:20 +0800 (0:00:00.421) 0:00:00.647 ***********
changed: [master1]
changed: [node1]
changed: [node2]
PLAY [local-registry] *********************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************
Monday 20 July 2020 19:38:21 +0800 (0:00:00.229) 0:00:00.877 ***********
ok: [master1]
TASK [config docker-ce] *******************************************************************************************************
Monday 20 July 2020 19:38:22 +0800 (0:00:01.696) 0:00:02.574 ***********
ok: [master1] => (item={u’type’: u’conf’, u’name’: u’docker.service’, u’file’: u’docker.service’})
TASK [check docker-options] ***************************************************************************************************
Monday 20 July 2020 19:38:24 +0800 (0:00:01.169) 0:00:03.744 ***********
ok: [master1]
TASK [Restart docker] *********************************************************************************************************
Monday 20 July 2020 19:38:24 +0800 (0:00:00.377) 0:00:04.122 ***********
changed: [master1]
PLAY [all] ********************************************************************************************************************
TASK [Fetch /etc/os-release] **************************************************************************************************
Monday 20 July 2020 19:38:26 +0800 (0:00:02.271) 0:00:06.393 ***********
ok: [master1]
ok: [node1]
ok: [node2]
TASK [Check os release] *******************************************************************************************************
Monday 20 July 2020 19:38:26 +0800 (0:00:00.267) 0:00:06.660 ***********
ok: [master1]
ok: [node1]
ok: [node2]
TASK [Check source.list] ******************************************************************************************************
Monday 20 July 2020 19:38:27 +0800 (0:00:00.151) 0:00:06.812 ***********
skipping: [master1]
skipping: [node1]
skipping: [node2]
TASK [Backup source.list] *****************************************************************************************************
Monday 20 July 2020 19:38:27 +0800 (0:00:00.111) 0:00:06.923 ***********
skipping: [master1]
skipping: [node1]
skipping: [node2]
TASK [creat source.list] ******************************************************************************************************
Monday 20 July 2020 19:38:27 +0800 (0:00:00.112) 0:00:07.035 ***********
skipping: [master1]
skipping: [node1]
skipping: [node2]
TASK [Apt update] *************************************************************************************************************
Monday 20 July 2020 19:38:27 +0800 (0:00:00.123) 0:00:07.159 ***********
skipping: [master1]
skipping: [node1]
skipping: [node2]
TASK [Backup repo.d] **********************************************************************************************************
Monday 20 July 2020 19:38:27 +0800 (0:00:00.106) 0:00:07.265 ***********
changed: [master1]
changed: [node1]
changed: [node2]
TASK [Backup repo.d] **********************************************************************************************************
Monday 20 July 2020 19:38:27 +0800 (0:00:00.278) 0:00:07.544 ***********
skipping: [master1]
skipping: [node1]
skipping: [node2]
TASK [Create repo.d] **********************************************************************************************************
Monday 20 July 2020 19:38:27 +0800 (0:00:00.121) 0:00:07.666 ***********
fatal: [master1]: FAILED! => {“changed”: true, “msg”: “non-zero return code”, “rc”: 1, “stderr”: “mkdir: cannot create directory 鈥etc/yum.repos.d鈥 File exists\n”, “stderr_lines”: [“mkdir: cannot create directory 鈥etc/yum.repos.d鈥 File exists”], “stdout”: "", “stdout_lines”: []}
…ignoring
fatal: [node1]: FAILED! => {“changed”: true, “msg”: “non-zero return code”, “rc”: 1, “stderr”: “Shared connection to 10.52.23.207 closed.\r\n”, “stderr_lines”: [“Shared connection to 10.52.23.207 closed.”], “stdout”: “mkdir: cannot create directory 鈥etc/yum.repos.d鈥 File exists\r\n”, “stdout_lines”: [“mkdir: cannot create directory 鈥etc/yum.repos.d鈥 File exists”]}
…ignoring
fatal: [node2]: FAILED! => {“changed”: true, “msg”: “non-zero return code”, “rc”: 1, “stderr”: “Shared connection to 10.52.23.209 closed.\r\n”, “stderr_lines”: [“Shared connection to 10.52.23.209 closed.”], “stdout”: “mkdir: cannot create directory 鈥etc/yum.repos.d鈥 File exists\r\n”, “stdout_lines”: [“mkdir: cannot create directory 鈥etc/yum.repos.d鈥 File exists”]}
…ignoring
TASK [Creat client.repo] ******************************************************************************************************
Monday 20 July 2020 19:38:28 +0800 (0:00:00.268) 0:00:07.934 ***********
skipping: [master1]
skipping: [node1]
skipping: [node2]
PLAY [localhost] **************************************************************************************************************
TASK [Get local_ip] ***********************************************************************************************************
Monday 20 July 2020 19:38:28 +0800 (0:00:00.086) 0:00:08.020 ***********
changed: [localhost]
PLAY RECAP ********************************************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
master1 : ok=10 changed=5 unreachable=0 failed=0
master2 : ok=0 changed=0 unreachable=0 failed=1
master3 : ok=0 changed=0 unreachable=0 failed=1
node1 : ok=6 changed=4 unreachable=0 failed=0
node2 : ok=6 changed=4 unreachable=0 failed=0
Monday 20 July 2020 19:38:28 +0800 (0:00:00.152) 0:00:08.173 ***********
Restart docker ——————————————————————————————————— 2.27s
Gathering Facts ——————————————————————————————————– 1.70s
config docker-ce ——————————————————————————————————- 1.17s
Disable swap ———————————————————————————————————– 0.42s
check docker-options ————————————————————————————————— 0.38s
Backup repo.d ———————————————————————————————————- 0.28s
Create repo.d ———————————————————————————————————- 0.27s
Fetch /etc/os-release ————————————————————————————————– 0.27s
Swap off ————————————————————————————————————— 0.23s
Get local_ip ———————————————————————————————————– 0.15s
Check os release ——————————————————————————————————- 0.15s
creat source.list —————————————————————————————————— 0.12s
Backup repo.d ———————————————————————————————————- 0.12s
Backup source.list —————————————————————————————————– 0.11s
Check source.list —————————————————————————————————— 0.11s
Apt update ————————————————————————————————————- 0.11s
Creat client.repo —————————————————————————————————— 0.09s
loadbalancer_apiserver is not set ————————————————————————————– 0.07s
failed!
please refer to https://kubesphere.io/docs/v2.1/zh-CN/faq/faq-install/
[root@master1 scripts]#