From c7ae0864e9ac5cfc3d721edc76ab48a1ad2724be Mon Sep 17 00:00:00 2001 From: zhangsong234 Date: Wed, 17 Jun 2020 04:30:21 +0800 Subject: [PATCH] Modify docs for syscontainer Signed-off-by: zhangsong234 --- .../en/docs/Container/device-management.md | 16 ++--- .../dynamically-loading-the-kernel-module.md | 10 +-- .../docs/Container/installation-guideline.md | 2 +- content/en/docs/Container/nic-management.md | 20 +++--- .../proc-file-system-isolation-(lxcfs).md | 10 +-- content/en/docs/Container/route-management.md | 18 ++--- .../Container/volume-mounting-management.md | 16 ++--- ...05\346\240\270\346\250\241\345\235\227.md" | 10 +-- ...14\351\232\224\347\246\273\346\200\247.md" | 10 +-- ...11\350\243\205\346\214\207\345\257\274.md" | 2 +- ...50\346\200\201\347\256\241\347\220\206.md" | 70 +++++++++---------- 11 files changed, 92 insertions(+), 92 deletions(-) diff --git a/content/en/docs/Container/device-management.md b/content/en/docs/Container/device-management.md index 1c3285516..b3946a031 100644 --- a/content/en/docs/Container/device-management.md +++ b/content/en/docs/Container/device-management.md @@ -2,12 +2,12 @@ ## Function Description -isulad-tools allows you to add block devices \(such as disks and logical volume managers\) or character devices \(such as GPUs, binners, and FUSEs\) on the host to a container. The devices can be used in the container. For example, you can run the **fdisk** command to format the disk and write data to the file system. If the devices are not required, isulad-tools allows you to delete them from the container and return them to the host. +syscontainer-tools allows you to add block devices \(such as disks and logical volume managers\) or character devices \(such as GPUs, binners, and FUSEs\) on the host to a container. The devices can be used in the container. For example, you can run the **fdisk** command to format the disk and write data to the file system. If the devices are not required, syscontainer-tools allows you to delete them from the container and return them to the host. ## Command Format ``` -isulad-tools [COMMADN][OPTIONS] [ARG...] +syscontainer-tools [COMMADN][OPTIONS] [ARG...] ``` In the preceding format: @@ -87,16 +87,16 @@ In the preceding format: - You can add or delete devices when container instances are not running. After the operation is complete, you can start the container to view the device status. You can also dynamically add a device when the container is running. - Do not concurrently run the **fdisk** command to format disks in a container and on the host. Otherwise, the container disk usage will be affected. -- When you run the **add-device** command to add a disk to a specific directory of a container, if the parent directory in the container is a multi-level directory \(for example, **/dev/a/b/c/d/e**\) and the directory level does not exist, isulad-tools will automatically create the corresponding directory in the container. When the disk is deleted, the created parent directory is not deleted. If you run the **add-device** command to add a device to this parent directory again, a message is displayed, indicating that a device already exists and cannot be added. +- When you run the **add-device** command to add a disk to a specific directory of a container, if the parent directory in the container is a multi-level directory \(for example, **/dev/a/b/c/d/e**\) and the directory level does not exist, syscontainer-tools will automatically create the corresponding directory in the container. When the disk is deleted, the created parent directory is not deleted. If you run the **add-device** command to add a device to this parent directory again, a message is displayed, indicating that a device already exists and cannot be added. - When you run the** add-device** command to add a disk or update disk parameters, you need to configure the disk QoS. Do not set the write or read rate limit for the block device \(I/O/s or byte/s\) to a small value. If the value is too small, the disk may be unreadable \(the actual reason is the speed is too slow\), affecting service functions. - When you run the **--blkio-weight-device** command to limit the weight of a specified block device, if the block device supports only the BFQ mode, an error may be reported, prompting you to check whether the current OS environment supports setting the weight of the BFQ block device. ## Example -- Start a system container, and set **hook spec** to the isulad hook execution script. +- Start a system container, and set **hook spec** to the syscontainer hook execution script. ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init eed1096c8c7a0eca6d92b1b3bc3dd59a2a2adf4ce44f18f5372408ced88f8350 ``` @@ -104,7 +104,7 @@ In the preceding format: - Add a block device to a container. ``` - [root@localhost ~]# isulad-tools add-device ee /dev/sdb:/dev/sdb123 + [root@localhost ~]# syscontainer-tools add-device ee /dev/sdb:/dev/sdb123 Add device (/dev/sdb) to container(ee,/dev/sdb123) done. [root@localhost ~]# isula exec ee fdisk -l /dev/sdb123 Disk /dev/sdb123: 50 GiB, 53687091200 bytes, 104857600 sectors @@ -122,14 +122,14 @@ In the preceding format: - Update the device information. ``` - [root@localhost ~]# isulad-tools update-device --device-read-bps /dev/sdb:10m ee + [root@localhost ~]# syscontainer-tools update-device --device-read-bps /dev/sdb:10m ee Update read bps for device (/dev/sdb,10485760) done. ``` - Delete a device. ``` - [root@localhost ~]# isulad-tools remove-device ee /dev/sdb:/dev/sdb123 + [root@localhost ~]# syscontainer-tools remove-device ee /dev/sdb:/dev/sdb123 Remove device (/dev/sdb) from container(ee,/dev/sdb123) done. Remove read bps for device (/dev/sdb) done. ``` diff --git a/content/en/docs/Container/dynamically-loading-the-kernel-module.md b/content/en/docs/Container/dynamically-loading-the-kernel-module.md index 695202479..6f821f774 100644 --- a/content/en/docs/Container/dynamically-loading-the-kernel-module.md +++ b/content/en/docs/Container/dynamically-loading-the-kernel-module.md @@ -2,7 +2,7 @@ ## Function Description -Services in a container may depend on some kernel modules. You can set environment variables to dynamically load the kernel modules required by services in the container to the host before the system container starts. This feature must be used together with isulad-hooks. For details, see [Dynamically Managing Container Resources \(syscontainer-tools\)](dynamically-managing-container-resources-(syscontainer-tools).md). +Services in a container may depend on some kernel modules. You can set environment variables to dynamically load the kernel modules required by services in the container to the host before the system container starts. This feature must be used together with syscontainer-hooks. For details, see [Dynamically Managing Container Resources \(syscontainer-tools\)](dynamically-managing-container-resources-(syscontainer-tools).md). ## Parameter Description @@ -28,7 +28,7 @@ Services in a container may depend on some kernel modules. You can set environme ## Constraints - If loaded kernel modules are not verified or conflict with existing modules on the host, an unpredictable error may occur on the host. Therefore, exercise caution when loading kernel modules. -- Dynamic kernel module loading transfers kernel modules to be loaded to containers. This function is implemented by capturing environment variables for container startup using isulad-tools. Therefore, this function relies on the proper installation and deployment of isulad-tools. +- Dynamic kernel module loading transfers kernel modules to be loaded to containers. This function is implemented by capturing environment variables for container startup using syscontainer-tools. Therefore, this function relies on the proper installation and deployment of syscontainer-tools. - Loaded kernel modules need to be manually deleted. ## Example @@ -37,7 +37,7 @@ When starting a system container, specify the **-e KERNEL\_MODULES** parameter ``` [root@localhost ~]# lsmod | grep ip_vs -[root@localhost ~]# isula run -tid -e KERNEL_MODULES=ip_vs,ip_vs_wrr --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/myrootfs none init +[root@localhost ~]# isula run -tid -e KERNEL_MODULES=ip_vs,ip_vs_wrr --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/myrootfs none init ae18c4281d5755a1e153a7bff6b3b4881f36c8e528b9baba8a3278416a5d0980 [root@localhost ~]# lsmod | grep ip_vs ip_vs_wrr 16384 0 @@ -48,6 +48,6 @@ libcrc32c 16384 3 nf_conntrack,nf_nat,ip_vs ``` >![](public_sys-resources/icon-note.gif) **NOTE:** ->- isulad-tools must be installed on the host. ->- **--hooks-spec** must be set to **isulad hooks**. +>- syscontainer-tools must be installed on the host. +>- **--hooks-spec** must be set to **syscontainer hooks**. diff --git a/content/en/docs/Container/installation-guideline.md b/content/en/docs/Container/installation-guideline.md index d034dd8e0..386345cc0 100644 --- a/content/en/docs/Container/installation-guideline.md +++ b/content/en/docs/Container/installation-guideline.md @@ -9,7 +9,7 @@ 2. Install dependent packages of system containers. ``` - # yum install isulad-tools authz isulad-lxcfs-toolkit lxcfs + # yum install syscontainer-tools authz lxcfs-tools lxcfs ``` 3. Run the following command to check whether iSulad is started: diff --git a/content/en/docs/Container/nic-management.md b/content/en/docs/Container/nic-management.md index f6baf08e3..e307e66ad 100644 --- a/content/en/docs/Container/nic-management.md +++ b/content/en/docs/Container/nic-management.md @@ -2,12 +2,12 @@ ## Function Description -isulad-tools allows you to insert physical or virtual NICs on the host to a container. If the NICs are not required, isulad-tools allows you to delete them from the container and return them to the host. In addition, the NIC configurations can be dynamically modified. To insert a physical NIC, add the NIC on the host to the container. To insert a virtual NIC, create a veth pair and insert its one end to the container. +syscontainer-tools allows you to insert physical or virtual NICs on the host to a container. If the NICs are not required, syscontainer-tools allows you to delete them from the container and return them to the host. In addition, the NIC configurations can be dynamically modified. To insert a physical NIC, add the NIC on the host to the container. To insert a virtual NIC, create a veth pair and insert its one end to the container. ## Command Format ``` -isulad-tools [COMMADN][OPTIONS] +syscontainer-tools [COMMADN][OPTIONS] ``` In the preceding format: @@ -69,18 +69,18 @@ In the preceding format: - Physical NICs \(eth\) and virtual NICs \(veth\) can be added. - When adding a NIC, you can also configure the NIC. The configuration parameters include **--ip**, **--mac**, **--bridge**, **--mtu**, **--qlen**. - A maximum of eight physical NICs can be added to a container. -- If you run the **isulad-tools add-nic** command to add an eth NIC to a container and do not add a hook, you must manually delete the NIC before the container exits. Otherwise, the name of the eth NIC on the host will be changed to the name of that in the container. +- If you run the **syscontainer-tools add-nic** command to add an eth NIC to a container and do not add a hook, you must manually delete the NIC before the container exits. Otherwise, the name of the eth NIC on the host will be changed to the name of that in the container. - For a physical NIC \(except 1822 VF NIC\), use the original MAC address when running the **add-nic** command. Do not change the MAC address in the container, or when running the **update-nic** command. -- When using the **isulad-tools add-nic** command, set the MTU value. The value range depends on the NIC model. -- When using isulad-tools to add NICs and routes to containers, you are advised to run the **add-nic** command to add NICs and then run the **add-route** command to add routes. When using isulad-tools to delete NICs and routes from a container, you are advised to run the **remove-route** command to delete routes and then run the **remove-nic** command to delete NICs. -- When using isulad-tools to add NICs, add a NIC to only one container. +- When using the **syscontainer-tools add-nic** command, set the MTU value. The value range depends on the NIC model. +- When using syscontainer-tools to add NICs and routes to containers, you are advised to run the **add-nic** command to add NICs and then run the **add-route** command to add routes. When using syscontainer-tools to delete NICs and routes from a container, you are advised to run the **remove-route** command to delete routes and then run the **remove-nic** command to delete NICs. +- When using syscontainer-tools to add NICs, add a NIC to only one container. ## Example -- Start a system container, and set **hook spec** to the isulad hook execution script. +- Start a system container, and set **hook spec** to the syscontainer hook execution script. ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init 2aaca5c1af7c872798dac1a468528a2ccbaf20b39b73fc0201636936a3c32aa8 ``` @@ -88,14 +88,14 @@ In the preceding format: - Add a virtual NIC to a container. ``` - [root@localhost ~]# isulad-tools add-nic --type "veth" --name abc2:bcd2 --ip 172.17.28.5/24 --mac 00:ff:48:13:xx:xx --bridge docker0 2aaca5c1af7c + [root@localhost ~]# syscontainer-tools add-nic --type "veth" --name abc2:bcd2 --ip 172.17.28.5/24 --mac 00:ff:48:13:xx:xx --bridge docker0 2aaca5c1af7c Add network interface to container 2aaca5c1af7c (bcd2,abc2) done ``` - Add a physical NIC to a container. ``` - [root@localhost ~]# isulad-tools add-nic --type "eth" --name eth3:eth1 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 2aaca5c1af7c + [root@localhost ~]# syscontainer-tools add-nic --type "eth" --name eth3:eth1 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 2aaca5c1af7c Add network interface to container 2aaca5c1af7c (eth3,eth1) done ``` diff --git a/content/en/docs/Container/proc-file-system-isolation-(lxcfs).md b/content/en/docs/Container/proc-file-system-isolation-(lxcfs).md index 298df2667..621437140 100644 --- a/content/en/docs/Container/proc-file-system-isolation-(lxcfs).md +++ b/content/en/docs/Container/proc-file-system-isolation-(lxcfs).md @@ -6,12 +6,12 @@ Container virtualization is lightweight and efficient, and can be quickly deploy ## API Description -A system container provides two tool packages: lxcfs and lxcfs-toolkit, which are used together. Lxcfs resides on the host as the daemon process. lxcfs-toolkit mounts the lxcfs file system of the host to containers through the hook mechanism. +A system container provides two tool packages: lxcfs and lxcfs-tools, which are used together. Lxcfs resides on the host as the daemon process. lxcfs-tools mounts the lxcfs file system of the host to containers through the hook mechanism. -The command line of lxcfs-toolkit is as follows: +The command line of lxcfs-tools is as follows: ``` -lxcfs-toolkit [OPTIONS] COMMAND [COMMAND_OPTIONS] +lxcfs-tools [OPTIONS] COMMAND [COMMAND_OPTIONS] ``` @@ -76,10 +76,10 @@ lxcfs-toolkit [OPTIONS] COMMAND [COMMAND_OPTIONS] ## Example -1. Install the lxcfs and lxcfs-toolkit packages and start the lxcfs service. +1. Install the lxcfs and lxcfs-tools packages and start the lxcfs service. ``` - [root@localhost ~]# yum install lxcfs lxcfs-toolkit + [root@localhost ~]# yum install lxcfs lxcfs-tools [root@localhost ~]# systemctl start lxcfs ``` diff --git a/content/en/docs/Container/route-management.md b/content/en/docs/Container/route-management.md index c784738ef..ee3a56579 100644 --- a/content/en/docs/Container/route-management.md +++ b/content/en/docs/Container/route-management.md @@ -2,12 +2,12 @@ ## Function Description -isulad-tools can be used to dynamically add or delete routing tables for system containers. +syscontainer-tools can be used to dynamically add or delete routing tables for system containers. ## Command Format ``` -isulad-tools [COMMADN][OPTIONS] [ARG...] +syscontainer-tools [COMMADN][OPTIONS] [ARG...] ``` In the preceding format: @@ -74,31 +74,31 @@ In the preceding format: ## Constraints -- When using isulad-tools to add NICs and routes to containers, you are advised to run the **add-nic** command to add NICs and then run the **add-route** command to add routes. When using isulad-tools to delete NICs and routes from a container, you are advised to run the **remove-route** command to delete routes and then run the **remove-nic** command to delete NICs. +- When using syscontainer-tools to add NICs and routes to containers, you are advised to run the **add-nic** command to add NICs and then run the **add-route** command to add routes. When using syscontainer-tools to delete NICs and routes from a container, you are advised to run the **remove-route** command to delete routes and then run the **remove-nic** command to delete NICs. - When adding a routing rule to a container, ensure that the added routing rule does not conflict with existing routing rules in the container. ## Example -- Start a system container, and set **hook spec** to the isulad hook execution script. +- Start a system container, and set **hook spec** to the syscontainer hook execution script. ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init 0d2d68b45aa0c1b8eaf890c06ab2d008eb8c5d91e78b1f8fe4d37b86fd2c190b ``` -- Use isulad-tools to add a physical NIC to the system container. +- Use syscontainer-tools to add a physical NIC to the system container. ``` - [root@localhost ~]# isulad-tools add-nic --type "eth" --name enp4s0:eth123 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 0d2d68b45aa0 + [root@localhost ~]# syscontainer-tools add-nic --type "eth" --name enp4s0:eth123 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 0d2d68b45aa0 Add network interface (enp4s0) to container (0d2d68b45aa0,eth123) done ``` -- isulad-tools adds a routing rule to the system container. Format example: **\[\{"dest":"default", "gw":"192.168.10.1"\},\{"dest":"192.168.0.0/16","dev":"eth0","src":"192.168.1.2"\}\]**. If **dest** is left blank, its value will be **default**. +- syscontainer-tools adds a routing rule to the system container. Format example: **\[\{"dest":"default", "gw":"192.168.10.1"\},\{"dest":"192.168.0.0/16","dev":"eth0","src":"192.168.1.2"\}\]**. If **dest** is left blank, its value will be **default**. ``` - [root@localhost ~]# isulad-tools add-route 0d2d68b45aa0 '[{"dest":"172.17.28.0/32", "gw":"172.17.28.5","dev":"eth123"}]' + [root@localhost ~]# syscontainer-tools add-route 0d2d68b45aa0 '[{"dest":"172.17.28.0/32", "gw":"172.17.28.5","dev":"eth123"}]' Add route to container 0d2d68b45aa0, route: {dest:172.17.28.0/32,src:,gw:172.17.28.5,dev:eth123} done ``` diff --git a/content/en/docs/Container/volume-mounting-management.md b/content/en/docs/Container/volume-mounting-management.md index f9b4c12fb..ac5e094d8 100644 --- a/content/en/docs/Container/volume-mounting-management.md +++ b/content/en/docs/Container/volume-mounting-management.md @@ -2,12 +2,12 @@ ## Function Description -In a common container, you can set the **--volume** parameter during container creation to mount directories or volumes of the host to the container for resource sharing. However, during container running, you cannot unmount directories or volumes that are mounted to the container, or mount directories or volumes of the host to the container. Only the system container can use the isulad-tools tool to dynamically mount directories or volumes of the host to the container and unmount directories or volumes from the container. +In a common container, you can set the **--volume** parameter during container creation to mount directories or volumes of the host to the container for resource sharing. However, during container running, you cannot unmount directories or volumes that are mounted to the container, or mount directories or volumes of the host to the container. Only the system container can use the syscontainer-tools tool to dynamically mount directories or volumes of the host to the container and unmount directories or volumes from the container. ## Command Format ``` -isulad-tools [COMMADN][OPTIONS] [ARG...] +syscontainer-tools [COMMADN][OPTIONS] [ARG...] ``` In the preceding format: @@ -83,18 +83,18 @@ In the preceding format: ## Example -- Start a system container, and set **hook spec** to the isulad hook execution script. +- Start a system container, and set **hook spec** to the syscontainer hook execution script. ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init e45970a522d1ea0e9cfe382c2b868d92e7b6a55be1dd239947dda1ee55f3c7f7 ``` -- Use isulad-tools to mount a directory on the host to a container, implementing resource sharing. +- Use syscontainer-tools to mount a directory on the host to a container, implementing resource sharing. ``` - [root@localhost ~]# isulad-tools add-path e45970a522d1 /home/test123:/home/test123 + [root@localhost ~]# syscontainer-tools add-path e45970a522d1 /home/test123:/home/test123 Add path (/home/test123) to container(e45970a522d1,/home/test123) done. ``` @@ -107,10 +107,10 @@ In the preceding format: hello world ``` -- Use isulad-tools to delete the mount directory from the container. +- Use syscontainer-tools to delete the mount directory from the container. ``` - [root@localhost ~]# isulad-tools remove-path e45970a522d1 /home/test123:/home/test123 + [root@localhost ~]# syscontainer-tools remove-path e45970a522d1 /home/test123:/home/test123 Remove path (/home/test123) from container(e45970a522d1,/home/test123) done [root@localhost ~]# isula exec e45970a522d1 bash [root@localhost /]# ls /home/test123/helloworld diff --git "a/content/zh/docs/Container/\345\212\250\346\200\201\345\212\240\350\275\275\345\206\205\346\240\270\346\250\241\345\235\227.md" "b/content/zh/docs/Container/\345\212\250\346\200\201\345\212\240\350\275\275\345\206\205\346\240\270\346\250\241\345\235\227.md" index 2e5edd1d0..d5c65f9e4 100644 --- "a/content/zh/docs/Container/\345\212\250\346\200\201\345\212\240\350\275\275\345\206\205\346\240\270\346\250\241\345\235\227.md" +++ "b/content/zh/docs/Container/\345\212\250\346\200\201\345\212\240\350\275\275\345\206\205\346\240\270\346\250\241\345\235\227.md" @@ -2,7 +2,7 @@ ## 功能描述 -容器内业务可能依赖某些内核模块,可通过设置环境变量的方式,在系统容器启动前动态加载容器中业务需要的内核模块到宿主机,此特性需要配合isulad-hooks一起使用,具体使用可参看"容器资源动态管理(syscontainer-tools)"章节。 +容器内业务可能依赖某些内核模块,可通过设置环境变量的方式,在系统容器启动前动态加载容器中业务需要的内核模块到宿主机,此特性需要配合syscontainer-hooks一起使用,具体使用可参看"容器资源动态管理(syscontainer-tools)"章节。 ## 参数说明 @@ -28,7 +28,7 @@ ## 约束限制 - 如果加载的内核模块是未经过验证的,或者跟宿主机已有模块冲突的场景,会导致宿主机出现不可预知问题,在做加载内核模块时需要谨慎操作。 -- 动态加载内核模块通过将需要加载的内核模块传递给容器,此功能是依靠isulad-tools捕获到容器启动的环境变量实现,依赖isulad-tools的正确安装部署。 +- 动态加载内核模块通过将需要加载的内核模块传递给容器,此功能是依靠syscontainer-tools捕获到容器启动的环境变量实现,依赖syscontainer-tools的正确安装部署。 - 加载的内核模块需要手动进行删除。 ## 使用示例 @@ -37,7 +37,7 @@ ``` [root@localhost ~]# lsmod | grep ip_vs -[root@localhost ~]# isula run -tid -e KERNEL_MODULES=ip_vs,ip_vs_wrr --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/myrootfs none init +[root@localhost ~]# isula run -tid -e KERNEL_MODULES=ip_vs,ip_vs_wrr --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/myrootfs none init ae18c4281d5755a1e153a7bff6b3b4881f36c8e528b9baba8a3278416a5d0980 [root@localhost ~]# lsmod | grep ip_vs ip_vs_wrr 16384 0 @@ -48,6 +48,6 @@ libcrc32c 16384 3 nf_conntrack,nf_nat,ip_vs ``` >![](public_sys-resources/icon-note.gif) **说明:** ->- 宿主机需要安装isulad-tools。 ->- 需要指定--hooks-spec为isulad hooks。 +>- 宿主机需要安装syscontainer-tools。 +>- 需要指定--hooks-spec为syscontainer hooks。 diff --git "a/content/zh/docs/Container/\345\256\211\345\205\250\346\200\247\345\222\214\351\232\224\347\246\273\346\200\247.md" "b/content/zh/docs/Container/\345\256\211\345\205\250\346\200\247\345\222\214\351\232\224\347\246\273\346\200\247.md" index 7f85248df..200736c81 100644 --- "a/content/zh/docs/Container/\345\256\211\345\205\250\346\200\247\345\222\214\351\232\224\347\246\273\346\200\247.md" +++ "b/content/zh/docs/Container/\345\256\211\345\205\250\346\200\247\345\222\214\351\232\224\347\246\273\346\200\247.md" @@ -213,12 +213,12 @@ exit ### 接口说明 -系统容器对外提供两个工具包:一个是lxcfs软件,另外一个是配合lxcfs一起使用的lxcfs-toolkit工具。其中lxcfs作为宿主机daemon进程常驻,lxcfs-toolkit通过hook机制将宿主机的lxcfs文件系统绑定挂载到容器。 +系统容器对外提供两个工具包:一个是lxcfs软件,另外一个是配合lxcfs一起使用的lxcfs-tools工具。其中lxcfs作为宿主机daemon进程常驻,lxcfs-tools通过hook机制将宿主机的lxcfs文件系统绑定挂载到容器。 -lxcfs-toolkit命令行格式如下: +lxcfs-tools命令行格式如下: ``` -lxcfs-toolkit [OPTIONS] COMMAND [COMMAND_OPTIONS] +lxcfs-tools [OPTIONS] COMMAND [COMMAND_OPTIONS] ``` @@ -283,10 +283,10 @@ lxcfs-toolkit [OPTIONS] COMMAND [COMMAND_OPTIONS] ### 使用示例 -1. 首先需要安装lxcfs和lxcfs-toolkit这两个包,并启动lxcfs服务。 +1. 首先需要安装lxcfs和lxcfs-tools这两个包,并启动lxcfs服务。 ``` - [root@localhost ~]# yum install lxcfs lxcfs-toolkit + [root@localhost ~]# yum install lxcfs lxcfs-tools [root@localhost ~]# systemctl start lxcfs ``` diff --git "a/content/zh/docs/Container/\345\256\211\350\243\205\346\214\207\345\257\274.md" "b/content/zh/docs/Container/\345\256\211\350\243\205\346\214\207\345\257\274.md" index 204899cbe..fbcd663a6 100644 --- "a/content/zh/docs/Container/\345\256\211\350\243\205\346\214\207\345\257\274.md" +++ "b/content/zh/docs/Container/\345\256\211\350\243\205\346\214\207\345\257\274.md" @@ -12,7 +12,7 @@ 2. 安装系统容器依赖包。 ``` - # yum install isulad-tools authz isulad-lxcfs-toolkit lxcfs + # yum install syscontainer-tools authz lxcfs-tools lxcfs ``` 3. 查看iSulad是否已经启动。 diff --git "a/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\345\212\250\346\200\201\347\256\241\347\220\206.md" "b/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\345\212\250\346\200\201\347\256\241\347\220\206.md" index 720cb8835..c09fa4af2 100644 --- "a/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\345\212\250\346\200\201\347\256\241\347\220\206.md" +++ "b/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\345\212\250\346\200\201\347\256\241\347\220\206.md" @@ -19,12 +19,12 @@ ### 功能描述 -isulad-tools支持将宿主机上的块设备(比如磁盘、LVM)或字符设备(比如GPU、binner、fuse)添加到容器中。在容器中使用该设备,例如可以对磁盘进行fdisk格式化,写入fs等操作。在容器不需要设备时,isulad-tools可以将设备从容器中删除,归还宿主机。 +syscontainer-tools支持将宿主机上的块设备(比如磁盘、LVM)或字符设备(比如GPU、binner、fuse)添加到容器中。在容器中使用该设备,例如可以对磁盘进行fdisk格式化,写入fs等操作。在容器不需要设备时,syscontainer-tools可以将设备从容器中删除,归还宿主机。 ### 命令格式 ``` -isulad-tools [COMMADN][OPTIONS] [ARG...] +syscontainer-tools [COMMADN][OPTIONS] [ARG...] ``` 其中: @@ -104,16 +104,16 @@ ARG:命令对应的参数。 - 添加/删除设备的时机可以是容器实例非运行状态,完成操作后启动容器,容器内会有体现;也可以在容器运行时(running)动态添加。 - 不能在容器内和host上并发进行fdisk对磁盘的格式化写入,会影响容器磁盘使用。 -- add-device将磁盘添加到容器的特定目录时,如果容器内的父目录为多级目录(比如/dev/a/b/c/d/e...)且目录层级不存在,则isulad-tools会自动在容器内创建对应目录;当删除时,不会将创建的父目录删除。如果用户下一次add-device到该父目录,则会提示已经存在无法添加成功。 +- add-device将磁盘添加到容器的特定目录时,如果容器内的父目录为多级目录(比如/dev/a/b/c/d/e...)且目录层级不存在,则syscontainer-tools会自动在容器内创建对应目录;当删除时,不会将创建的父目录删除。如果用户下一次add-device到该父目录,则会提示已经存在无法添加成功。 - add-device添加磁盘、更新磁盘参数时,配置磁盘Qos;当配置磁盘Qos的read/write bps、read/write IOPS值时,不建议配置值过小,当设置过小时,会造成磁盘表现为不可读(实际原因是速度过慢),最终影响业务功能。 - 使用--blkio-weight-device来限制指定块设备的权重,如果当前块设备仅支持BFQ模式,可能会报错,提示用户检查当前OS环境是否支持BFQ块设备权重值设置。 ### 使用示例 -- 启动一个系统容器,指定hook spec为isulad hook执行配置脚本 +- 启动一个系统容器,指定hook spec为syscontainer hook执行配置脚本 ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init eed1096c8c7a0eca6d92b1b3bc3dd59a2a2adf4ce44f18f5372408ced88f8350 ``` @@ -121,7 +121,7 @@ ARG:命令对应的参数。 - 添加一个块设备到容器 ``` - [root@localhost ~]# isulad-tools add-device ee /dev/sdb:/dev/sdb123 + [root@localhost ~]# syscontainer-tools add-device ee /dev/sdb:/dev/sdb123 Add device (/dev/sdb) to container(ee,/dev/sdb123) done. [root@localhost ~]# isula exec ee fdisk -l /dev/sdb123 Disk /dev/sdb123: 50 GiB, 53687091200 bytes, 104857600 sectors @@ -139,14 +139,14 @@ ARG:命令对应的参数。 - 更新设备信息 ``` - [root@localhost ~]# isulad-tools update-device --device-read-bps /dev/sdb:10m ee + [root@localhost ~]# syscontainer-tools update-device --device-read-bps /dev/sdb:10m ee Update read bps for device (/dev/sdb,10485760) done. ``` - 删除设备 ``` - [root@localhost ~]# isulad-tools remove-device ee /dev/sdb:/dev/sdb123 + [root@localhost ~]# syscontainer-tools remove-device ee /dev/sdb:/dev/sdb123 Remove device (/dev/sdb) from container(ee,/dev/sdb123) done. Remove read bps for device (/dev/sdb) done. ``` @@ -156,12 +156,12 @@ ARG:命令对应的参数。 ### 功能描述 -isulad-tools支持将宿主机上的物理网卡或虚拟网卡插入到容器,在不使用网卡的时候从容器中删除归还给宿主机,并且可以动态修改网卡配置。插入物理网卡即把宿主机上一块网卡直接添加到容器中,插入虚拟网卡则需要先创建一对veth pair,之后将一端插入到容器中。 +syscontainer-tools支持将宿主机上的物理网卡或虚拟网卡插入到容器,在不使用网卡的时候从容器中删除归还给宿主机,并且可以动态修改网卡配置。插入物理网卡即把宿主机上一块网卡直接添加到容器中,插入虚拟网卡则需要先创建一对veth pair,之后将一端插入到容器中。 ### 命令格式 ``` -isulad-tools [COMMADN][OPTIONS] +syscontainer-tools [COMMADN][OPTIONS] ``` 其中: @@ -223,18 +223,18 @@ container\_id:容器id。 - 支持添加物理网卡(eth)和虚拟网卡(veth)两种类型。 - 在添加网卡时可以同时对网卡进行配置,参数包括--ip/--mac/--bridge/--mtu/--qlen。 - 支持最多添加8个物理网卡到容器。 -- 使用isulad-tools add-nic向容器添加eth网卡后,如果不加hook,在容器退出前必须手工将nic删除,否则在host上的eth网卡的名字会被更改成容器内的名字。 +- 使用syscontainer-tools add-nic向容器添加eth网卡后,如果不加hook,在容器退出前必须手工将nic删除,否则在host上的eth网卡的名字会被更改成容器内的名字。 - 对于物理网卡(1822 vf网卡除外),add-nic必须使用原mac地址,update-nic禁止修改mac地址,容器内也不允许修改mac地址。 -- 使用isulad-tools add-nic时,设置mtu值,设置范围跟具体的网卡型号有关。 -- 使用isulad-tools向容器添加网卡和路由时,建议先执行add-nic添加网卡,然后执行add-route添加路由;使用isulad-tools从容器删除网卡和路由时,建议先执行remove-route删除路由,然后执行remove-nic删除网卡。 -- 使用isulad-tools添加网卡时,一块网卡只能添加到一个容器中。 +- 使用syscontainer-tools add-nic时,设置mtu值,设置范围跟具体的网卡型号有关。 +- 使用syscontainer-tools向容器添加网卡和路由时,建议先执行add-nic添加网卡,然后执行add-route添加路由;使用syscontainer-tools从容器删除网卡和路由时,建议先执行remove-route删除路由,然后执行remove-nic删除网卡。 +- 使用syscontainer-tools添加网卡时,一块网卡只能添加到一个容器中。 ### 使用示例 -- 启动一个系统容器,指定hook spec为isulad hook执行配置脚本: +- 启动一个系统容器,指定hook spec为syscontainer hook执行配置脚本: ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init 2aaca5c1af7c872798dac1a468528a2ccbaf20b39b73fc0201636936a3c32aa8 ``` @@ -242,14 +242,14 @@ container\_id:容器id。 - 添加一个虚拟网卡到容器 ``` - [root@localhost ~]# isulad-tools add-nic --type "veth" --name abc2:bcd2 --ip 172.17.28.5/24 --mac 00:ff:48:13:xx:xx --bridge docker0 2aaca5c1af7c + [root@localhost ~]# syscontainer-tools add-nic --type "veth" --name abc2:bcd2 --ip 172.17.28.5/24 --mac 00:ff:48:13:xx:xx --bridge docker0 2aaca5c1af7c Add network interface to container 2aaca5c1af7c (bcd2,abc2) done ``` - 添加一个物理网卡到容器 ``` - [root@localhost ~]# isulad-tools add-nic --type "eth" --name eth3:eth1 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 2aaca5c1af7c + [root@localhost ~]# syscontainer-tools add-nic --type "eth" --name eth3:eth1 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 2aaca5c1af7c Add network interface to container 2aaca5c1af7c (eth3,eth1) done ``` @@ -261,12 +261,12 @@ container\_id:容器id。 ### 功能描述 -isulad-tools工具可以对系统容器进行动态添加/删除路由表。 +syscontainer-tools工具可以对系统容器进行动态添加/删除路由表。 ### 命令格式 ``` -isulad-tools [COMMADN][OPTIONS] [ARG...] +syscontainer-tools [COMMADN][OPTIONS] [ARG...] ``` 其中: @@ -333,31 +333,31 @@ ARG:命令对应的参数。 ### 约束限制 -- 使用isulad-tools向容器添加网卡和路由时,建议先执行add-nic添加网卡,然后执行add-route添加路由;使用isulad-tools从容器删除网卡和路由时,建议先执行remove-route删除路由,然后执行remove-nic删除网卡。 +- 使用syscontainer-tools向容器添加网卡和路由时,建议先执行add-nic添加网卡,然后执行add-route添加路由;使用syscontainer-tools从容器删除网卡和路由时,建议先执行remove-route删除路由,然后执行remove-nic删除网卡。 - 向容器内添加路由规则时,需确保所添加的路由规则与容器内现有的路由规则不会产生冲突。 ### 使用示例 -- 启动一个系统容器,指定hook spec为isulad hook执行配置脚本: +- 启动一个系统容器,指定hook spec为syscontainer hook执行配置脚本: ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init 0d2d68b45aa0c1b8eaf890c06ab2d008eb8c5d91e78b1f8fe4d37b86fd2c190b ``` -- isulad-tools向系统容器添加一块物理网卡: +- syscontainer-tools向系统容器添加一块物理网卡: ``` - [root@localhost ~]# isulad-tools add-nic --type "eth" --name enp4s0:eth123 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 0d2d68b45aa0 + [root@localhost ~]# syscontainer-tools add-nic --type "eth" --name enp4s0:eth123 --ip 172.17.28.6/24 --mtu 1300 --qlen 2100 0d2d68b45aa0 Add network interface (enp4s0) to container (0d2d68b45aa0,eth123) done ``` -- isulad-tools添加一条路由规则到系统容器,注意格式需按照'\[\{"dest":"default", "gw":"192.168.10.1"\},\{"dest":"192.168.0.0/16","dev":"eth0","src":"192.168.1.2"\}\]'来配置。如果dest为空会自动填成default。 +- syscontainer-tools添加一条路由规则到系统容器,注意格式需按照'\[\{"dest":"default", "gw":"192.168.10.1"\},\{"dest":"192.168.0.0/16","dev":"eth0","src":"192.168.1.2"\}\]'来配置。如果dest为空会自动填成default。 ``` - [root@localhost ~]# isulad-tools add-route 0d2d68b45aa0 '[{"dest":"172.17.28.0/32", "gw":"172.17.28.5","dev":"eth123"}]' + [root@localhost ~]# syscontainer-tools add-route 0d2d68b45aa0 '[{"dest":"172.17.28.0/32", "gw":"172.17.28.5","dev":"eth123"}]' Add route to container 0d2d68b45aa0, route: {dest:172.17.28.0/32,src:,gw:172.17.28.5,dev:eth123} done ``` @@ -376,12 +376,12 @@ ARG:命令对应的参数。 ### 功能描述 -普通容器仅支持在创建时指定--volume参数将宿主机的目录/卷挂载到容器实现资源共享,但是无法在容器运行时将挂载到容器中的目录/卷卸载掉,也不支持将宿主机的目录/卷挂载到容器。系统容器可以通过isulad-tools工具实现动态将宿主机的目录/卷挂载到容器,以及将容器中的目录/卷进行卸载。 +普通容器仅支持在创建时指定--volume参数将宿主机的目录/卷挂载到容器实现资源共享,但是无法在容器运行时将挂载到容器中的目录/卷卸载掉,也不支持将宿主机的目录/卷挂载到容器。系统容器可以通过syscontainer-tools工具实现动态将宿主机的目录/卷挂载到容器,以及将容器中的目录/卷进行卸载。 ### 命令格式 ``` -isulad-tools [COMMADN][OPTIONS] [ARG...] +syscontainer-tools [COMMADN][OPTIONS] [ARG...] ``` 其中: @@ -455,18 +455,18 @@ ARG:命令对应的参数。 ### 使用示例 -- 启动一个系统容器,指定hook spec为isulad hook执行配置脚本: +- 启动一个系统容器,指定hook spec为syscontainer hook执行配置脚本: ``` - [root@localhost ~]# isula run -tid --hook-spec /etc/isulad-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init + [root@localhost ~]# isula run -tid --hook-spec /etc/syscontainer-tools/hookspec.json --system-container --external-rootfs /root/root-fs none init e45970a522d1ea0e9cfe382c2b868d92e7b6a55be1dd239947dda1ee55f3c7f7 ``` -- isulad-tools将宿主机某个目录挂载到容器,实现资源共享: +- syscontainer-tools将宿主机某个目录挂载到容器,实现资源共享: ``` - [root@localhost ~]# isulad-tools add-path e45970a522d1 /home/test123:/home/test123 + [root@localhost ~]# syscontainer-tools add-path e45970a522d1 /home/test123:/home/test123 Add path (/home/test123) to container(e45970a522d1,/home/test123) done. ``` @@ -479,10 +479,10 @@ ARG:命令对应的参数。 hello world ``` -- isulad-tools将挂载目录从容器内删除: +- syscontainer-tools将挂载目录从容器内删除: ``` - [root@localhost ~]# isulad-tools remove-path e45970a522d1 /home/test123:/home/test123 + [root@localhost ~]# syscontainer-tools remove-path e45970a522d1 /home/test123:/home/test123 Remove path (/home/test123) from container(e45970a522d1,/home/test123) done [root@localhost ~]# isula exec e45970a522d1 bash [root@localhost /]# ls /home/test123/helloworld -- Gitee