-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from llhuii/allinone-script
Add all-in-one installation script/docs
- Loading branch information
Showing
7 changed files
with
748 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
### Deploy All In One Sedna | ||
The [all-in-one script](/scripts/installation/all-in-one.sh) is used to install Sedna along with a mini Kubernetes environment locally, including: | ||
- A Kubernetes v1.21 cluster with multi worker nodes, default zero worker node. | ||
- KubeEdge with multi edge nodes, default is latest KubeEdge and one edge node. | ||
- Sedna, default is the latest version. | ||
|
||
It requires you: | ||
- 2 CPUs or more | ||
- 2GB+ free memory, depends on node number setting | ||
- 10GB+ free disk space | ||
- Internet connection(docker hub, github etc.) | ||
- Linux platform, such as ubuntu/centos | ||
- Docker 17.06+ | ||
|
||
For example: | ||
|
||
```bash | ||
curl https://raw.githubusercontent.com/kubeedge/sedna/master/scripts/installation/all-in-one.sh | NUM_EDGE_NODES=2 bash - | ||
``` | ||
|
||
Above command installs a mini Sedna environment, including: | ||
- A Kubernetes v1.21 cluster with only one master node. | ||
- KubeEdge with two edge nodes. | ||
- The latest Sedna. | ||
|
||
You can play it online on [katacoda](https://www.katacoda.com/kubeedge-sedna/scenarios/all-in-one). | ||
|
||
Advanced options: | ||
| Env Variable | Description| Default Value| | ||
| --- | --- | --- | | ||
|NUM_EDGE_NODES | Number of KubeEdge nodes| 1 | | ||
|NUM_CLOUD_WORKER_NODES | Number of cloud **worker** nodes, not master node| 0| | ||
|SEDNA_VERSION | The Sedna version to be installed. |The latest version| | ||
|KUBEEDGE_VERSION | The KubeEdge version to be installed. |The latest version| | ||
|CLUSTER_NAME | The all-in-one cluster name| sedna-mini| | ||
|FORCE_INSTALL_SEDNA | If 'true', force to reinstall Sedna|false| | ||
|NODE_IMAGE | Custom node image| kubeedge/sedna-allinone-node:v1.21.1| | ||
|REUSE_EDGE_CONTAINER | Whether reuse edge node containers or not|true| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,48 @@ | ||
### 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. | ||
|
||
#### Setup | ||
|
||
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. | ||
You can see them by using `kubectl get nodes -o wide`: | ||
|
||
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. | ||
|
||
In another terminal, 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 your worker into master node, your worker image 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> | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
There are some ways to set up Sedna, depends on your use 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. | ||
|
||
- 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. The local-up version boots a local Kubernetes cluster and installs Sedna based on a local repository. The use case and setup procedures are available [here](./local-up.md). | ||
|
||
|
||
After set up Sedna, you can try out [examples](/examples). | ||
|
Oops, something went wrong.