You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

local-up.md 2.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ### Deploy Local Sedna Cluster
  2. The [local-up script](/hack/local-up.sh) boots a local Kubernetes cluster, installs latest KubeEdge, and deploys Sedna based on the Sedna local repository.
  3. #### Use Case
  4. When one is contributing new features for Sedna, codes like AI algorithms under testing can be frequently changed before final deployment.
  5. When coding in that case, s/he would suffer from tortured re-installations and frequent failures of the whole complicated system.
  6. To get rid of the torments, one can use the local-up installation, embraced the single-machine simulation for agiler development and testing.
  7. #### Setup
  8. It requires:
  9. - 2 CPUs or more
  10. - 1GB+ free memory
  11. - 5GB+ free disk space
  12. - Internet connection(docker hub, github etc.)
  13. - Linux platform, such as ubuntu/centos
  14. - Docker 17.06+
  15. - A local Sedna code repository
  16. Then you can enter Sedna local code repository, and create a local Sedna cluster with:
  17. ```
  18. bash hack/local-up.sh
  19. ```
  20. In more details, this local-up script uses [kind](https://kind.sigs.k8s.io/docs/user/quick-start/) to create a
  21. local K8S cluster with one master node, and joins the K8S cluster by running KubeEdge.
  22. In another terminal, you can see them by using `kubectl get nodes -o wide`:
  23. ```shell
  24. NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
  25. edge-node Ready agent,edge 3d21h v1.19.3-kubeedge-v1.6.1 192.168.0.233 <none> Ubuntu 18.04.5 LTS 4.15.0-128-generic docker://20.10.2
  26. sedna-control-plane Ready control-plane,master 3d21h v1.20.2 172.18.0.2 <none> Ubuntu 20.10 4.15.0-128-generic containerd://1.5.0-beta.3-24-g95513021e
  27. ```
  28. You can login the master node with:
  29. ```
  30. docker exec -it --detach-keys=ctrl-@ sedna-control-plane bash
  31. # since the master node just uses containerd CRI runtime, you can alias the CRI cli 'crictl' as 'docker'
  32. alias docker=crictl
  33. ```
  34. After you have done developing, built worker image and want to run your worker into master node, your worker image should be loaded into the cluster nodes with:
  35. ```
  36. kind load docker-image --name sedna <your-custom-worker-image>
  37. ```