mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-13 09:50:19 +00:00
Remove trailing spaces in file docs/source/advanced/docker/dockerized_xcat/run_xcat_in_docker_native.rst
This commit is contained in:
@ -9,7 +9,7 @@ Now xCAT ships xCAT Docker images(x86_64 and ppc64le) on the `DockerHub <https:/
|
||||
|
||||
To pull the latest xCAT Docker image for x86_64, run ::
|
||||
|
||||
sudo docker pull xcat/xcat-ubuntu-x86_64
|
||||
sudo docker pull xcat/xcat-ubuntu-x86_64
|
||||
|
||||
On success, you will see the pulled Docker image on Docker host ::
|
||||
|
||||
@ -19,12 +19,12 @@ On success, you will see the pulled Docker image on Docker host ::
|
||||
|
||||
|
||||
An example configuration in the documentation
|
||||
---------------------------------------------
|
||||
---------------------------------------------
|
||||
|
||||
To demonstrate the steps to run xCAT in a Docker container, take a cluster with the following configuration as an example ::
|
||||
|
||||
Docker host: dockerhost1
|
||||
The name of the docker container running xCAT: xcatmn
|
||||
The name of the docker container running xCAT: xcatmn
|
||||
The hostname of container xcatmn: xcatmn
|
||||
|
||||
The management network object: mgtnet
|
||||
@ -33,15 +33,15 @@ To demonstrate the steps to run xCAT in a Docker container, take a cluster with
|
||||
The IP address of eno1 on Docker host: 10.5.107.1/8
|
||||
The IP address of xCAT container in management network: 10.5.107.101
|
||||
|
||||
The dns domain of the cluster: clusters.com
|
||||
The dns domain of the cluster: clusters.com
|
||||
|
||||
|
||||
Create a customized Docker network on the Docker host
|
||||
-----------------------------------------------------
|
||||
|
||||
**Docker Networks** provide complete isolation for containers, which gives you control over the networks your containers run on. To run xCAT in Docker, you should create a customized bridge network according to the cluster network plan, instead of using the default bridge network created on Docker installation.
|
||||
**Docker Networks** provide complete isolation for containers, which gives you control over the networks your containers run on. To run xCAT in Docker, you should create a customized bridge network according to the cluster network plan, instead of using the default bridge network created on Docker installation.
|
||||
|
||||
As an example, we create a customized bridge network "mgtbr" which is attached to the network interface "eno1" facing the compute nodes and inherits the network configuration of "eno1". Since the commands to create the network will break the network connection on "eno1", you'd better run the commands in one line instead of running them seperatly ::
|
||||
As an example, we create a customized bridge network "mgtbr" which is attached to the network interface "eno1" facing the compute nodes and inherits the network configuration of "eno1". Since the commands to create the network will break the network connection on "eno1", you'd better run the commands in one line instead of running them seperatly ::
|
||||
|
||||
sudo docker network create --driver=bridge --gateway=10.5.107.1 --subnet=10.5.107.0/8 -o "com.docker.network.bridge.name"="mgtbr" mgtnet; \
|
||||
ifconfig eno1 0.0.0.0; \
|
||||
@ -51,7 +51,7 @@ As an example, we create a customized bridge network "mgtbr" which is attached t
|
||||
* ``--driver=bridge`` specify the network driver to be "bridge"
|
||||
* ``--gateway=10.5.107.1`` specify the network gateway to be the IP address of "eno1" on Docker host. which will also be the IP address of network bridge "mgtbr"
|
||||
* ``--subnet=10.5.107.0/8`` speify the subnet in CIDR format to be the subnet of "eno1"
|
||||
* ``com.docker.network.bridge.name"="mgtbr"`` specify the bridge name of management network
|
||||
* ``com.docker.network.bridge.name"="mgtbr"`` specify the bridge name of management network
|
||||
* ``ifconfig eno1 0.0.0.0`` delete the IP address of "eno1"
|
||||
* ``brctl addif mgtbr eno1`` attach the bridge "br0" to network interface "eno1"
|
||||
* ``ip link set mgtbr up`` change the state of "br0" to UP
|
||||
@ -68,7 +68,7 @@ Now run the xCAT Docker container with the Docker image "xcat/xcat-ubuntu-x86_64
|
||||
|
||||
* use ``--privileged=true`` to give extended privileges to this container
|
||||
* use ``--hostname`` to specify the hostname of the container, which is available inside the container
|
||||
* use ``--name`` to assign a name to the container, this name can be used to manipulate the container on Docker host
|
||||
* use ``--name`` to assign a name to the container, this name can be used to manipulate the container on Docker host
|
||||
* use ``--add-host="xcatmn.clusers.com xcatmn:10.5.107.101"`` to write the ``/etc/hosts`` entries of Docker container inside container. Since xCAT use the FQDN(Fully Qualified Domain Name) to determine the cluster domain on startup, make sure the format to be "<FQDN> <hostname>: <IP Address>", otherwise, you need to set the cluster domain with ``chdef -t site -o clustersite domain="clusters.com"`` inside the container manually
|
||||
* use ``--volume /docker/xcatdata/:/install`` to mount a pre-created "/docker/xcatdata" directory on Docker host to "/install" directory inside container as a data volume. This is optional, it is mandatory if you want to backup and restore xCAT data.
|
||||
* use ``--net=mgtnet`` to connect the container to the Docker network "mgtnet"
|
||||
|
Reference in New Issue
Block a user