Skip to content

Commit

Permalink
Update local-up docs according to review comment
Browse files Browse the repository at this point in the history
Signed-off-by: llhuii <[email protected]>
  • Loading branch information
llhuii committed Sep 18, 2021
1 parent 54f1d1b commit af586db
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
34 changes: 27 additions & 7 deletions docs/setup/local-up.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
### Deploy local Sedna clusters
### Deploy Local Sedna cluster

Once you have docker running, you can create a local Sedna cluster with:
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.

#### Use Case
When one is contributing new features for Sedna, codes like AI algorithms under testing can be frequently changed before final deployment. When coding in that case, s/he would suffer from tortured re-installations and frequent failures of the whole complicated system. To get rid of the torments, one can use the local-up installation, embraced the single-machine simulation for agiler development and testing.

#### Set up

It requires:
- 2 CPUs or more
- 1GB+ free memory
- 5GB+ free disk space
- Internet connection(docker hub, github etc.)
- Linux platform, such as ubuntu/centos
- Docker 17.06+
- A local Sedna code repository


Then you can enter Sedna local code repository, and create a local Sedna cluster with:
```
bash hack/local-up.sh
```
This script uses [kind](https://kind.sigs.k8s.io/docs/user/quick-start/) to create a
local k8s cluster with one master node, and boots one edge node by running KubeEdge.

In more details, this local-up script uses [kind](https://kind.sigs.k8s.io/docs/user/quick-start/) to create a
local K8S cluster with one master node, and joins the K8S cluster by running KubeEdge.

You can see them by using `kubectl get nodes -o wide`:
```shell
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
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
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
```

You can access master node with:
You can login the master node with:
```
docker exec -it --detach-keys=ctrl-@ sedna-control-plane bash
# since the master node just uses containerd CRI runtime, you can alias the CRI cli 'crictl' as 'docker'
alias docker=crictl
```

Docker images can be loaded into the cluster nodes with:
After you have done developing, built worker image and want to run the worker into master node, the worker images should be loaded into the cluster nodes with:
```
kind load docker-image my-custom-image --name sedna
kind load docker-image --name sedna <your-custom-worker-image>
```

11 changes: 7 additions & 4 deletions docs/setup/quick-start.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
There are some ways to set up Sedna, depends on your use case:
There are some ways to setup Sedna, depends on youruse case:
- If you have none Kubernetes environment and don't want to install Kubernetes manually, you can follow [the instruction](./all-in-one.md) to install all-in-one Sedna environment.
- Else you can follow [this instruction](./install.md) to install Sedna on existing Kubernetes cluster.
- Also [there is a local up script](./local-up.md) which is mainly used for developing Sedna, it boots a local Kubernetes cluster and installs Sedna based on local Sedna repository.
- Otherwise, when Kubernetes is ready, you can follow [this instruction](./install.md) to install Sedna on the existing Kubernetes cluster.

- One more thing: we also have a local-up install script available for easier Sedna development. In details, the local-up version boots a local Kubernetes cluster and installs Sedna based on a local repository, you can see in [here](./local-up.md).


After setup Sedna, you can try out [examples](/examples).

After set up Sedna, you can try out [examples](/examples).

0 comments on commit af586db

Please sign in to comment.