普华 iSoft Server OS 4.2 安装 kubesphere 2.1.0
- 安装节点查找ansible依赖的hostname.py
find / -name hostname.py
找到后编辑
vi /usr/lib/python2.7/site-packages/ansible/modules/system/hostname.py
在 CentOSHostname(Hostname): 下面增加如下内容:
class iSoftServerOSHostname(Hostname):
platform = 'Linux'
distribution = 'Isoft server os'
strategy_class = RedHatStrategy
其中注意distribution值,不修改的情况是会出错
hostname module cannot be used onplayform Linux(Isoft server os)
distribution就写括号后面这个,由于iSoft Server和CentOS类似,这里复制CentOS的其它值
- 各个节点执行如下,标识为redhat,注意版本要对应
echo “Red Hat Enterprise Linux Server release 7.6 (Maipo)” > /etc/redhat-release
- 由于iSoft Server安装扩展会报错
vi kubesphere/roles/prepare/nodes/tasks/main.yaml
#- name: Installing epel-release (YUM)
# yum:
# name: epel-release
# register: result
# until: result is succeeded
# retries: 5
# delay: 5
# when: ansible_os_family in ["RedHat", "Centos"]
手工在各个节点执行 rpm -ivh https://mirrors.aliyun.com/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm
应该把上面修改为shell也可以,没实际测试,就不贴修改后的脚本了
- 安装pip多次测试会卡死,直接修改为用yum
vi kubesphere/roles/prepare/nodes/tasks/glusterfs-client.yaml
- name: pip | Installing pip
shell: sudo yum -y install python-pip
如上修改后kubesphere在iSoft Server OS 4.2上正常,其它类似CentOS应该可参考此思路安装