1

我正在尝试安装 IBM Private Cloud Community Edition,但在执行安装说明中的 sudo docker run 命令时遇到了困难:

> sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0.3 install

当我执行它时,它会返回以下带有错误消息的输出(如下):

user@kim:/opt/ibm-cloud-private-ce-2.1.0.3/cluster$ sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0.3 install

PLAY [Checking Python interpreter] *********************************************

TASK [Checking Python interpreter] *********************************************
changed: [127.0.0.1]

PLAY [Checking prerequisites] **************************************************

TASK [Gathering Facts] *********************************************************
ok: [127.0.0.1]

TASK [docker-engine-check : Getting Docker engine version] *********************
changed: [127.0.0.1]

TASK [docker-engine-check : Checking docker engine if installed] ***************
changed: [127.0.0.1]

TASK [docker-engine : include] *************************************************

TASK [docker-engine : include] *************************************************

TASK [containerd-engine-check : Getting containerd version] ********************

TASK [containerd-engine-check : Checking cri-containerd if installed] **********

TASK [containerd-engine : include] *********************************************

TASK [containerd-engine : include] *********************************************

TASK [network-check : Checking for the network pre-check file] *****************
ok: [127.0.0.1 -> localhost]

TASK [network-check : include_tasks] *******************************************
included: /installer/playbook/roles/network-check/tasks/calico.yaml for 127.0.0.1

TASK [network-check : Calico Validation - Verifying hostname for lowercase] ****

TASK [network-check : Calico Validation - Initializing interface list to be verified] ***
ok: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when autodetection_method is first-found] ***

TASK [network-check : Calico Validation - Updating regex string to match interfaces to be excluded] ***

TASK [network-check : Calico Validation - Getting list of interfaces to be considered] ***

TASK [network-check : Calico Validation - Excluding default interface if defined] ***

TASK [network-check : Calico Validation - Finding Interface reg-ex when autodetection_method is interface(reg-ex)] ***

TASK [network-check : Calico Validation -  Finding Interface when autodetection_method is interface(reg-ex)] ***

TASK [network-check : Calico Validation - Finding Domain/IP when autodetection_method is can-reach] ***
ok: [127.0.0.1]

TASK [network-check : Calico Validation -  Finding IP for the Domain when autodetection_method is can-reach] ***
changed: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when autodetection_method is can-reach] ***
changed: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when lo is found] ***
changed: [127.0.0.1]

TASK [network-check : Calico Validation - Finding Interface when autodetection_method is can-reach] ***
ok: [127.0.0.1]

TASK [network-check : Calico Validation - Finding MTU for the detected Interface(s)] ***
fatal: [127.0.0.1]: FAILED! => {"msg": "The conditional check 'hostvars[inventory_hostname]['ansible_'~item]['mtu'] is defined' failed. The error was: error while evaluating conditional (hostvars[inventory_hostname]['ansible_'~item]['mtu'] is defined): 'dict object' has no attribute u'ansible_'\n\nThe error appears to have been in '/installer/playbook/roles/network-check/tasks/calico.yaml': line 86, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Calico Validation - Finding MTU for the detected Interface(s)\n      ^ here\n"}

NO MORE HOSTS LEFT *************************************************************

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=12   changed=6    unreachable=0    failed=1   

Playbook run took 0 days, 0 hours, 0 minutes, 13 seconds

user@kim:/opt/ibm-cloud-private-ce-2.1.0.3/cluster$

我正在使用 Docker 版本 17.12.1-ce 构建 7390fc6 的 Ubuntu 14.04。

我的主机文件如下所示:

[master]
127.0.0.1 ansible_user="user" ansible_ssh_pass="6CEd29CN" ansible_become=true ansible_become_pass="6CEd29CN" ansible_port="22" ansible_ssh_common_args="-oPubkeyAuthentication=no" 

[worker]
127.0.0.1 ansible_user="user" ansible_ssh_pass="6CEd29CN" ansible_become=true ansible_become_pass="6CEd29CN" ansible_port="22" ansible_ssh_common_args="-oPubkeyAuthentication=no" 

[proxy]
127.0.0.1 ansible_user="user" ansible_ssh_pass="6CEd29CN" ansible_become=true ansible_become_pass="6CEd29CN" ansible_port="22" ansible_ssh_common_args="-oPubkeyAuthentication=no" 

#[management]
#4.4.4.4

#[va]
#5.5.5.5

yaml.cfg 文件如下所示:

# Licensed Materials - Property of IBM
# IBM Cloud private
# @ Copyright IBM Corp. 2017 All Rights Reserved
# US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

---

###### docker0: 172.17.0.1
###### eth0: 192.168.240.14

## Network Settings
network_type: calico
# network_helm_chart_path: < helm chart path >

## Network in IPv4 CIDR format
network_cidr: 127.0.0.1/8

## Kubernetes Settings
service_cluster_ip_range: 127.0.0.1/24

## Makes the Kubelet start if swap is enabled on the node. Remove
## this if your production env want to disble swap.
kubelet_extra_args: ["--fail-swap-on=false"]

# cluster_domain: cluster.local
# cluster_name: mycluster
# cluster_CA_domain: "{{ cluster_name }}.icp"
# cluster_zone: "myzone"
# cluster_region: "myregion"

## Etcd Settings
etcd_extra_args: ["--grpc-keepalive-timeout=0", "--grpc-keepalive-interval=0", "--snapshot-count=10000"]

## General Settings
# wait_for_timeout: 600
# docker_api_timeout: 100

## Advanced Settings
default_admin_user: user
default_admin_password: 6CEd29CN
# ansible_user: <username>
# ansible_become: true
# ansible_become_password: <password>

