18-Application Hosting Command Reference

HomeSupportSwitchesS12500R SeriesReference GuidesCommand ReferencesH3C S12500R Switch Router Series Command References(R51xx)-6W10118-Application Hosting Command Reference
01-Container application hosting commands
Title Size Download
01-Container application hosting commands 53.25 KB

Container application hosting commands

docker

Use docker to manage Docker containers.

Syntax

docker [ params ]

Views

System view

Predefined user roles

network-admin

Parameters

params: Specifies parameters for the command. The available parameters are the same as the parameters for the standard Linux docker command. For more information, execute the docker –-help command.

Usage guidelines

The Comware system is integrated with a modified version of the Docker daemon and can resolve standard Linux docker commands. At the Comware CLI, you can use standard Linux docker commands to create, run, and monitor containers and construct and store images.

As a best practice, do not configure open application containers to share the network namespace for Comware containers. If an open application container shares the network space for Comware containers, that open application container cannot persist through a Comware system reboot. When the Comware system reboots, you must create that container again if you need to use it.

To prevent overuse of resources from degrading Comware performance, a system-defined limit is set on the CPU and memory resources assignable to open application containers. If the CPU or memory size specified for an open application container exceeds the system-defined limit when you run it by using the docker run command with the --cpuset-cpus, --cpuset-shared, or --memory option, the system-defined limit takes effect.

Examples

# List containers.

<Sysname> system-view

[Sysname] docker ps

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS

NAMES      

d160d5ddab1f      comware: MPU      "/bin/v9.sh"   17 years ago     Up 17 years

comware 

# Use image file flash:/tftpd.tar.gz to create a TFTP server container that uses the same network namespace as Comware.

<Sysname> system-view

[Sysname] docker run --network container:comware --name tftpserver tftpd.tar.gz

docker-config reload

Use docker-config reload to reload the Docker daemon configuration.

Syntax

docker-config reload

Views

System view

Predefined user roles

network-admin

Usage guidelines

This command loads the configuration file and certificate in the flash:/third-party/autocopy/etc/docker/ directory to memory and triggers the Docker daemon process to reload the configuration file.

If you modify the Docker daemon configuration file, verify that the modified configuration commands do not have errors. If the Docker daemon configuration file has errors, the Docker process might not be able to start up, causing the Comware system unable to start up correctly. If this symptom occurs, perform the following tasks:

1.     Reboot the device and enter the BootWare menu.

2.     Delete the erroneous Docker daemon configuration file and reboot the device.

3.     If the symptom persists, reboot the device and enter the BootWare menu again.

4.     Delete the flash: /third-party directory and reboot the device again.

Examples

# Reload the Docker daemon configuration.

<Sysname> system-view

[Sysname] docker-config reload

Reloading docker configuration...

Done.

[Sysname]

interface virtual-eth-group

Use interface virtual-eth-group to create a Virtual-Eth-Group interface and enter its view, or enter the view of an existing Virtual-Eth-Group interface.

Use undo interface virtual-eth-group to delete a Virtual-Eth-Group interface.

Syntax

interface virtual-eth-group interface-number

undo interface virtual-eth-group interface-number

Default

No Virtual-Eth-Group interfaces exist.

Views

System view

Predefined user roles

network-admin

Parameters

interface-number: Specifies the interface number, which is fixed at 0.

Usage guidelines

Third-party applications in containers that do not share the network namespace of Comware uses interface Virtual-Eth-Group 0 to communicate with indirectly connected networks. To run such applications, create interface Virtual-Eth-Group 0 and assign it an IP address.

Examples

# Create interface Virtual-Eth-Group 0 and enter its view.

<Sysname> system-view

[Sysname] interface virtual-eth-group 0

[Sysname-Virtual-Eth-Group0]

kubelet enable

Use kubelet enable to enable the kubelet service.

Use undo kubelet enable to disable the kubelet service.

Syntax

kubelet enable

undo kubelet enable

Default

The kubelet service is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

When you enable the kubelet service, the system automatically synchronize the files listed in Table 1 to the file system in memory. To enable the kubelet service successfully, make sure the files exist in the specified directory.

Table 1 Files required for enabling the kubelet service

File description

Storage location

File name (extension not allowed)

Kubernetes public configuration file

flash: /third-party/autocopy/etc/kubernetes

kubeconfig

Kubelet configuration file

kubeletconfig

Environment variable file for Kubelet command line parameters

kubelet

 

The following are the sample content of the files. You can modify the files as required.

/* Kubernetes public configuration file flash:/third-party/autocopy/etc/kubernetes/kubeconfig */

apiVersion:  v1

clusters:

- cluster:

    insecure-skip-tls-verify:  true

    server:  http: //192.168.111.62: 8080

  name:  TestCluster

contexts:

- context:

    cluster:  TestCluster

    user:  comwarev9

  name:  Comware

current-context:  Comware

kind:  Config

preferences:  {}

users:  []

/* Kubelet configuration file flash:/third-party/autocopy/etc/kubernetes/kubeletconfig */

kind:  KubeletConfiguration

apiVersion:  kubelet.config.k8s.io/v1beta1

failSwapOn:  false

address:  0.0.0.0

port:  10250

/* Environment variable file for Kubelet command line parameters: flash:/third-party/autocopy/etc/kubernetes/kubelet */

KUBELET_ARGS=”--hostname-override 6890-A  --pod-infra-container-image=192.168.111.62: 5000/pause: 3.1“

Examples

# Enable the kubelet service.

<Sysname> system-view

[Sysname] kubelet enable

Starting kubelet...

...

OK.

# Disable the kubelet service.

<Sysname> system-view

[Sysname] undo kubelet enable

Stopping kubelet...

...

OK.

tpa container enable

Use tpa container enable to enable the container feature.

Use undo tpa container enable to disable the container feature.

Syntax

tpa container enable

undo tpa container enable

Default

The container feature is enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

To install Docker containers on the device, you must enable the container feature.

Disabling the container feature stops and deletes all running Docker containers.

Examples

# Enable the container feature.

<Sysname> system-view

[Sysname] tpa container enable

# Disable the container feature.

<Sysname> system-view

[Sysname] undo tpa container enable

This operation will disable the third-party container feature and all third-party containers will be stopped and deleted. Continue? [Y/N]: y

Stopping kubelet...

.

OK.

Done.

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网