背景:VMware15.0 ubuntu16.04-64bit 32G RAM + 16Core CPU /etc/hosts: 192.168.79.130 localhost
这样做(并在出现提示时输入 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”</p>
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)"
修改为:</p>
#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 谢谢!</p>
日志:('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
...