## Kubernetes Settings
# kube_apiserver_extra_args: []
# kube_controller_manager_extra_args: []
# kube_proxy_extra_args: []
# kube_scheduler_extra_args: []

## Enable Kubernetes Audit Log
# auditlog_enabled: false

## GlusterFS Settings
# glusterfs: false

## GlusterFS Storage Settings
# storage:
#  - kind: glusterfs
#    nodes:
#      - ip: <worker_node_m_IP_address>
#        device: <link path>/<symlink of device aaa>,<link path>/<symlink of device bbb>
#      - ip: <worker_node_n_IP_address>
#        device: <link path>/<symlink of device ccc>
#      - ip: <worker_node_o_IP_address>
#        device: <link path>/<symlink of device ddd>
#    storage_class:
#      name:
#      default: false
#      volumetype: replicate:3

## Network Settings
## Calico Network Settings
# calico_ipip_enabled: true
# calico_tunnel_mtu: 1430
calico_ip_autodetection_method: can-reach=127.0.0.1

## IPSec mesh Settings
## If user wants to configure IPSec mesh, the following parameters
## should be configured through config.yaml
# ipsec_mesh:
#   enable: true
#   interface: <interface name on which IPsec will be enabled>
#   subnets: []
#   exclude_ips: "<list of IP addresses separated by a comma>"

# kube_apiserver_secure_port: 8001

## External loadbalancer IP or domain
## Or floating IP in OpenStack environment
# cluster_lb_address: none

## External loadbalancer IP or domain
## Or floating IP in OpenStack environment
# proxy_lb_address: none

## Install in firewall enabled mode
# firewall_enabled: false

## Allow loopback dns server in cluster nodes
# loopback_dns: false

## High Availability Settings
# vip_manager: etcd

## High Availability Settings for master nodes
# vip_iface: eth0
# cluster_vip: 127.0.1.1

## High Availability Settings for Proxy nodes
# proxy_vip_iface: eth0
# proxy_vip: 127.0.1.1

## Federation cluster Settings
# federation_enabled: false
# federation_cluster: federation-cluster
# federation_domain: cluster.federation
# federation_apiserver_extra_args: []
# federation_controllermanager_extra_args: []
# federation_external_policy_engine_enabled: false

## vSphere cloud provider Settings
## If user wants to configure vSphere as cloud provider, vsphere_conf
## parameters should be configured through config.yaml
# kubelet_nodename: hostname
# cloud_provider: vsphere
# vsphere_conf:
#    user: <vCenter username for vSphere cloud provider>
#    password: <password for vCenter user>
#    server: <vCenter server IP or FQDN>
#    port: [vCenter Server Port; default: 443]
#    insecure_flag: [set to 1 if vCenter uses a self-signed certificate]
#    datacenter: <datacenter name on which Node VMs are deployed>
#    datastore: <default datastore to be used for provisioning volumes>
#    working_dir: <vCenter VM folder path in which node VMs are located>

## Disabled Management Services Settings
## You can disable the following management services: ["service-catalog", "metering", "monitoring", "istio", "vulnerability-advisor", "custom-metrics-adapter"]
disabled_management_services: ["istio", "vulnerability-advisor", "custom-metrics-adapter"]

## Docker Settings
# docker_env: []
# docker_extra_args: []
## The maximum size of the log before it is rolled
# docker_log_max_size: 50m
## The maximum number of log files that can be present
# docker_log_max_file: 10
## Install/upgrade docker version
# docker_version: 17.12.1
## ICP install docker automatically
# install_docker: true

## Ingress Controller Settings
## You can add your ingress controller configuration, and the allowed configuration can refer to
## https://github.com/kubernetes/ingress-nginx/blob/nginx-0.9.0/docs/user-guide/configmap.md#configuration-options
# ingress_controller:
#   disable-access-log: 'true'

## Clean metrics indices in Elasticsearch older than this number of days
# metrics_max_age: 1

## Clean application log indices in Elasticsearch older than this number of days
# logs_maxage: 1

## Uncomment the line below to install Kibana as a managed service.
# kibana_install: true


# STARTING_CLOUDANT

# cloudant:
#   namespace: kube-system
#   pullPolicy: IfNotPresent
#   pvPath: /opt/ibm/cfc/cloudant
#   database:
#     password: fdrreedfddfreeedffde
#     federatorCommand: hostname
#     federationIdentifier: "-0"
#     readinessProbePeriodSeconds: 2
#     readinessProbeInitialDelaySeconds: 90

# END_CLOUDANT

我的目标是在我的本地机器(单节点)上设置 ICP,我非常感谢有关此问题的任何帮助。

4

3 回答 3

2

因此,我通过取消注释并将其设置# calico_ipip_enabled: true为 false 来解决此错误。

在那之后,由于我的环回 ip,我得到了另一个错误:

fatal: [127.0.0.1] => A loopback IP is used in your DNS server configuration. For more details, see https://ibm.biz/dns-fails.

但是通过loopback_dns: true链接中提到的设置有一个修复/解决方法。

我无法在这里结束这个问题,但这就是我解决它的方式。

于 2018-06-06T14:45:36.553 回答
0

IBM Cloud 私有操作系统是 ubuntu 16.04。请查看以下网址 https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.3/supported_system_config/supported_os.html

请检查系统要求..

我也在尝试安装设置。我没有遇到这个问题。

于 2018-06-06T12:11:13.853 回答
0

通常情况下,我们不能在 ICP hosts 文件中指定 127.0.0.1 作为 ICP 节点,谢谢。

于 2018-06-15T02:10:12.393 回答