尝试安装 Openshift-Enterprise 在先决条件检查阶段出现以下错误。
TASK [Evaluate groups - Fail if no etcd hosts group is defined] *************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Running etcd as an embedded service is no longer supported. If this is a new install please define an 'etcd' group with either one, three or five hosts. These hosts may be the same hosts as your masters. If this is an upgrade please see https://docs.openshift.com/container-platform/latest/install_config/upgrading/migrating_embedded_etcd.html for documentation on how to migrate from embedded to external etcd.\n"}
to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/prerequisites.retry
PLAY RECAP ******************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
我已经定义了一个 etcd 主机组,其主机与主机相同。以下是用于了解我的集群配置的 ansible hosts 文件:
# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
openshift_master_identity_providers=[{'name': 'htpasswd_auth',
'login': 'true', 'challenge': 'true',
'kind': 'HTPasswdPasswordIdentityProvider',
'filename': '/etc/origin/master/htpasswd'}]
openshift_use_etcd_system_container=True
# If ansible_ssh_user is not root, ansible_become must be set to true
openshift_deployment_type=openshift-enterprise
#ansible_become=true
openshift_deployment_type=openshift-enterprise
# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
#openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_logging_install_logging=true
openshift_logging_es_pvc_dynamic=true
openshift_metrics_install_metrics=true
openshift_metrics_cassandra_storage_type=dynamic
# host group for masters
[masters]
ip-172-31-7-82.us-west-2.compute.internal
# host group for etcd
[etcd]
ip-172-31-7-82.us-west-2.compute.internal
# host group for nodes, includes region info
[nodes]
ip-172-31-8-41.us-west-2.compute.internal openshift_node_labels="{'region': 'primary', 'zone': 'east'}"