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_compose.rst
This commit is contained in:
@ -3,14 +3,14 @@ Run xCAT in Docker with Compose (Recommended)
|
||||
|
||||
|
||||
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 ::
|
||||
|
||||
|
||||
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 dns domain of the cluster: clusters.com
|
||||
The dns domain of the cluster: clusters.com
|
||||
|
||||
The management network object: mgtnet
|
||||
The network bridge of management network on Docker host: mgtbr
|
||||
@ -24,7 +24,7 @@ To demonstrate the steps to run xCAT in a Docker container, take a cluster with
|
||||
The IP address of eno2 on Docker host: 192.168.0.1/8
|
||||
The IP address of xCAT container in service network: 192.168.0.101
|
||||
|
||||
|
||||
|
||||
Install Compose on Docker host
|
||||
------------------------------
|
||||
|
||||
@ -34,27 +34,27 @@ Compose v1.7.0 or above should be installed on Docker host: ::
|
||||
chmod +x /usr/local/bin/docker-compose
|
||||
|
||||
|
||||
Customize docker-compose file
|
||||
Customize docker-compose file
|
||||
-----------------------------
|
||||
|
||||
xCAT ships a docker-compose template `docker-compose.yml <https://github.com/immarvin/xcat-docker/blob/master/docker-compose.yml>`_, which is a self-description file including all the configurations to run xCAT in container. You can make up your compose file based on it if you are familiar with `Compose file <https://docs.docker.com/compose/compose-file/>`_ , otherwise, you can simply customize it with the following steps:
|
||||
xCAT ships a docker-compose template `docker-compose.yml <https://github.com/immarvin/xcat-docker/blob/master/docker-compose.yml>`_, which is a self-description file including all the configurations to run xCAT in container. You can make up your compose file based on it if you are familiar with `Compose file <https://docs.docker.com/compose/compose-file/>`_ , otherwise, you can simply customize it with the following steps:
|
||||
|
||||
1. Specify the xCAT Docker image
|
||||
|
||||
::
|
||||
|
||||
image: [xCAT Docker image name]:[tag]
|
||||
|
||||
specify the name and tag of xCAT Docker image, for example "xcat/xcat-ubuntu-x86_64:2.11"
|
||||
image: [xCAT Docker image name]:[tag]
|
||||
|
||||
2. Specify the cluster domain name
|
||||
specify the name and tag of xCAT Docker image, for example "xcat/xcat-ubuntu-x86_64:2.11"
|
||||
|
||||
::
|
||||
2. Specify the cluster domain name
|
||||
|
||||
::
|
||||
|
||||
extra_hosts:
|
||||
- "xcatmn.[cluster domain name] xcatmn:[Container's IP address in management network]"
|
||||
|
||||
specify the cluster domain name,i.e, "site.domain" on xCAT Management Node, for example "clusters.com", and the IP address of xCAT Docker container in the management network, such as "10.5.107.101"
|
||||
specify the cluster domain name,i.e, "site.domain" on xCAT Management Node, for example "clusters.com", and the IP address of xCAT Docker container in the management network, such as "10.5.107.101"
|
||||
|
||||
3. Specify the IP address of xCAT container in service network and management network
|
||||
|
||||
@ -66,7 +66,7 @@ specify the cluster domain name,i.e, "site.domain" on xCAT Management Node, for
|
||||
ipv4_address : [Container's IP address in service network]
|
||||
|
||||
mgtnet:
|
||||
ipv4_address : [Container's IP address in management network]
|
||||
ipv4_address : [Container's IP address in management network]
|
||||
|
||||
specify the IP address of Docker container in service network and management network. If the "svcnet" is the same as "mgtnet", the 2 "svcnet" lines should be commented out.
|
||||
|
||||
@ -75,30 +75,30 @@ specify the IP address of Docker container in service network and management net
|
||||
::
|
||||
|
||||
networks:
|
||||
|
||||
#management network, attached to the network interface on Docker host
|
||||
|
||||
#management network, attached to the network interface on Docker host
|
||||
#facing the nodes to provision
|
||||
mgtnet:
|
||||
driver: "bridge"
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "mgtbr"
|
||||
ipam:
|
||||
config:
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "mgtbr"
|
||||
ipam:
|
||||
config:
|
||||
- subnet: [subnet of mgtbr in CIDR]
|
||||
gateway:[IP address of mgtbr]
|
||||
|
||||
|
||||
#service network, attached to the network interface on
|
||||
#Docker host facing the bmc network
|
||||
svcnet:
|
||||
driver: "bridge"
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "svcbr"
|
||||
ipam:
|
||||
config:
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "svcbr"
|
||||
ipam:
|
||||
config:
|
||||
- subnet: [subnet of svcbr in CIDR]
|
||||
gateway: [IP address of svcbr]
|
||||
|
||||
specify the network configuration of bridge networks "mgtnet" and "svcnet", the network configuration of the bridge networks should be same as the network interfaces attached to the bridges. The "mgtnet" and "svcnet" might the same network in some cluster, in this case, you can ignore the lines for "svcnet".
|
||||
|
||||
specify the network configuration of bridge networks "mgtnet" and "svcnet", the network configuration of the bridge networks should be same as the network interfaces attached to the bridges. The "mgtnet" and "svcnet" might the same network in some cluster, in this case, you can ignore the lines for "svcnet".
|
||||
|
||||
5. Specify the Data Volumes for xCAT Docker container
|
||||
|
||||
@ -114,16 +114,16 @@ specify the network configuration of bridge networks "mgtnet" and "svcnet", the
|
||||
#"dumpxCATdb -p /.dbbackup" should be run manually to save xCAT DB inside container
|
||||
- [The directory on Docker host mounted to save xCAT DB inside container]:/.dbbackup
|
||||
#the "/.logs" value is used to keep xCAT logs
|
||||
#the xCAT logs will be kept if specified
|
||||
#the xCAT logs will be kept if specified
|
||||
- [The directory on Docker host to save xCAT logs inside container]:/var/log/xcat/
|
||||
|
||||
specify the volumes of the xCAT container used to save and restore xCAT data
|
||||
|
||||
|
||||
Start xCAT Docker container with Compose
|
||||
Start xCAT Docker container with Compose
|
||||
----------------------------------------
|
||||
After the "docker-compose.yml" is ready, the xCAT Docker container can be started with [1]_ ::
|
||||
|
||||
|
||||
docker-compose -f "docker-compose.yml" up -d; \
|
||||
ifconfig eno1 0.0.0.0; \
|
||||
brctl addif mgtbr eno1; \
|
||||
@ -139,7 +139,7 @@ To remove the container, you can run ::
|
||||
ifup eno1
|
||||
|
||||
To update the xCAT Docker image, you can run ::
|
||||
|
||||
|
||||
docker-compose -f "docker-compose.yml" pull
|
||||
|
||||
|
||||
@ -151,6 +151,6 @@ Known Issues
|
||||
When you start up xCAT Docker container, you might see an error message at the end of the output like ::
|
||||
|
||||
Couldn't connect to Docker daemon at http+unix://var/run/docker.sock - is it running? If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
|
||||
|
||||
|
||||
You can ignore it, the container has already been running. It is a Docker bug `#1214 <https://github.com/docker/compose/issues/1214>`_
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user