DaoCloud Enterprise 5.0 是一款高性能、可扩展的云原生操作系统。 它能够在任何基础设施和任意环境中提供一致、稳定的体验,支持异构云、边缘云和多云编排。 DCE 5.0 集成了最新的服务网格和微服务技术,能够跟踪每一个流量的生发始终, 帮助您洞察集群、节点、应用和服务的详细指标,并通过动态仪表盘和拓扑大图可视化掌握应用健康状态。
1、准备节点
为了顺利安装DCE社区版,节点应满足如下要求:
2、安装Docker
3、安装kubectl
4、安装kind
5、使用kind创建集群
6、安装依赖包(helm、skopeo、kubectl、yq)
7、安装DCE 5.0
8、后续完善
操作系统 | CentOS 7.9 |
---|---|
内存大小 | > 12GB |
CPU核数 | > 8核 |
磁盘大小 | > 100GB |
实例类型 | m5.2xlarge |
C:\Users\xyb>ssh -i <密钥> [email protected]
[centos@ip-172-18-16-59 ~]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[centos@ip-172-18-16-59 ~]$
# 获取管理员权限
$ sudo -i
# 更新操作系统
# yum update -y
# sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# sudo sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
# sudo yum makecache fast
# sudo yum -y install docker-ce
# sudo service docker start
# sudo systemctl enable docker
# sudo systemctl status docker
# docker version
Client: Docker Engine - Community
Version: 24.0.5
API version: 1.43
Go version: go1.20.6
Git commit: ced0996
Built: Fri Jul 21 20:39:02 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.5
API version: 1.43 (minimum version 1.12)
Go version: go1.20.6
Git commit: a61e2b4
Built: Fri Jul 21 20:38:05 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
kind 是 Kubernetes 官方推荐用于快速搭建测试集群的工具,全称为 Kubernetes in Docker,指通过Docker 来运行Kubernetes。
# curl -Lo ./kind https://qiniu-download-public.daocloud.io/kind/v0.17.0/kind-linux-amd64
# chmod +x ./kind
# old_kind=$(which kind)
# if [ -f "$old_kind" ]; then mv ./kind $old_kind; else mv ./kind /usr/bin/kind ; fi
# kind version
kind v0.17.0 go1.19.2 linux/amd64
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 32088
hostPort: 8888
xyb-kind-cluster
集群kind create cluster --image release.daocloud.io/kpanda/kindest-node:v1.25.3 --name=xyb-kind-cluster --config=kind_cluster.yaml
# kind create cluster --image release.daocloud.io/kpanda/kindest-node:v1.25.3 --name=xyb-kind-cluster --config=kind_cluster.yaml
Creating cluster "xyb-kind-cluster" ...
✓ Ensuring node image (release.daocloud.io/kpanda/kindest-node:v1.25.3)
✓ Preparing nodes
✓ Writing configuration
✓ Starting control-plane ️
✓ Installing CNI
✓ Installing StorageClass
Set kubectl context to "kind-xyb-kind-cluster"
You can now use your cluster with:
kubectl cluster-info --context kind-xyb-kind-cluster
Have a nice day!
[root@dce ~]# kubectl cluster-info --context kind-xyb-kind-cluster
Kubernetes control plane is running at https://127.0.0.1:34915
CoreDNS is running at https://127.0.0.1:34915/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
[root@dce ~]# kubectl get nodes -A
NAME STATUS ROLES AGE VERSION
xyb-kind-cluster-control-plane Ready control-plane 23m v1.25.3
[root@dce ~]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-565d847f94-nmwdk 1/1 Running 0 23m
kube-system coredns-565d847f94-qmrxb 1/1 Running 0 23m
kube-system etcd-xyb-kind-cluster-control-plane 1/1 Running 0 23m
kube-system kindnet-tflqd 1/1 Running 0 23m
kube-system kube-apiserver-xyb-kind-cluster-control-plane 1/1 Running 0 23m
kube-system kube-controller-manager-xyb-kind-cluster-control-plane 1/1 Running 0 23m
kube-system kube-proxy-s744f 1/1 Running 0 23m
kube-system kube-scheduler-xyb-kind-cluster-control-plane 1/1 Running 0 23m
local-path-storage local-path-provisioner-684f458cdd-2znp7 1/1 Running 0 23m
在安装完Kind集群后,需要确保集群中已安装所有依赖项,且确保依赖包的版本符合以下要求:
# curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
# chmod 700 get_helm.sh
# yum install -y git
# ./get_helm.sh
# helm version
version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}
https://helm.sh/docs/intro/install/
# yum -y install skopeo
# skopeo --version
skopeo version 1.11.2-dev
https://github.com/containers/skopeo/blob/main/install.md
yum
仓库。如果你想使用 v1.28 之外的 Kubernetes 版本, 将下面命令中的 v1.28 替换为所需的次要版本。# cat <
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/repodata/repomd.xml.key
EOF
yum
安装 kubectl:# sudo yum install -y kubectl
# kubectl version
Client Version: v1.28.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.25.3
https://kubernetes.io/zh-cn/docs/tasks/tools/install-kubectl-linux/
# wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq
# yq --version
yq (https://github.com/mikefarah/yq/) version v4.35.1
✅https://github.com/mikefarah/yq
# export VERSION=v0.9.0
# curl -Lo ./dce5-installer https://proxy-qiniu-download-public.daocloud.io/DaoCloud_Enterprise/dce5/dce5-installer-$VERSION
# chmod +x ./dce5-installer
## 若选择使用本地虚拟机安装,执行如下命令:
# myIP=$(ip -o route get 1.1.1.1 | cut -d " " -f 7)
# ./dce5-installer install-app -z -k $myIP:8888
---
## 若选择使用云服务器实例进行安装,执行如下命令:
# ./dce5-installer install-app -z -k <公网IP地址>:8888
安装完成,结果如下图所示。
输入主机IP地址:8888
输入用户名和密码。
- 用户名:admin
- 密码:changeme
初次登录需要获取离线授权码。
获取离线授权码链接:https://license.daocloud.io/dce5-license
apiVersion: ghippo.io/v1alpha1
kind: GProductLicense
metadata:
name: kpanda
spec:
code: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lc3RhbXAiOiAxNjkzMjAyNzM5LCAibGljZW5zZSI6IHsidGllciI6ICIiLCAicmVzb3VyY2VfZGF0YSI6IHsia3BhbmRhIjoge319LCAidXBkYXRlZF9hdCI6IDE2OTMyMDI2NTYsICJjcmVhdGVkX2F0IjogMTY5MzIwMjY1NiwgInByb2R1Y3Rpb25fbmFtZSI6ICJcdTViYjlcdTU2NjhcdTdiYTFcdTc0MDYiLCAiYWxpYXMiOiAiXHU0ZjFmXHU0ZWQ1XHU0ZjczXHU2NzcwIiwgIm1ldGFfZGF0YSI6ICJ7XCJjbHVzdGVyX2lkXCI6IFwiMDY4OTMzNDctNTFiZS00YjU1LTg3MjMtMTg5ZDQ5OTNhZTZlXCJ9IiwgImV4cGlyYXRpb24iOiAxNzU2NjU2MDAwLCAia2V5IjogIkJDMTg2LTQ0Q0I1LUE0QkU1LTg1ODgxLTAxRjRDIiwgImxpY2Vuc2VfdHlwZSI6ICJvZmZsaW5lIn0sICJrZXkiOiAiQkMxODYtNDRDQjUtQTRCRTUtODU4ODEtMDFGNEMifQ.YF4G_h6Pu-k0WePtW_uk1SzSj25oNEC9pDX7KODBm0cQCendSJ5OgA_B6Jaq-XMnR2Uk6XQmyDMzaeoAr4wswwgf4o0opRn27RkDB5WC3Texem5Qd5gdjRJ8BsTnbtvaA1j3gOv1Q5SGSOdP2kPAGk3hKbsN6KlFuN3uclK87Uyrp4A37ySfkPJzZwAZ7s0nTUs00gpkhdo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zHhVzU_AlQuzg36NOIKA
选择激活许可证
。
容器管理等授权被激活。
成功登录至DCE 5.0社区版管理后台。
[root@ip-172-18-16-59 ~]# kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
ghippo-system ghippo-anakin-69df9779d7-nhlt5 2/2 Running 0 136m
ghippo-system ghippo-apiserver-558d9c4674-bk94x 2/2 Running 0 136m
ghippo-system ghippo-auditserver-5f9fd89668-5b2g8 2/2 Running 0 136m
ghippo-system ghippo-controller-manager-575dfc6fb8-6nc8c 2/2 Running 0 136m
ghippo-system ghippo-keycloakx-0 2/2 Running 0 136m
ghippo-system ghippo-ui-85dd696b6-z65hf 2/2 Running 0 136m
insight-system grafana-deployment-69467c755f-fd8mn 1/1 Running 0 128m
insight-system insight-agent-fluent-bit-hqpd8 1/1 Running 0 127m
insight-system insight-agent-kube-prometh-operator-74d6f98b67-t6frm 1/1 Running 0 127m
insight-system insight-agent-kube-state-metrics-56b5f9b594-ggsh2 1/1 Running 0 127m
insight-system insight-agent-kubernetes-event-exporter-658b7dbdc4-mqfnc 1/1 Running 0 127m
insight-system insight-agent-prometheus-node-exporter-jvplg 1/1 Running 0 127m
insight-system insight-agent-tailing-sidecar-operator-759d9fcbdd-75b66 2/2 Running 0 127m
insight-system insight-grafana-operator-66856b4db7-dtwjl 1/1 Running 0 130m
insight-system insight-opentelemetry-collector-7b4976995d-2wjnz 1/1 Running 0 130m
insight-system insight-runbook-6c89784569-ccqrs 1/1 Running 0 130m
insight-system insight-server-864b9cc868-kt728 1/1 Running 0 130m
insight-system insight-ui-56fcd89fd7-dgbjn 1/1 Running 0 130m
insight-system insight-victoria-metrics-operator-77bf54cf77-z76zh 1/1 Running 0 130m
insight-system prometheus-insight-agent-kube-prometh-prometheus-0 2/2 Running 0 126m
insight-system prometheus-insight-agent-kube-prometh-prometheus-1 2/2 Running 0 126m
insight-system vmalert-insight-victoria-metrics-k8s-stack-85788775b8-jpjqf 2/2 Running 0 130m
insight-system vmalertmanager-insight-victoria-metrics-k8s-stack-0 2/2 Running 0 130m
insight-system vminsert-insight-victoria-metrics-k8s-stack-6bf6d785fb-r64d2 1/1 Running 0 130m
insight-system vmselect-insight-victoria-metrics-k8s-stack-0 1/1 Running 0 130m
insight-system vmstorage-insight-victoria-metrics-k8s-stack-0 1/1 Running 0 130m
ipavo-system ipavo-749886b5c6-9tg89 2/2 Running 0 126m
ipavo-system ipavo-749886b5c6-j64cn 2/2 Running 0 126m
ipavo-system ipavo-ui-7d99c68cdf-qlzzd 1/1 Running 0 126m
ipavo-system ipavo-ui-7d99c68cdf-zv6ng 1/1 Running 0 126m
istio-system istio-ingressgateway-5dff699dd7-vszlq 1/1 Running 0 143m
istio-system istio-os-init-8qgvx 1/1 Running 0 142m
istio-system istiod-69c59b6bbd-vhzkg 1/1 Running 0 143m
kcollie-system kcollie-apiserver-67f664cdc4-jzjj8 1/1 Running 0 125m
kcollie-system kcollie-collector-684496988b-9cvr4 1/1 Running 0 125m
kcollie-system kcollie-collector-684496988b-9lbhw 1/1 Running 0 125m
kcollie-system kcollie-controller-manager-7798cdbdf7-5bmkn 1/1 Running 0 125m
kcollie-system kcollie-controller-manager-7798cdbdf7-jdx42 1/1 Running 0 125m
kcollie-system kcollie-ui-5cc7f6459-rd7kt 1/1 Running 0 125m
kcollie-system vmalert-kcollie-receiver-5f775d68cc-7szzz 2/2 Running 0 125m
kpanda-system kpanda-apiserver-7d5d8c55d8-cttj8 2/2 Running 1 (131m ago) 133m
kpanda-system kpanda-bindings-syncer-5d9cf7d44b-nhmdf 2/2 Running 1 (132m ago) 133m
kpanda-system kpanda-cloudtty-controller-manager-855c465bd4-thnwb 2/2 Running 1 (132m ago) 133m
kpanda-system kpanda-clusterpedia-apiserver-6447888f47-t4wn9 2/2 Running 0 133m
kpanda-system kpanda-clusterpedia-clustersynchro-manager-64cb4c49cc-rfxd7 2/2 Running 0 133m
kpanda-system kpanda-clusterpedia-controller-manager-74b9b5659f-8fskw 2/2 Running 0 133m
kpanda-system kpanda-controller-manager-bbc8f4994-kp5mc 2/2 Running 1 (132m ago) 133m
kpanda-system kpanda-egress-7759b995dc-l9j6k 3/3 Running 1 (132m ago) 133m
kpanda-system kpanda-ingress-f59d6cc4b-xrbjm 3/3 Running 1 (132m ago) 133m
kpanda-system kpanda-ui-c5f65cf5-bt8k2 2/2 Running 0 133m
kube-system coredns-565d847f94-4v5ft 1/1 Running 0 145m
kube-system coredns-565d847f94-vcx9s 1/1 Running 0 145m
kube-system etcd-xyb-kind-cluster-control-plane 1/1 Running 0 145m
kube-system kindnet-slc2s 1/1 Running 0 145m
kube-system kube-apiserver-xyb-kind-cluster-control-plane 1/1 Running 0 145m
kube-system kube-controller-manager-xyb-kind-cluster-control-plane 1/1 Running 0 145m
kube-system kube-proxy-2j5pd 1/1 Running 0 145m
kube-system kube-scheduler-xyb-kind-cluster-control-plane 1/1 Running 0 145m
local-path-storage local-path-provisioner-684f458cdd-fsjnh 1/1 Running 0 145m
mcamel-system console-5f559b8f77-285w4 1/1 Running 0 142m
mcamel-system elastic-operator-0 1/1 Running 0 142m
mcamel-system mcamel-common-es-cluster-masters-es-data-0 1/1 Running 0 140m
mcamel-system mcamel-common-kpanda-mysql-cluster-mysql-0 4/4 Running 0 140m
mcamel-system mcamel-common-minio-cluster-pool-0-0 1/1 Running 0 140m
mcamel-system mcamel-common-mysql-cluster-mysql-0 4/4 Running 1 (137m ago) 140m
mcamel-system minio-operator-69859d5848-xzjsd 1/1 Running 0 142m
mcamel-system mysql-operator-0 2/2 Running 0 142m
mcamel-system redis-cluster-operator-cc9d4b5f5-l5mx7 1/1 Running 0 142m
mcamel-system redis-cluster-operator-redis-ha-operator-65444cfc84-szmw2 1/1 Running 0 142m
mcamel-system rfr-mcamel-common-redis-cluster-0 1/1 Running 0 140m
mcamel-system rfs-mcamel-common-redis-cluster-7b886475d4-x6bds 1/1 Running 0 140m
系统依赖包需要设置成指定的版本。
本实验采用的是CentOS 7.9操作系统进行安装的。之前采用Rocky Linux 9.2操作系统进行安装发现系统不兼容。具体的系统兼容配置请参考如下链接:
DCE 5 声明支持的 OS 类型:https://docs.daocloud.io/install/commercial/deploy-requirements.html
未声明支持的 Other Linux 离线部署 DCE 5.0 商业版: https://docs.daocloud.io/install/os-install/otherlinux.html
https://docs.daocloud.io/install/community/kind/online/
https://www.daocloud.io/