diff --git a/source/clear-linux/concepts/mixer-about.rst b/source/clear-linux/concepts/mixer-about.rst index 7de26f0c..7515a995 100644 --- a/source/clear-linux/concepts/mixer-about.rst +++ b/source/clear-linux/concepts/mixer-about.rst @@ -10,7 +10,5 @@ Mixing is a multi-step process that starts with installing the mixer bundle usin Related Concepts ================ -* :ref:`swupd_about` -* :ref:`bundles_about` - - +* :ref:`swupd-about` +* :ref:`bundles-about` diff --git a/source/clear-linux/get-started/bootable-usb/bootable-usb-windows.rst b/source/clear-linux/get-started/bootable-usb/bootable-usb-windows.rst index 422af7ff..424c7ebb 100644 --- a/source/clear-linux/get-started/bootable-usb/bootable-usb-windows.rst +++ b/source/clear-linux/get-started/bootable-usb/bootable-usb-windows.rst @@ -27,36 +27,34 @@ Burn the Clear Linux image onto a USB drive |CAUTION-BACKUP-USB| -#. Download the `Rufus`_ tool to burn the image onto a USB drive. -#. Plug in the USB drive. -#. Click the :guilabel:`CD-ROM` icon button. See Figure 1. +#. Download the `Rufus`_ utility to burn the image onto a USB drive. - .. figure:: figures/bootable-usb-windows-1.png - :scale: 80 % - :alt: Rufus utility - Click CD-ROM button +#. Plug in the USB drive and open Rufus. - Figure 1: Rufus utility - Click CD-ROM button +#. Click the :guilabel:`SELECT` button. See Figure 1. -#. By default, Rufus only shows ISO files. To find and select a compressed |CL| - image file, you must click the file-type dropdown and select :guilabel:`All files`. - See Figure 2. + .. figure:: figures/bootable-usb-windows-1.png + :scale: 80 % + :alt: Rufus utility - Click the SELECT button - .. figure:: figures/bootable-usb-windows-2.png - :scale: 80 % - :alt: Rufus utility - Show and select |CL| image file + Figure 1: Rufus utility - Click the SELECT button - Figure 2: Rufus utility - Show and select |CL| image file +#. Find and select the previously extracted |CL| image file. + Then, click the :guilabel:`Open` button. See Figure 2. + + .. figure:: figures/bootable-usb-windows-2.png + :scale: 80 % + :alt: Rufus utility - Show and select |CL| image file + + Figure 2: Rufus utility - Show and select |CL| image file -#. Verify that :guilabel:`Create a bootable disk using DD Image` checkbox is - checked. See Figure 3. +#. Click the :guilabel:`START` button. See Figure 3. - .. figure:: figures/bootable-usb-windows-3.png - :scale: 80 % - :alt: Rufus utility - Create a bootable disk using DD Image - - Figure 3: Rufus utility - Create a bootable disk using DD Image - -#. Click :guilabel:`Start`. + .. figure:: figures/bootable-usb-windows-3.png + :scale: 80 % + :alt: Rufus utility - Click the START button + + Figure 3: Rufus utility - Click START button Next steps ********** diff --git a/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-1.png b/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-1.png index 39152060..b7e64c7c 100644 Binary files a/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-1.png and b/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-1.png differ diff --git a/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-2.png b/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-2.png index 2441ff67..f0a66050 100644 Binary files a/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-2.png and b/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-2.png differ diff --git a/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-3.png b/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-3.png index f9e32fe3..e6ae1cb5 100644 Binary files a/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-3.png and b/source/clear-linux/get-started/bootable-usb/figures/bootable-usb-windows-3.png differ diff --git a/source/clear-linux/reference/bundle-commands.rst b/source/clear-linux/reference/bundle-commands.rst index 40ddf99f..81c8edd8 100644 --- a/source/clear-linux/reference/bundle-commands.rst +++ b/source/clear-linux/reference/bundle-commands.rst @@ -3,20 +3,45 @@ Useful bundle commands ###################### -To see a list of currently-installed bundles, enter: +To see a list of currently installed bundles, enter: -.. code-block:: console +.. code-block:: bash - # swupd bundle-list + sudo swupd bundle-list To see the list of all available bundles, enter: -.. code-block:: console +.. code-block:: bash - # swupd bundle-list --all + sudo swupd bundle-list --all + +Alternatively, you may reference the `available bundle list`_ webpage. + +To search for bundles and their contents, enter: + +.. code-block:: bash + + sudo swupd search [bundle name] To add a bundle, enter: -.. code-block:: console +.. code-block:: bash - # swupd bundle-add [bundle name] \ No newline at end of file + sudo swupd bundle-add [bundle name] + +Additional information +====================== + +For additional :command:`swupd` commands, enter: + +.. code-block:: bash + + swupd --help + +To reference the :command:`swupd` man page, enter: + +.. code-block:: bash + + man swupd + +.. _available bundle list: https://clearlinux.org/documentation/clear-linux/reference/bundles/available-bundles diff --git a/source/clear-linux/tutorials/docker/docker.rst b/source/clear-linux/tutorials/docker/docker.rst new file mode 100644 index 00000000..75c00e35 --- /dev/null +++ b/source/clear-linux/tutorials/docker/docker.rst @@ -0,0 +1,233 @@ +.. _docker: + +Run Docker\* on Clear Linux\* +############################# + +|CLOSIA| supports multiple containerization platforms, including a Docker\* +solution.|CL| has many `unique features`_ including a minimal default +installation which makes it compelling to use as a host for container +workloads, management, and orchestration. + +This tutorial covers: + +.. contents:: :local: + :depth: 1 + +.. note:: + + This tutorial focuses on the installaton of the Docker ecosystem. + If you want to use |CL| as a Docker container image, refer to the + official `Clear Linux image on Docker Hub`_ + and `building a custom Clear Linux docker image`_ . + +Prerequisites +************* + +* Basic understanding of Linux and Docker. + +* Successful completion: :ref:`bare-metal-install` + +* |CL| environment that has transparent network access to the Internet. + If you are behind a HTTP proxy server, in a corporate setting for example, + please refer to the `Docker proxy instructions`_ . + +Install the containers-basic bundle +*********************************** + +Software in |CL| is offered in the form of `bundles`_ to provide a +complete function. The *containers-basic* provides all the required software +packages to run Docker images as containers. + +#. First, install the *containers-basic* bundle by running this + :command:`swupd` command: + + .. code-block:: bash + + sudo swupd bundle-add containers-basic + +#. Start the Docker daemon through systemd manager by running this command: + + .. code-block:: bash + + sudo systemctl start docker + + If you want Docker to start automatically on boot, enable the + systemd service by running this command: + + .. code-block:: bash + + sudo systemctl enable docker + +#. Finally, verify :command:`docker` has been installed by running this + command and checking the version output for both *client* and *server*: + + .. code-block:: bash + + sudo docker version + +Congratulations! At this point, you have a working installation of Docker +on |CL|. You are ready to start using container images on your system. + +Integration with Clear Containers (optional) +******************************************** + +`Clear Containers`_, is an open source project aiming to increase security +of containers by using a hardware-backed virtual machine container runtime, +instead of software namespace containers that are provided by the standard +Docker *runc* runtime. + +The Docker package from |CL| will automatically use the *cc-runtime* +required for Clear Containers if it is available on your Clear Linux system. + +#. To take advantage of Clear Containers in |CL|, install the + *containers-virt* bundle by running this command: + + .. code-block:: bash + + sudo swupd bundle-add containers-virt + +#. Restart the Docker daemon through systemd manager by running this command: + + .. code-block:: bash + + sudo systemctl restart docker + +#. After restarting, the Docker daemon will seamlessly use Clear Containers + to launch containers. You can see the runtime has changed to + :command:`cc-runtime` by running this command: + + .. code-block:: bash + + sudo docker info | grep Runtime + +#. You should see the following output indicating the *cc-runtime* is the + Default Runtime: + + .. code-block:: console + + Runtimes: cc-runtime runc + Default Runtime: cc-runtime + +Congratulations! At this point, you have successfully replaced the default +container runtime with Clear Containers. + +.. note:: + + The proceeding sections of this tutorial are standard to Docker setup + and configuration. If you are familiar with Docker basics, you do not + need to continue reading. The following sections are provided here for + sake of completeness. + +Additional Docker configuration +******************************* + +Perform additional Docker daemon configuration via a configuration file +typically located at :file:`/etc/docker/daemon.json`. |CL| features a +`stateless system`_ so the configuration file :file:`daemon.json` does *NOT* +exist by default. + +#. Create the :file:`daemon.json` by running this command: + + .. code-block:: bash + + touch /etc/docker/daemon.json + + .. note:: + + Refer to the `Docker documentation on daemon configuration`_ for the + full list of available configuration options and examples. + +#. Once you've made any required changes, be sure to restart the + Docker daemon through systemd manager by running this command: + + .. code-block:: bash + + sudo systemctl restart docker + +Pulling and Running an image from Docker Hub +******************************************** + +`Docker Hub`_ is a publically available container image repository which +comes preconfigured with Docker. In the example below we will pull and run +an the official Docker image for nginx, an open source reverse proxy server. + +#. First, pull a container image from Docker Hub using the + :command:`docker pull` command. Download the latest nginx Docker + container image by running this command: + + .. code-block:: bash + + sudo docker pull nginx + +#. Create and launch a new container using the :command:`docker run` + command. Launch a nginx container by running this command: + + .. code-block:: bash + + sudo docker run --name test-nginx -d -p 8080:80 nginx + + .. note:: + + Below is an explaination of switches used in the command above. For + detailed :command:`docker run` switches and syntax, refer to the + `Docker Documentation`_ . + + * The :option:`--name` switch lets you provide a friendly name to + target the container for future operations + + * The :option:`-d` switch launches the container in the background + + * The :option:`-p` switch allows the container's HTTP port (80) to be + accessible from the Clear Linux host on port 8080 + +#. You can access the Welcome to Nginx! splash page running in the container + by browsing to http://127.0.0.1:8080 or by running this :command:`curl` + command from your Clear Linux machine: + + .. code-block:: bash + + curl 127.0.0.1:8080 + +#. Finally, stop and delete the nginx container by running the + :command:`docker stop` and :command:`docker rm` commands. + + .. code-block:: bash + + sudo docker stop test-nginx + sudo docker rm test-nginx + +Congratulations! At this point, you have successfully pulled a nginx +container image from `Docker Hub`_ and ran an example container. + +Creating a Docker swarm cluster +******************************* + +Clusters of Docker hosts are referred to as swarms. + +The process in this tutorial can be repeated to install Docker on multiple +Clear Linux hosts with the intent to form a Docker swarm cluster. + +The `Docker documentation on swarm key concepts`_ and +`Docker documentation on creating a swarm`_ can be referenced +for further instructions on setting up a swarm. + +Also see: +--------- +* `Docker Home`_ +* `Docker Documentation`_ +* `Docker Hub`_ +* `Clear Containers`_ + +.. _`unique features`: https://clearlinux.org/features +.. _`Clear Linux image on Docker Hub`: https://hub.docker.com/_/clearlinux/ +.. _`building a custom Clear Linux docker image`: https://clearlinux.org/documentation/clear-linux/guides/network/custom-clear-container +.. _`Docker proxy instructions`: https://docs.docker.com/config/daemon/systemd/#httphttps-proxy +.. _`bundles`: https://clearlinux.org/documentation/clear-linux/concepts/bundles-about#related-concepts +.. _`stateless system`: https://clearlinux.org/features/stateless +.. _`Docker documentation on daemon configuration`: https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file +.. _`Clear Containers`: https://github.com/clearcontainers +.. _`Docker Home`: https://www.docker.com/ +.. _`Docker Documentation`: https://docs.docker.com/ +.. _`Docker Hub`: https://hub.docker.com/ +.. _`Docker documentation on swarm key concepts`: https://docs.docker.com/engine/swarm/key-concepts/ +.. _`Docker documentation on creating a swarm`: https://docs.docker.com/engine/swarm/swarm-tutorial/create-swarm/ diff --git a/source/clear-linux/tutorials/tutorials.rst b/source/clear-linux/tutorials/tutorials.rst index 3cbb1f17..34f0d9a0 100644 --- a/source/clear-linux/tutorials/tutorials.rst +++ b/source/clear-linux/tutorials/tutorials.rst @@ -12,6 +12,7 @@ specific |CLOSIA| use cases. wordpress flatpak/flatpak machine-learning/machine-learning + docker/docker azure/azure multi-boot/multi-boot hadoop