尝试安装Acumos时出错

时间:2019-09-17 09:49:51

标签: acumos

背景: VMware15.0 ubuntu16.04-64bit 32G RAM + 16Core CPU / etc / hosts: 192.168.79.130本地主机

执行此操作(并在出现提示时输入sudo密码):

git clone https://gerrit.acumos.org/r/system-integration
apt-get -y update
apt-get -y install docker-ce=18.06.3~ce~3-0~ubuntu
if [[ "$(id -nG "$USER" | grep docker)" == "" ]]; then sudo usermod -aG docker $USER; fi
# Logged out and in again and verified that my user is in the docker group
cd system-integration/tools/
bash setup_k8s_stack.sh setup
cd
bash system-integration/AIO/setup_prereqs.sh k8s localhost $USER generic 2>&1 | tee aio_prep.log
# When "Prerequisites setup is complete" messages is displayed I continue with
cd system-integration/AIO
bash oneclick_deploy.sh 2>&1 | tee aio_deploy.log

部署失败,并显示以下错误消息:

+ c='-l component=192.168.79.130'
++ kubectl get deployment -n acumos -l app=cds -l component=192.168.79.130 -o json
++ jq -r '.items[0].metadata.name'
+ dep=null
++ cat /tmp/a72a447b-df96-4fec-98c9-bb99e447d00d
+ kubectl patch deployment -n acumos null --patch 'spec:
  template:
    spec:
      hostAliases:
      - ip: "192.168.79.130"
        hostnames:
        - "ubuntu"'
Error from server (NotFound): deployments.extensions "null" not found

打开文件:“ system-integration / AIO / utils.sh”

  if [[ "$component" != "" ]]; then c="-l component=$component"; fi
  dep=$(kubectl get deployment -n $namespace -l app=$app $c -o json | jq -r ".items[0].metadata.name")
  kubectl patch deployment -n $namespace $dep --patch "$(cat $tmp)"

修改为:

  #if [[ "$component" != "" ]]; then c="-l component=$component"; fi
  dep=$(kubectl get deployment -n $namespace -l app=$app $c -o json | jq -r ".items[0].metadata.name")
  kubectl patch deployment -n $namespace filebeat --patch "$(cat $tmp)"

此错误已解决,但发生以下错误:

oneclick_deploy.sh setup_federation:233 (Tue Sep 17 02:32:31 PDT 2019) CDS API is not yet ready; waiting 10 seconds
+ t=300
+ sleep 10
++ curl -k -u ccds_client:187bbf19-40b9-45c8-9945-4903292d963d https://localhost/ccds/peer
++ grep -c numberOfElements
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   203  100   203    0     0    957      0 --:--:-- --:--:-- --:--:--   962
+ [[ 0 -eq 0 ]]
+ [[ 300 -eq 300 ]]
+ fail 'CDS API is not ready after 300 seconds'
+ set +x

oneclick_deploy.sh fail:42 (Tue Sep 17 02:32:41 PDT 2019) CDS API is not ready after 300 seconds

pod cds发生错误:CrashLoopBackOff 日志:

Events:
  Type     Reason     Age                  From               Message
  ----     ------     ----                 ----               -------
  Normal   Scheduled  13m                  default-scheduler  Successfully assigned acumos/cds-7474fccbc7-nm4jk to ubuntu
  Normal   Pulled     9m28s (x5 over 13m)  kubelet, ubuntu    Container image "nexus3.acumos.org:10002/common-dataservice:2.2.5" already present on machine
  Normal   Created    9m28s (x5 over 13m)  kubelet, ubuntu    Created container
  Normal   Started    9m28s (x5 over 13m)  kubelet, ubuntu    Started container
  Warning  BackOff    3m9s (x28 over 12m)  kubelet, ubuntu    Back-off restarting failed container

此问题与上一个类似: Errors trying to install Acumos Boreas release 谢谢!

logs :(“用于CD的修补程序部署”)

...
oneclick_deploy.sh start_deployment:518 (Tue Sep 17 18:25:16 PDT 2019) Creating deployment cds
+ kubectl create -f deploy/cds-deployment.yaml
deployment.apps/cds created
+ get_host_ip_from_etc_hosts localhost
+ trap fail ERR
++ grep -v '^127\.'
++ awk '{print $1}'
++ grep -E '\slocalhost( |$)' /etc/hosts
+ HOST_IP='192.168.79.130
192.168.79.130'
+ [[ 192.168.79.130
192.168.79.130 != '' ]]
+ patch_deployment_with_host_alias acumos cds ubuntu 192.168.79.130 192.168.79.130
+ trap fail ERR
+ namespace=acumos
+ app=cds
+ name=ubuntu
+ ip=192.168.79.130
+ component=192.168.79.130
+ log 'Patch deployment for cds (192.168.79.130), to restart it with the changes'
+ setx=x
+ set +x

oneclick_deploy.sh patch_deployment_with_host_alias:448 (Tue Sep 17 18:25:17 PDT 2019) Patch deployment for cds (192.168.79.130), to restart it with the changes
++ uuidgen
+ tmp=/tmp/ef6cab06-ece6-436b-812c-1a00728bec01
+ cat
+ [[ 192.168.79.130 != '' ]]
+ c='-l component=192.168.79.130'
++ kubectl get deployment -n acumos -l app=cds -l component=192.168.79.130 -o json
...

1 个答案:

答案 0 :(得分:0)

两个建议:

(1)将自己添加到无密码的sudo权限

sudo visudo
(add to the end of the file and save)
<your username>   ALL=(ALL:ALL) NOPASSWD:ALL

2)关于“部署失败,并显示以下错误消息:”,'-l component = 192.168.79.130'指示导致bug(导致utils.sh中的patch_deployment_with_host_alias)认为存在指定的组件(参数5)。 。对此的特定调用是从cds应用程序的start_acumos_core_app处

patch_deployment_with_host_alias $ACUMOS_NAMESPACE $app $ACUMOS_MARIADB_HOST $HOST_IP  
or
patch_deployment_with_host_alias $ACUMOS_NAMESPACE $app $ACUMOS_HOST $HOST_IP

由于其中最多有四个参数(从master开始),您能否提供更多的日志(返回到输出的行:“ cds的补丁部署”)。

除此以外,不需要更新utils.sh,我认为您所做的更改可能会产生副作用。因此,我将撤销这些更改: -您将$ dep替换为filebeat 这可能使您有所进步,但是却破坏了该功能的目的(为组件添加主机别名-不仅仅是文件拍子-引用DNS中不可解析的名称)。