sync openeuler

Signed-off-by: Grooooot <isula@huawei.com>
This commit is contained in:
Grooooot 2020-01-21 10:01:32 +08:00
parent d4b1db5691
commit e9789ed8b8
5 changed files with 89 additions and 44 deletions

View File

@ -17,7 +17,7 @@ yum install -y iSulad
### Run
We provide `systemd` service to start `iSulad`
```sh
systemd start isulad # run the server with systemd command
systemctl start isulad # run the server with systemd command
```
You can use direct command to start `iSulad` server

43
docs/architecture_en.md Normal file
View File

@ -0,0 +1,43 @@
# iSulad Architecture
## Overview
![architecture](design/arch.jpg)
iSulad is an OCI-compliant container running engine that emphasizes simplicity, robustness, and lightweight.
As a daemon process, it manages the entire container life cycle of the host system, including image transmission and storage, container execution and monitoring management, container resource management, and network management. iSulad provides Docker-like CLI man-machine interfaces for external systems.
You can use Docker-like commands to manage containers and provides gRPC APIs that comply with the CRI interface standard for Kubernetes to invoke based on the CRI interface protocol.
For easily understanding, the behavior unit of the iSulad is divided into different modules, and the modules are roughly organized into subsystems. Understanding these modules, subsystems, and their relationships is key to modifying and extending iSulad.
This document describes only the high-level function design of each module. For more information about each module, see the relevant design documents.
## Subsystem
You can interact with the iSulad by calling gRPC APIs provided by the subsystem.
- **image service** : Image management service, which provides image-related operations, such as image download, query, and deletion.
- **execution service**: Container life cycle management service, which provides container-related operations, such as container creation, startup, and deletion.
- **network**The network subsystem is responsible for network management capabilities of the pod of the CRI. When a pod is started, the pod is added to the network plane specified in the configuration file through the CNI interface. When a pod is stopped, the CNI API is used to remove the pod from the network plane where the pod is located and clear related network resources.
## Module
- **image content** : Managing Image Metadata and Container File Systems
- **resource manage**: Container resource management, for example, setting available CPU and memory resource limits
- **Executor**Runtime for executing actual container operations. The LCR is provided as the default runtime and can be extended through the plug-in mechanism.
- **Events**Container event collection
- **Plugins**Provides the plugin mechanism to extend container functions through different plugins.
- **HA**The log mechanism is provided for fault locating. The garbage collection mechanism is provided to reclaim abnormal container resources such as D and Z.
### Network architecture design
The following figure shows the architecture:
![CNI_architecture](./design/CNI_architecture.png)

View File

