From afdc0162a7d733bbea209f0fada48014016d3de4 Mon Sep 17 00:00:00 2001 From: Graham Whaley Date: Tue, 28 Feb 2017 11:53:23 +0000 Subject: [PATCH 1/4] bundles/cc: Simplify the Clear Container bundle page The CC bundle page had far too much technical detail, and not enough overview. Simplify the page by removing the tech info and adding some overview. Signed-off-by: Graham Whaley --- source/bdl-containers-basic.rst | 90 +++++++-------------------------- 1 file changed, 19 insertions(+), 71 deletions(-) diff --git a/source/bdl-containers-basic.rst b/source/bdl-containers-basic.rst index 253df17e..77e2a4cc 100644 --- a/source/bdl-containers-basic.rst +++ b/source/bdl-containers-basic.rst @@ -3,83 +3,31 @@ containers-basic ################ -This bundle provides container applications +Overview +======== -Multiple runtime support for Docker -=================================== +The `containers-basic` bundle adds the necessary tools to enable running +containers using Docker*. The bundle includes Intel® Clear Containers as an +additional Docker runtime. -Docker\* 1.12+ provides a way to execute containers using different **"oci -runtimes"**. An **"oci runtime"** is software compatible with :abbr:`OCI -(Open Containers Initiative)` specification that is responsible to create -a container. +Clear Containers enables a hardware backed Virtual Machine (VM) based container +runtime, compared with the normal software namespace containers provided by +standard Docker `runc` runtime. -.. note:: Docker in Clear Linux is configured to use 2 runtimes: +Default runtime +=============== +If your system has `VT-x` enabled then, under Clear Linux, Clear Containers +will be used as the default Docker runtime, otherwise the standard Docker +`runc` runtime will be used. -**cc-oci-runtime**: This is the default runtime used by docker in Clear Linux (if -Vt-x support is enabled). This runtime provides the capability to create secure -containers using Clear Containers (based VM containers). -**runc**: This runtime is used to spawn and run containers using namespaces and -cgroups (this is the traditional way to create containers used by docker). +To identify which runtimes are available, as well as which is being used as +the default on your installed system, you can run the following command. Clear +Containers runtime will be listed as `cor`:: -In Clear Linux, each time a container is created it uses cc-oci-runtime (*A.K.A* -**cor**). + $ sudo docker info | grep Runtime -To start a secure container with cc-oci-runtime aka cor:: +For more information on Clear Containers please see the `Clear Containers runtime github`_. - docker run -ti debian sh - -In the case you want to start a non secure container. You can -use the option **--runtime=runc** in the docker command **"run"** - -To start an non-secure container using runc runtime:: - - docker run --runtime=runc -ti debian sh - -Change default runtime -====================== - -To modify the default runtime you can override -the stateless docker daemon configuration -creating the file :file:`/etc/systemd/system/docker-cor.service.d/docker.conf` -and adding **--default-runtinme=runc**:: - - [Service] - ExecStart=/usr/bin/dockerd -H fd:// --storage-driver=overlay --add runtime cor=cc-oci-runtime --default-runtime=runc - -HTTP proxy -========== - -If you are behind an HTTP proxy server, for example in corporate settings, you -will need to add this configuration in the Docker systemd service file. - -First, create a systemd drop-in directory for the docker service:: - - mkdir /etc/systemd/system/docker-cor.service.d - -Now create a file called :file:`/etc/systemd/system/docker-cor.service.d/http-proxy.conf` -that adds the HTTP_PROXY environment variable:: - - [Service] - Environment="HTTP_PROXY=http://proxy.example.com:80/" - -If you have internal Docker registries that you need to contact without proxying -you can specify them via the NO_PROXY environment variable:: - - Environment="HTTP_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com" - -Flush changes:: - - $ sudo systemctl daemon-reload - -Verify that the configuration has been loaded:: - - $ systemctl show --property=Environment docker-cor - Environment=HTTP_PROXY=http://proxy.example.com:80/ - -Restart Docker:: - - $ sudo systemctl restart docker-cor - -To get more info you can view https://docs.docker.com/engine/admin/systemd/ +.. _Clear Containers runtime github: https://github.com/01org/cc-oci-runtime From b478e3aea1ca9168f58b3c4dba932b13b7a82336 Mon Sep 17 00:00:00 2001 From: Rodrigo Caballero Date: Wed, 15 Mar 2017 15:34:43 -0600 Subject: [PATCH 2/4] Edit for grammar, clarity, and markup. Additionally, a note was added with a reference to the Docker proxy documentation to keep that content available. Signed-off-by: Rodrigo Caballero --- source/bdl-containers-basic.rst | 35 ++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/source/bdl-containers-basic.rst b/source/bdl-containers-basic.rst index 77e2a4cc..b6a90791 100644 --- a/source/bdl-containers-basic.rst +++ b/source/bdl-containers-basic.rst @@ -3,31 +3,38 @@ containers-basic ################ -Overview -======== - The `containers-basic` bundle adds the necessary tools to enable running -containers using Docker*. The bundle includes Intel® Clear Containers as an +containers using Docker*. The bundle includes Intel® |CC| as an additional Docker runtime. -Clear Containers enables a hardware backed Virtual Machine (VM) based container -runtime, compared with the normal software namespace containers provided by -standard Docker `runc` runtime. +|CC| enable a hardware backed :abbr:`VM (Virtual Machine)` based +container runtime, compared with the normal software namespace containers +provided by standard Docker `runc` runtime. Default runtime =============== -If your system has `VT-x` enabled then, under Clear Linux, Clear Containers -will be used as the default Docker runtime, otherwise the standard Docker +If your system has `VT-x` enabled, then, under |CL|, |CC| +will be used as the default Docker runtime, otherwise, the standard Docker `runc` runtime will be used. +To identify which runtimes are available and which is being used as +the default on your installed system, run the following command. -To identify which runtimes are available, as well as which is being used as -the default on your installed system, you can run the following command. Clear -Containers runtime will be listed as `cor`:: +.. code-block:: console - $ sudo docker info | grep Runtime + sudo docker info | grep Runtime -For more information on Clear Containers please see the `Clear Containers runtime github`_. +The |CC| runtime will be listed as `cor`. + +.. note:: + + If you are behind an HTTP proxy server, for example in a corporate + setting, please follow the `Docker proxy instructions`_. + +For more information on |CC| please see the +`Clear Containers runtime Github`_. .. _Clear Containers runtime github: https://github.com/01org/cc-oci-runtime +.. _Docker proxy instructions: + https://docs.docker.xom/engine/admin/systemd/#http-proxy \ No newline at end of file From b7b732e6e9e4642c3c21252e3c04bdfc46069ecc Mon Sep 17 00:00:00 2001 From: Rodrigo Caballero Date: Thu, 23 Mar 2017 14:27:59 -0600 Subject: [PATCH 3/4] Introduce a proxy section to reference the instructions. Signed-off-by: Rodrigo Caballero --- source/bdl-containers-basic.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/bdl-containers-basic.rst b/source/bdl-containers-basic.rst index b6a90791..40680631 100644 --- a/source/bdl-containers-basic.rst +++ b/source/bdl-containers-basic.rst @@ -26,15 +26,16 @@ the default on your installed system, run the following command. The |CC| runtime will be listed as `cor`. -.. note:: - - If you are behind an HTTP proxy server, for example in a corporate - setting, please follow the `Docker proxy instructions`_. - For more information on |CC| please see the `Clear Containers runtime Github`_. +Working with a proxy +==================== + +If you are behind an HTTP proxy server, in a corporate +setting for example, please follow the `Docker proxy instructions`_. + .. _Clear Containers runtime github: https://github.com/01org/cc-oci-runtime .. _Docker proxy instructions: - https://docs.docker.xom/engine/admin/systemd/#http-proxy \ No newline at end of file + https://docs.docker.xom/engine/admin/systemd/#http-proxy From be478316a62b0d57216c4532e6e81a48afac718c Mon Sep 17 00:00:00 2001 From: Rodrigo Caballero Date: Thu, 23 Mar 2017 14:32:50 -0600 Subject: [PATCH 4/4] Fix capitalization of GitHub. Signed-off-by: Rodrigo Caballero --- source/bdl-containers-basic.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/bdl-containers-basic.rst b/source/bdl-containers-basic.rst index 40680631..8c07bff4 100644 --- a/source/bdl-containers-basic.rst +++ b/source/bdl-containers-basic.rst @@ -27,7 +27,7 @@ the default on your installed system, run the following command. The |CC| runtime will be listed as `cor`. For more information on |CC| please see the -`Clear Containers runtime Github`_. +`Clear Containers runtime GitHub`_. Working with a proxy ==================== @@ -35,7 +35,7 @@ Working with a proxy If you are behind an HTTP proxy server, in a corporate setting for example, please follow the `Docker proxy instructions`_. -.. _Clear Containers runtime github: https://github.com/01org/cc-oci-runtime +.. _Clear Containers runtime GitHub: https://github.com/01org/cc-oci-runtime .. _Docker proxy instructions: https://docs.docker.xom/engine/admin/systemd/#http-proxy