Skip to content

Commit

Permalink
Introduce iSulad.
Browse files Browse the repository at this point in the history
Signed-off-by: luomengY <[email protected]>
  • Loading branch information
luomengY committed Aug 30, 2024
1 parent 49cfbbe commit e1dfa72
Show file tree
Hide file tree
Showing 2 changed files with 229 additions and 2 deletions.
119 changes: 118 additions & 1 deletion docs/setup/prerequisites/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ This page provides an outline of how to use several common container runtimes wi
- [cri-o](#cri-o)
- [docker](#docker-engine)
- [Kata containers](#kata-containers)
- [Virtlet](#Virtlet)
- [Virtlet](#virtlet)
- [iSulad](#isulad)

## containerd

Expand Down Expand Up @@ -283,3 +284,119 @@ Make sure no libvirt is running on the worker nodes.
vmruntime_vms
vmruntime_libvirt
vmruntime_virtlet

## iSulad

[iSulad](https://gitee.com/openeuler/iSulad) , written in C/C++, is a lightweight container engine that has the advantage of being light, fast and applicable to multiple hardware specifications and architecture. iSulad has a wide application prospect.

Follow the [install guide]( https://gitee.com/openeuler/iSulad/blob/master/README.md) to install and configure iSulad.

### Steps
1. **Install iSulad:**

- install on OpenEuler system

You can directly install through yum by adding OpenEuler's yum repository:

```bash
$ cat << EOF > /etc/yum.repos.d/openEuler.repo
[openEuler]
baseurl=https://repo.openeuler.org/openEuler-22.03-LTS/OS/\$basearch
enabled=1
EOF
```

Install iSulad with yum:

```bash
$ yum install -y iSulad
```

- install on CentOS system

You can install iSulad by running [scripts]( https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Centos_7.sh).

```bash
$ wget https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Centos_7.sh
$ sudo chmod +x ./install_iSulad_on_Centos_7.sh
$ sudo ./install_iSulad_on_Centos_7.sh
```

- install on Ubuntu system

You can install iSulad by running [scripts]( https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh).

```bash
$ wget https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh
$ sudo chmod +x ./install_iSulad_on_Ubuntu_20_04_LTS.sh
$ sudo ./install_iSulad_on_Ubuntu_20_04_LTS.sh
```

:::tip
The iSulad started supporting the CRI v1 interface in v2.1.4, and currently CRI v1 is not opened by default during compilation. If you need to use a newer version of KubeEdge (such as v1.15.0), you need to open `DENABLE_CRI_API_V1` in the script:

```bash
# build and install iSulad
cd $BUILD_DIR
sudo git clone https://gitee.com/openeuler/iSulad.git
cd iSulad
sudo mkdir build
cd build
sudo cmake -DENABLE_CRI_API_V1=ON ..
sudo make -j $(nproc)
sudo make install
```
:::

2. **Configure iSulad:**

Configure the container image registry address, for example `docker.io` or other registry addrss.

```bash
# cat /etc/isulad/daemon.json
.....
"registry-mirrors": [
"docker.io"
],
.....
```

Configure CNI plugin:

```bash
# cat /etc/isulad/daemon.json
.....
"network-plugin": "cni",
"cni-bin-dir": "/opt/cni/bin",
"cni-conf-dir": "/etc/cni/net.d",
.....
```

:::tip
The default `websocket-server-listening-port` value for iSulad is 10350, while KubeEdge's 10350 is the server port for edgecore, used for kubectl exec/logs, metrics, and more. So if iSulad is running on an edge node, there will be port conflicts. We need to change the `websocket-server-listening-port` of iSula to a value other than 10350, such as:
```bash
# cat /etc/isulad/daemon.json
.....
"websocket-server-listening-port": 10455,
.....
```
:::

:::tip
If CRI V1 needs to be used, the parameter `enable-cri-v1` needs to be set to true.

```bash
# cat /etc/isulad/daemon.json
.....
"enable-cri-v1": true,
.....
```
:::

3. **Run iSulad:**
Use systemd service to start iSulad:

```bash
$ systemctl enable isulad
$ systemctl restart isulad
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ sidebar_position: 3
- [cri-o](#cri-o)
- [docker](#docker-engine)
- [Kata containers](#kata-containers)
- [Virtlet](#Virtlet)
- [Virtlet](#virtlet)
- [iSulad](#isulad)

## containerd

Expand Down Expand Up @@ -289,3 +290,112 @@ Make sure no libvirt is running on the worker nodes.
vmruntime_vms
vmruntime_libvirt
vmruntime_virtlet

## iSulad

[iSulad](https://gitee.com/openeuler/iSulad) 是用C/C++编写的,是一个轻量级容器引擎,具有重量轻、速度快、适用于多种硬件规范和体系结构的优点,iSulad具有广阔的应用前景。 请遵循[安装指南]( https://gitee.com/openeuler/iSulad/blob/master/README.md)安装和配置iSulad.
### Steps
1. **安装iSulad:**

- 在OpenEuler系统上安装

您可以通过添加OpenEuler的yum仓库,直接通过yum进行安装:

```bash
$ cat << EOF > /etc/yum.repos.d/openEuler.repo
[openEuler]
baseurl=https://repo.openeuler.org/openEuler-22.03-LTS/OS/\$basearch
enabled=1
EOF
```

用yum工具安装iSulad:
```bash
$ yum install -y iSulad
```

- 在CentOS系统上安装

您可以通过运行[脚本]( https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Centos_7.sh)安装iSulad.
```bash
$ wget https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Centos_7.sh
$ sudo chmod +x ./install_iSulad_on_Centos_7.sh
$ sudo ./install_iSulad_on_Centos_7.sh
```

- 在Ubuntu系统上安装

你可以通过运行[脚本]( https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh)安装iSulad .
```bash
$ wget https://gitee.com/openeuler/iSulad/blob/master/docs/build_docs/guide/script/install_iSulad_on_Ubuntu_20_04_LTS.sh
$ sudo chmod +x ./install_iSulad_on_Ubuntu_20_04_LTS.sh
$ sudo ./install_iSulad_on_Ubuntu_20_04_LTS.sh
```
:::tip

iSulad从v2.1.4开始支持CRI v1接口,目前编译时默认不打开CRI v1。如果您需要使用更新版本的KubeEdge(>=v1.15.0),您需要在脚本中打开`DENABLE_CRI_API_V1`,如下所示:

```bash
# build and install iSulad
cd $BUILD_DIR
sudo git clone https://gitee.com/openeuler/iSulad.git
cd iSulad
sudo mkdir build
cd build
sudo cmake -DENABLE_CRI_API_V1=ON ..
sudo make -j $(nproc)
sudo make install
```
:::

2. **iSulad配置:**

配置容器镜像仓库地址,例如“docker.io”或其他地址。

```bash
# cat /etc/isulad/daemon.json
.....
"registry-mirrors": [
"docker.io"
],
.....
```

CNI插件配置:
```bash
# cat /etc/isulad/daemon.json
.....
"network-plugin": "cni",
"cni-bin-dir": "/opt/cni/bin",
"cni-conf-dir": "/etc/cni/net.d",
.....
```
:::tip

iSulad的`websocket-server-listening-port`默认端口为10350,而KubeEdge中10350是edgecore的server默认端口,用于kubectl exec/logs/metrics等。因此,如果iSula在边缘节点上运行,则会出现端口冲突。我们需要将iSulad的`websocket-server-listening-port`端口更改为10350以外的值,例如:
```bash
# cat /etc/isulad/daemon.json
.....
"websocket-server-listening-port": 10455,
.....
```
:::

:::tip
如果需要用CRI v1,则需要将参数`enable-cri-v1`设置为true,如下:

```bash
# cat /etc/isulad/daemon.json
.....
"enable-cri-v1": true,
.....
```
:::

3. **启动 iSulad:**

使用systemd service启动iSulad:
```bash
$ systemctl enable isulad
$ systemctl restart isulad
```

0 comments on commit e1dfa72

Please sign in to comment.