@ -1,41 +1,41 @@
# iSulad Architecture
## Overview
![architecture](design/architecture.png)
iSulad是一个符合OCI标准的容器运行引擎强调简单性、健壮性和轻量化。它作为守护进程提供服务,可以管理其主机系统的整个容器生命周期镜像的传输和存储、容器执行和监控管理、容器资源管理以及网络等。iSulad对外提供与docker类似的CLI人机接口可以使用与docker类似的命令进行容器管理并且提供符合CRI接口标准的gRPC API可供kubernetes\Hasen 按照CRI接口协议调用。
为了方便理解我们将iSulad的行为单元分成不同的模块,模块大致被组织成子系统。了解这些模块、子系统及其关系是修改和扩展iSulad的关键
本文档将仅描述各个模块的high-level功能设计。有关每个模块的详细信息请参阅相关设计文档。
## 子系统
外部用户通过调用子系统提供的GRPC API与iSulad进行交互。
- **image service** : 镜像管理服务,提供镜像相关操作,如镜像下载、查询、删除等
- **execution service**: 容器生命周期管理服务,提供容器的相关操作,如容器创建、启动、删除等
- **network**网络子模块负责CRI的Pod的网络管理能力。当Pod启动时通过CNI的接口把该Pod加入到配置文件制定的网络平面中当Pod停止时通过CNI的接口把该Pod从所在的网络平面中退出并且清理相关的网络资源。
## 模块
- **image content** : 管理镜像元数据以及容器文件系统。
- **resource manage**: 容器资源管理如设置可用cpu、memory等资源限制
- **Executor**执行实际容器操作的runtime提供lcr作为默认runtime可通过plugin机制扩展
- **Events**:容器事件收集
- **Plugins**:提供插件机制,通过不同插件,实现扩展容器功能。
- **DFX**提供日志机制用于定位问题提供garbage collect 机制回收容器D/Z 等异常容器资源具备DFX能力
### 网络架构设计
架构图,如下:
![CNI_architecture](./design/CNI_architecture.png)
# iSulad Architecture
## Overview
![architecture](design/arch.jpg)
iSulad是一个基于OCI标准的容器运行引擎强调简单性、健壮性和轻量化。
作为守护进程iSulad提供容器生命周期管理相关服务包括镜像的传输和存储、容器执行和监控管理、容器资源管理以及网络等。iSulad对外提供与docker类似的CLI命令行接口,可使用该命令行进行容器管理;并且提供符合CRI接口标准的gRPC API可供kubernetes 按照CRI接口协议调用。
为了方便理解我们将iSulad分成不同的模块,并根据模块的类别组织成子系统。了解这些模块、子系统及其关系是修改和扩展iSulad的关键
本文档将仅描述各个模块的high-level功能设计。有关每个模块的详细信息请参阅相关设计文档。
## 子系统
用户通过调用子系统提供的GRPC API与iSulad进行交互。
- **image service** : 镜像管理服务,提供镜像相关操作,如镜像下载、查询、删除等
- **execution service**: 容器生命周期管理服务,提供容器的相关操作,如容器创建、启动、删除等
- **network**网络子模块负责CRI的Pod的网络管理能力。当Pod启动时通过CNI的接口把该Pod加入到配置文件制定的网络平面中当Pod停止时通过CNI的接口把该Pod从所在的网络平面中退出并且清理相关的网络资源。
## 模块
- **image content** : 管理镜像元数据以及容器文件系统。
- **resource manage**: 容器资源管理如设置可用cpu、memory等资源限制
- **Executor**执行实际容器操作的runtime提供lcr作为默认runtime可通过plugin机制扩展
- **Events**:容器事件收集
- **Plugins**:提供插件机制,通过不同插件,实现扩展容器功能。
- **HA**提供日志机制用于定位问题提供garbage collect 机制回收容器D/Z 等异常容器资源。
### 网络架构设计
架构图,如下:
![CNI_architecture](./design/CNI_architecture.png)

BIN
docs/design/arch.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -1,5 +1,5 @@
%global _version 1.1.9
%global _release 20200120.104710.gitdf7191f2
%global _release 20200121.100120.gite61a5e35
%global is_systemd 1
%global debug_package %{nil}
@ -32,7 +32,7 @@ Requires(preun): initscripts
BuildRequires: cmake gcc-c++ lxc lxc-devel lcr yajl yajl-devel clibcni-devel
BuildRequires: grpc grpc-devel protobuf-devel
BuildRequires: libcurl libcurl-devel sqlite-devel
BuildRequires: http-parser http-parser-devel libevhtp-devel libevent-devel
BuildRequires: http-parser-devel libevhtp-devel libevent-devel
BuildRequires: libseccomp-devel libcap-devel libwebsockets libwebsockets-devel
BuildRequires: systemd-devel git
@ -109,6 +109,7 @@ rm -rf %{buildroot}
%pre
# support update from lcrd to isulad, will remove in next version
if [ "$1" = "2" ]; then
%if 0%{?is_systemd}
systemctl stop lcrd
systemctl disable lcrd
@ -118,6 +119,7 @@ fi
%else
/sbin/chkconfig --del lcrd
%endif
fi
%post
if ! getent group isulad > /dev/null; then