「CITA-Cloud」- 安装部署

  CREATED BY JENKINSBOT

解决方案

快速入门 — CITA-Cloud 文档

6.5 版本,容器以 ROOT 用户运行;
6.6 版本,容器以非 ROOT 用户运行;

快速部署

cita-cloud/charts at v6.2.0
https://cita-cloud-docs.readthedocs.io/zh_CN/latest/getting-start.html

git clone https://github.com/cita-cloud/charts.git
git checkout v6.2.0

# kubectl create namespace cita-cloud
# kubectl config set-context --current --namespace cita-cloud

helm --namespace cita-cloud install \
    test-chain-pvc ./cita-cloud-pvc/ --set scName=nas-client-provisioner

helm --namespace cita-cloud install              \
    test-chain ./cita-cloud-local-cluster        \
    --set pvcName=test-chain-pvc                 \
    --set replicaCount=4                         \
    --set service.nodePort=31004                 \
    --set service.vmPort=31005

通过 Helm 部署

helm repo add cita-cloud https://cita-cloud.github.io/charts
helm repo update
helm search repo cita-cloud/
...

// ---------------------------------------------------------------------------- // 

helm pull cita-cloud/cita-cloud-pvc                                             # cita-cloud-pvc-6.6.1.tgz

helm show values ./cita-cloud-pvc-6.6.1.tgz > cita-cloud-pvc-6.6.1.helm-vlaues.yaml
vim cita-cloud-pvc-6.6.1.helm-vlaues.yaml

helm install local-pvc                                                         \
    ./cita-cloud-pvc-6.6.1.tgz -f cita-cloud-pvc-6.6.1.helm-vlaues.yaml        \
    --namespace cita-cloud --create-namespace

kubectl get pvc

// ---------------------------------------------------------------------------- // 

helm pull cita-cloud/cita-cloud-local-cluster                                   # cita-cloud-local-cluster-6.6.1.tgz

helm show values ./cita-cloud-local-cluster-6.6.1.tgz > ./cita-cloud-local-cluster-6.6.1.helm-values.yaml

helm install test-chain                                                        \
    ./cita-cloud-local-cluster-6.6.1.tgz -f ./cita-cloud-local-cluster-6.6.1.helm-values.yaml \
    --namespace cita-cloud --create-namespace

kubectl get pods

通过 Cloud Config 创建

docker pull docker.io/cita-cloud/cloud-config

docker run -it --rm -v $(pwd):/data -w /data docker.io/cita-cloud/cloud-config \
    cloud-config create-k8s --admin 0x9bab5858df4a9e84ff3958884a01a4fce5e07edb \
    --nodelist localhost:40000:node0:k8s,localhost:40001:node1:k8s,localhost:40002:node2:k8s,localhost:40003:node3:k8s

docker run -it --rm -v $(pwd):/data -w /data docker.io/cita-cloud/cloud-config \
    cloud-config update-yaml --storage-class ceph-block --docker-registry docker.io --docker-repo cita-cloud --domain node0
docker run -it --rm -v $(pwd):/data -w /data docker.io/cita-cloud/cloud-config \
    cloud-config update-yaml --storage-class ceph-block --docker-registry docker.io --docker-repo cita-cloud --domain node1
docker run -it --rm -v $(pwd):/data -w /data docker.io/cita-cloud/cloud-config \
    cloud-config update-yaml --storage-class ceph-block --docker-registry docker.io --docker-repo cita-cloud --domain node2
docker run -it --rm -v $(pwd):/data -w /data docker.io/cita-cloud/cloud-config \
    cloud-config update-yaml --storage-class ceph-block --docker-registry docker.io --docker-repo cita-cloud --domain node3

kubectl apply -f test-chain-node0/yamls
kubectl apply -f test-chain-node1/yamls
kubectl apply -f test-chain-node2/yamls
kubectl apply -f test-chain-node3/yamls