Merge branch 'master' into kata-migration-edits

This commit is contained in:
mvincerx
2018-07-09 13:26:27 -07:00
committed by GitHub
25 changed files with 959 additions and 385 deletions
+1
View File
@@ -11,5 +11,6 @@ details relevant to the |CL| features.
:maxdepth: 2
swupd-about
mixer-about
bundles-about
restart
@@ -0,0 +1,14 @@
.. _mixer-about:
Mixer
#######
Mixing refers to composing a custom, versioned image of |CLOSIA| for a specific use case. While upstream |CL| provides options to install bundles for various capabilities, some developers and OSVs may wish to either augment the operating system with functionality from their own packages or modify the structure of current bundles. Mixing offers a method to add capabilities while retaining the ability to stay up to date with an upstream version of |CL|.
Mixing is a multi-step process that starts with installing the mixer bundle using swupd. You will also need a working knowledge of :abbr:`RPMs (RPM Package Manager files)` and how |CL| bundles work. For a detailed guide on how to create a |CL| mix, visit :ref:`mixer`.
Related Concepts
================
* :ref:`swupd-about`
* :ref:`bundles-about`
+3 -3
View File
@@ -95,11 +95,11 @@ patches.
Clear Linux OS will automatically check for updates and apply them. This default
can be disabled by running::
# systemctl mask swupd-update.timer
# swupd autoupdate --disable
And reenabled by running::
# systemctl unmask swupd-update.timer
# swupd autoupdate --enable
Update speed
@@ -107,7 +107,7 @@ Update speed
Software updates with Clear Linux OS for Intel Architecture are also
efficient. Bundles simply describe a set of files, and the update
technology updates *only* files that actually changed by using so-called
technology updates *only* files that actually changed by using
binary-delta technology for efficiency [1]_. Operating systems that use
packages as the unit of deployment require full package updates (thus
hogging resources), even when one small file in that package has changed.
@@ -44,7 +44,7 @@ Follow these steps to install |CL| on the target system:
#. Power on the system.
#. Open the system BIOS setup menu, normally by pressing the :kbd:`F2` key.
#. Open the system BIOS setup menu by pressing the :kbd:`F2` key.
Your BIOS setup menu entry point may vary.
#. In the setup menu, enable the UEFI boot and set the USB drive as the first
@@ -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
**********
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@@ -1,36 +1,33 @@
.. _vmware-esxi-preconfigured-cl-image:
Run preconfigured Clear Linux image as a VMware\* ESXi guest OS
Run preconfigured Clear Linux\* image as a VMware\* ESXi guest OS
###############################################################
`VMware ESXi`_ is a type 1 bare-metal hypervisor which runs directly on top
of server hardware. With VMware ESXi, you can create, configure, manage,
and run |CLOSIA| virtual machines in the cloud.
and run |CLOSIA| virtual machines at scale.
This section shows you how to deploy a preconfigured |CL| VMware image on
VMware ESXi 6.5 Update 1 using these steps:
VMware ESXi 6.5.
#. Download the latest Clear Linux VMware image.
#. Verify the integrity of the |CL| image.
#. Uncompress the |CL| image.
#. Upload the Clear Linux image to the VMware server.
#. Convert the Clear Linux image to an ESXi-supported format.
#. Create and configure a new VM.
#. Power on the VM and boot |CL|.
If you would prefer to perform a fresh installation of |CL| into a new VMware
ESXi :abbr:`VM (Virtual Machine)` instead, see :ref:`vmware-esxi-install-cl`.
If you would prefer to perform a manual installation of |CL| into a new
VMware ESXi :abbr:`VM (Virtual Machine)` instead, see
:ref:`vmware-esxi-install-cl`. Visit :ref:`image-types` to learn more about
the available images.
.. note::
VMware also offers a type 2 hypervisor called `VMware Workstation Player`_ which is designed for the desktop environment.
VMware also offers a type 2 hypervisor called `VMware Workstation Player`
which is designed for the desktop environment.
See :ref:`vmw-player-preconf` or see :ref:`vmw-player`.
Visit :ref:`image-types` to learn more about the available images.
.. contents:: :local:
:depth: 2
Download the latest Clear Linux VMware image
********************************************
Get the latest |CL| VMware image from the `image`_ repository.
Get the latest |CL| VMware prebuilt image from the `image`_ repository.
Look for :file:`clear-[version number]-vmware.vmdk.xz`. You can also use
this command:
@@ -50,59 +47,87 @@ For alternative instructions on other operating systems, see:
Upload the Clear Linux image to the VMware server
*************************************************
#. Connect to the VMware server and login to an account with sufficient
permission to create and manage VMs.
#. Under the :guilabel:`Navigator` window, select :guilabel:`Storage`.
See Figure 1.
#. Under the :guilabel:`Datastores` tab, click
the :guilabel:`Datastore browser` button.
Once the |CL| VMware prebuilt image has been downloaded and
uncompressed on your local system, it must be uploaded to a datastore
on the VMware ESXi server.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-1.png
The steps in this section can also be referenced from the `VMware documentation on Using the Datastore File Browser`_
#. Connect to the VMware ESXi server and login to an account with sufficient
permission to create and manage VMs.
#. Under the :guilabel:`Navigator` window on the left side,
select :guilabel:`Storage`.
See Figure 1
#. Under the :guilabel:`Datastores` tab, click
the :guilabel:`Datastore browser` button.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-1.png
:scale: 100 %
:alt: VMware ESXi - Navigator > Storage
Figure 1: VMware ESXi - Navigator > Storage
#. Click the :guilabel:`Create directory` button and name the directory
`Clear Linux VM`. See Figure 2.
#. Click the :guilabel:`Create directory` button and name the directory
`Clear Linux VM`. See Figure 2.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-2.png
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-2.png
:scale: 100 %
:alt: VMware ESXi - Datastore > Create directory
Figure 2: VMware ESXi - Datastore > Create directory
#. Select the newly-created directory and click the :guilabel:`Upload`
button. See Figure 3.
#. Select the newly-created directory and click the :guilabel:`Upload`
button. See Figure 3.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-3.png
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-3.png
:scale: 100 %
:alt: VMware ESXi - Datastore > Upload VMware image
Figure 3: VMware ESXi - Datastore > Upload VMware image
#. Select the uncompressed |CL| VMware image file
:file:`clear-[version number]-vmware.vmdk` and upload it.
#. Select the uncompressed |CL| VMware image file
:file:`clear-[version number]-vmware.vmdk` and upload it.
Convert the Clear Linux image to an ESXi-supported format
*********************************************************
#. SSH into the VMware server and login to an account with root privileges.
#. Locate the uploaded image, which is typically found in `/vmfs/volumes/datastore1`.
#. Use the :command:`vmkfstools` command to perform the conversion, as
shown below:
Once the |CL| VMware prebuilt image has been uploaded to the VMware ESXi
datastore, it must be converted to a format for usable with VMware's ESXi
hypervisor.
.. code-block:: console
The steps in this section can also be referenced from the `VMware documentation on Cloning and converting virtual machine disks with vmkfstools`_
# vmkfstools -i clear-[version number]-vmware.vmdk -d zeroedthick clear-[version number]-esxi.vmdk
#. SSH into the `vSphere Management Assistant`_ appliance that is managing
the ESXi host or connect to the vSphere hosting using the `vSphere CLI`_.
.. note::
If there is no :abbr:`vMA (vSphere Management Assistant)` appliance or :abbr:`vCLI (vSphere CLI)` configured and available,
you can temporarily enable SSH directly on the ESXi host by referencing
the `VMware documentation on Enable the Secure Shell (SSH)`_ .
Two files should result from this:
As a security best practice, remember to disable SSH access after following the steps in this section.
* :file:`clear-[version number]-esxi-flat.vmdk`
* :file:`clear-[version number]-esxi.vmdk`
The :file:`clear-[version number]-esxi.vmdk` file will be used in the
next section when you create a new VM.
#. Locate the uploaded image, which is typically found in
:file:`/vmfs/volumes/datastore1`.
#. Use the :command:`vmkfstools` command to perform the conversion, as
shown below:
.. code-block:: console
vmkfstools -i clear-[version number]-vmware.vmdk -d zeroedthick clear-[version number]-esxi.vmdk
Two files should result from this:
* :file:`clear-[version number]-esxi-flat.vmdk`
* :file:`clear-[version number]-esxi.vmdk`
The :file:`clear-[version number]-esxi.vmdk` file will be used in the
next section when you create a new VM.
Create and configure a new VM
*****************************
@@ -111,138 +136,153 @@ In this section, you will create a new VM, configure its basic parameters
such as number of CPUs, memory size, and then attach the converted |CL|
VMware image. Also, in order to boot |CL|, you must enable UEFI support.
#. Under the :guilabel:`Navigator` window, select :guilabel:`Virtual Machines`. See Figure 4.
#. Under the :guilabel:`Navigator` window, select
:guilabel:`Virtual Machines`. See Figure 4.
#. In the right window, click the :guilabel:`Create / Register VM` button.
#. In the right window, click the :guilabel:`Create / Register VM` button.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-4.png
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-4.png
:scale: 100 %
:alt: VMware ESXi - Navigator > Virtual Machines
Figure 4: VMware ESXi - Navigator > Virtual Machines
#. On the :guilabel:`Select creation type` step:
#. On the :guilabel:`Select creation type` step:
#. Select the :guilabel:`Create a new virtual machine` option. See
Figure 5.
#. Select the :guilabel:`Create a new virtual machine` option. See
Figure 5.
#. Click the :guilabel:`Next` button.
#. Click the :guilabel:`Next` button.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-5.png
:scale: 100 %
:alt: VMware ESXi - Create a new virtual machine
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-5.png
:scale: 100 %
:alt: VMware ESXi - Create a new virtual machine
Figure 5: VMware ESXi - Create a new virtual machine
Figure 5: VMware ESXi - Create a new virtual machine
#. On the :guilabel:`Select a name and guest OS` step:
#. On the :guilabel:`Select a name and guest OS` step:
#. Give the new VM a name in the :guilabel:`Name` field. See Figure 6.
#. Set the :guilabel:`Compatability` option to :guilabel:`ESXi 6.5 virtual machine`.
#. Set the :guilabel:`Guest OS family` option to :guilabel:`Linux`.
#. Set the :guilabel:`Guest OS version` option to :guilabel:`Other 3.x or later Linux (64-bit)`.
#. Click the :guilabel:`Next` button.
#. Give the new VM a name in the :guilabel:`Name` field. See Figure 6.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-6.png
:scale: 100 %
:alt: VMware ESXi - Give a name and select guest OS type
#. Set the :guilabel:`Compatability` option to
:guilabel:`ESXi 6.5 virtual machine`.
#. Set the :guilabel:`Guest OS family` option to :guilabel:`Linux`.
#. Set the :guilabel:`Guest OS version` option to
:guilabel:`Other 3.x or later Linux (64-bit)`.
#. Click the :guilabel:`Next` button.
Figure 6: VMware ESXi - Give a name and select guest OS type
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-6.png
:scale: 100 %
:alt: VMware ESXi - Give a name and select guest OS type
#. On the :guilabel:`Select storage` step:
Figure 6: VMware ESXi - Give a name and select guest OS type
#. Accept the default option.
#. Click the :guilabel:`Next` button.
#. On the :guilabel:`Select storage` step:
#. On the :guilabel:`Customize settings` step:
#. Accept the default option.
#. Click the :guilabel:`Next` button.
#. Click the :guilabel:`Virtual Hardware` button. See Figure 7.
#. Expand the :guilabel:`CPU` setting and enable :guilabel:`Hardware virtualization` by
checking :guilabel:`Expose hardware assisted virtualization to the guest OS`.
#. On the :guilabel:`Customize settings` step:
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-7.png
:scale: 100 %
:alt: VMware ESXi - Enable hardware virtualization
#. Click the :guilabel:`Virtual Hardware` button. See Figure 7.
#. Expand the :guilabel:`CPU` setting and enable
:guilabel:`Hardware virtualization` by checking
:guilabel:`Expose hardware assisted virtualization to the guest OS`.
Figure 7: VMware ESXi - Enable hardware virtualization
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-7.png
:scale: 100 %
:alt: VMware ESXi - Enable hardware virtualization
#. Remove the default :guilabel:`Hard drive 1` setting by clicking
the `X` icon on the right side. See Figure 8.
Figure 7: VMware ESXi - Enable hardware virtualization
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-8.png
:scale: 100 %
:alt: VMware ESXi - Remove hard drive
#. Remove the default :guilabel:`Hard drive 1` setting by clicking
the `X` icon on the right side. See Figure 8.
Figure 8: VMware ESXi - Remove hard drive
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-8.png
:scale: 100 %
:alt: VMware ESXi - Remove hard drive
#. Since a preconfigured image will be used,
the :guilabel:`CD/DVD Drive 1` setting will not be needed. Disable it by unchecking the :guilabel:`Connect` checkbox. See Figure 9.
Figure 8: VMware ESXi - Remove hard drive
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-9.png
:scale: 100 %
:alt: VMware ESXi - Disconnect the CD/DVD drive
#. Since a preconfigured image will be used,
the :guilabel:`CD/DVD Drive 1` setting will not be needed. Disable it
by unchecking the :guilabel:`Connect` checkbox. See Figure 9.
Figure 9: VMware ESXi - Disconnect the CD/DVD drive
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-9.png
:scale: 100 %
:alt: VMware ESXi - Disconnect the CD/DVD drive
#. Attach the :file:`clear-[version number]-esxi.vmdk` file that was
converted from the preconfigured |CL| VMware image.
Figure 9: VMware ESXi - Disconnect the CD/DVD drive
#. Click the :guilabel:`Add hard disk` button and select the
:guilabel:`Existing hard drive` option. See Figure 10.
#. Attach the :file:`clear-[version number]-esxi.vmdk` file that was
converted from the preconfigured |CL| VMware image.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-10.png
:scale: 100 %
:alt: VMware ESXi - Add an existing hard drive
#. Click the :guilabel:`Add hard disk` button and select the
:guilabel:`Existing hard drive` option. See Figure 10.
Figure 10: VMware ESXi - Add an existing hard drive
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-10.png
:scale: 100 %
:alt: VMware ESXi - Add an existing hard drive
#. Select the converted :file:`clear-[version number]-esxi.vmdk`
file. Do not use the original unconverted :file:`clear-[version number]-vmware.vmdk` file. See Figure 11.
Figure 10: VMware ESXi - Add an existing hard drive
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-11.png
:scale: 100 %
:alt: VMware ESXi - Select the converted `vmdk` file
#. Select the converted :file:`clear-[version number]-esxi.vmdk`
file. Do not use the original unconverted
:file:`clear-[version number]-vmware.vmdk` file. See Figure 11.
Figure 11: VMware ESXi - Select the converted :file:`clear-[version number]-esxi.vmdk` file
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-11.png
:scale: 100 %
:alt: VMware ESXi - Select the converted `vmdk` file
#. |CL| needs UEFI support in order to boot. Enable UEFI boot support.
Figure 11: VMware ESXi - Select the converted
:file:`clear-[version number]-esxi.vmdk` file
#. Click the :guilabel:`VM Options` button. See Figure 12.
#. Expand the :guilabel:`Boot Options` setting.
#. For the :guilabel:`Firmware` setting, click the drop-down list to
the right of it and select the :guilabel:`EFI` option.
#. |CL| needs UEFI support in order to boot. Enable UEFI boot support.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-12.png
:scale: 100 %
:alt: VMware ESXi - Set boot firmware to EFI
#. Click the :guilabel:`VM Options` button. See Figure 12.
#. Expand the :guilabel:`Boot Options` setting.
#. For the :guilabel:`Firmware` setting, click the drop-down list to
the right of it and select the :guilabel:`EFI` option.
Figure 12: VMware ESXi - Set boot firmware to EFI
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-12.png
:scale: 100 %
:alt: VMware ESXi - Set boot firmware to EFI
#. Click the :guilabel:`Save` button.
#. Click the :guilabel:`Next` button.
#. Click the :guilabel:`Finish` button.
Figure 12: VMware ESXi - Set boot firmware to EFI
#. Click the :guilabel:`Save` button.
#. Click the :guilabel:`Next` button.
#. Click the :guilabel:`Finish` button.
Power on the VM and boot Clear Linux
************************************
After configuring the settings above, power on the VM.
#. Under the :guilabel:`Navigator` window, select :guilabel:`Virtual Machines`. See Figure 13.
#. In the right window, select the newly-created VM.
#. Click the :guilabel:`Power on` button.
#. Click on the icon representing the VM to bring it into view and maximize
its window.
#. Under the :guilabel:`Navigator` window, select
:guilabel:`Virtual Machines`. See Figure 13.
#. In the right window, select the newly-created VM.
#. Click the :guilabel:`Power on` button.
#. Click on the icon representing the VM to bring it into view and maximize
its window.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-13.png
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-13.png
:scale: 100 %
:alt: VMware ESXi - Navigator > Virtual Machines > Power on VM
Figure 13: VMware ESXi - Navigator > Virtual Machines > Power on VM
Also see:
*********
=========
* :ref:`vmware-esxi-install-cl`
.. _VMware ESXi: https://www.vmware.com/products/esxi-and-esx.html
.. _VMware documentation on Using the Datastore File Browser: https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.html.hostclient.doc/GUID-7533A767-8396-4844-A3F2-206047D254EA.html
.. _vSphere Management Assistant: https://www.vmware.com/support/developer/vima/
.. _vSphere CLI: https://www.vmware.com/support/developer/vcli/
.. _VMware documentation on Cloning and converting virtual machine disks with vmkfstools: https://kb.vmware.com/kb/1028042
.. _VMware documentation on Enable the Secure Shell (SSH): https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.html.hostclient.doc/GUID-B649CB74-832F-467B-B6A4-8BA67AD5C1F0.html
.. _VMware documentation on General ESXi Security Recommendations: https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.security.doc/GUID-B39474AF-6778-499A-B8AB-E973BE6D4899.html
.. _VMware Workstation Player: https://www.vmware.com/products/workstation-player.html
.. _image: https://download.clearlinux.org/image
@@ -42,6 +42,9 @@ checksum, a warning is displayed with a message indicating the computed
checksum does **not** match. Otherwise, the name of the image is printed on
the screen followed by `OK`.
For a more in-depth discussion of image verification including checking the
certificate see :ref:`image-content-validation`.
Uncompress the Clear Linux image
********************************
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -1,58 +0,0 @@
.. _image-types:
Clear Linux image types
#######################
.. _image-types-content:
|CLOSIA| offers many types of `images`_ for different platforms and environments.
The naming convention of a |CL| image filename is:
.. code-block:: console
clear-[version number]-[image type].[compression type]
The *[version number]* field specifies the version number.
The *[image type]* field specifies the type of image and its corresponding
file format.
The *[compression type]* field specifies the compression type. Two types of
compressions are used: GNU\* zip (*.gz*) and XZ (*.xz*).
Table 1 lists the currently available images.
.. list-table:: Table 1: Types of Clear Linux images
:widths: 20, 60
:header-rows: 1
* - Image Type
- Description
* - azure.vhd
- Image for Microsoft\* Azure\*
* - azure-docker.vhd
- Image with Docker\* installed for Microsoft Azure
* - azure-machine-learning.vhd
- Image with the `machine-learning-basic` bundle installed for Microsoft
Azure
* - cloud.img
- Image for cloud deployment such as OpenStack\*
* - containers.img
- Optimized image used by Clear Containers runtime
* - hyperv.vhdx
- Image for Microsoft Hyper-V\*
* - hyperv-mini.vhdx
- Minimal image with fewer bundles for Microsoft Hyper-V
* - installer.img
- Interactive installer image
* - installer.iso
- ISO of the interactive installer image
* - kvm.img
- Image for booting in a simple VM with start_qemu.sh
* - live.img
- Live boot image
* - vmware.vmdk
- Image for VMware\*
.. _images: https://download.clearlinux.org/image
@@ -1,126 +1,169 @@
.. _increase-virtual-disk-size:
Increase Clear Linux image virtual disk size
############################################
Increase virtual disk size of a Clear Linux\* image
#################################################
Prebuilt |CLOSIA| images come in different sizes, ranging from 300 MB to 20
|CLOSIA| prebuilt images come in different sizes, ranging from 300 MB to 20
GB. This guide describes how to increase the size of your prebuilt |CL| image
if you need more capacity.
Determine the prebuilt image size
*********************************
.. contents:: This guide will cover:
There are two methods to find the virtual disk size of your prebuilt |CL|
image.
Determine the partition order and sizes of the prebuilt image
***************************************************
The first method is to check the config.JSON file of the image, located in the
`releases`_ repository. For example, to find the size of the Hyper-V\* image
version number 20450, follow these steps:
There are two methods to find the order and sizes of partitions virtual disk
of your prebuilt |CL| image.
#. Go to the `releases`_ repository.
#. Drill down into the `20450 > clear > config > image` directory.
#. Open the :file:`hyperv-config.json` file.
#. Locate the `PartitionLayout` key.
The example shows 512 MB for the EFI partition, 32 MB for the swap
partition, and 8 GB for the root partition.
In both examples, the prebuilt Hyper-V image has a disk size of 8.5 GB with /
dev/sda3 being the partition for the root filesystem (/)
.. code-block:: console
Checking :command:`lsblk` on the VM
-----------------------------------
"PartitionLayout" : [ { "disk" : "hyperv.img",
"partition" : 1,
"size" : "512M",
"type" : "EFI" },
{ "disk" : "hyperv.img",
"partition" : 2,
"size" : "32M",
"type" : "swap" },
{ "disk" : "hyperv.img",
"partition" : 3,
"size" : "8G",
"type" : "linux" } ],
The second method is to boot up your :abbr:`VM (Virtual Machine)` and
The first method is to boot up your :abbr:`VM (Virtual Machine)` and
execute the :command:`lsblk` command as shown below:
.. code-block:: bash
sudo lsblk
sudo lsblk
An example output:
An example output of the :command:`lsblk` command:
.. code-block:: console
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 8.5G 0 disk
├─sdd1 8:1 0 512M 0 part
├─sdd2 8:2 0 32M 0 part [SWAP]
└─sdd3 8:3 0 8G 0 part /
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 8.5G 0 disk
├─sda1 8:1 0 512M 0 part
├─sda2 8:2 0 32M 0 part [SWAP]
└─sda3 8:3 0 8G 0 part /
In this example, both methods show the prebuilt Hyper-V image is about 8.5 GB.
An example of this can also be seen in Figure 1.
Checking :file:`config.json` used to build the image
----------------------------------------------------
The second method to determine partition to check the :file:`config.json`
file used to create prebuilt image, located in the `releases`_ repository.
For example, to find the size of the Hyper-V\* image version number 20450,
follow these steps:
#. Go to the `releases`_ repository.
#. Drill down into the `20450 > clear > config > image` directory.
#. Open the :file:`hyperv-config.json` file.
#. Locate the `PartitionLayout` key.
The example shows 512 MB for the EFI partition, 32 MB for the swap
partition, and 8 GB for the root partition.
.. code-block:: console
"PartitionLayout" : [ { "disk" : "hyperv.img",
"partition" : 1,
"size" : "512M",
"type" : "EFI" },
{ "disk" : "hyperv.img",
"partition" : 2,
"size" : "32M",
"type" : "swap" },
{ "disk" : "hyperv.img",
"partition" : 3,
"size" : "8G",
"type" : "linux" } ],
Increase virtual disk size
**************************
Once you have determined the disk and partition to be increased, you are
ready to perform the actual increase of the disk, partition, and filesystem.
To increase the virtual disk size for a prebuilt image, perform the steps below:
Power off VM and increase virtual disk size:
--------------------------------------------
#. Shut down your VM if it is running.
#. Use an appropriate hypervisor tool to increase the virtual disk size of
your VM.
#. Power up the VM.
#. Log in to an account with root privileges.
#. Open a terminal emulator.
#. Add the |CL| `storage-utils` bundle to install the `parted` and
`resize2fs` tools.
To increase the virtual disk size for a prebuilt image, perform the steps
below:
.. code-block:: bash
#. Shut down your VM if it is running.
#. Use the process defined by your hypervisor
or cloud provider to increase
the virtual disk size of your |CL| VM.
#. Power up the VM.
sudo swupd bundle-add storage-utils
#. Launch the `parted` tool.
Resize the partition of the virtual disk:
-----------------------------------------
.. code-block:: bash
#. Log in to an account with root privileges.
#. Open a terminal emulator.
#. Add the |CL| `storage-utils` bundle to install the
:command:`parted` and :command:`resize2fs` tools.
sudo parted
.. code-block:: bash
#. In the `parted` tool, perform these steps:
sudo swupd bundle-add storage-utils
#. Press :command:`p` to print the partitions table.
#. If the warning message below is displayed, enter :command:`Fix`.
#. Launch the `parted` tool.
.. code-block:: console
.. code-block:: bash
Warning: Not all of the space available to /dev/sda appears to be
used, you can fix the GPT to use all of the space (an extra ...
blocks) or continue with the current setting?
sudo parted
Fix/Ignore?
#. In the `parted` tool, perform these steps:
#. Enter :command:`resizepart [partition number]` where
*[partition number]* is the partition number to modify.
#. Enter :command:`yes` when prompted.
#. Enter the new `End` size.
#. Press :command:`p` to print the partitions table.
#. If the warning message below is displayed, enter :command:`Fix`.
.. note::
.. code-block:: console
If you want a partition to take up the remaining disk space, then
enter the total size of the disk. When you print the partitions
table with the :command:`p` command, the total disk size is shown
after the `Disk` label.
Warning: Not all of the space available to /dev/sda appears to be
used, you can fix the GPT to use all of the space (an extra ...
blocks) or continue with the current setting?
#. Enter :command:`q` to exit `parted` when you are finished resizing the
image.
Fix/Ignore?
#. Enter :command:`sudo resize2fs -p /dev/[modified partition name]` where
*[modified partition name]* is the partition that was changed in `parted`.
#. Enter :command:`resizepart [partition number]` where
*[partition number]* is the partition number of the partition to modify.
#. Enter :command:`yes` when prompted.
#. Enter the new `End` size.
Figure 1 shows how to increase the size of a |CL| Hyper-V image from 8.5
GB to 20 GB. Before the steps shown in Figure 1, we used the Hyper-V Manager
to increase the VM virtual disk size from 8.5 GB to 20 GB.
.. note::
.. figure:: figures/increase-virtual-disk-size-1.png
:scale: 100 %
:alt: Increase root partition size example
If you want a partition to take up the remaining disk space, then
enter the total size of the disk. When you print the partitions
table with the :command:`p` command, the total disk size is shown
after the `Disk` label.
Figure 1: Increase root partition size example.
An example of this can be seen in Figure 1.
.. _releases: https://download.clearlinux.org/releases/
#. Enter :command:`q` to exit `parted` when you are finished resizing the
image.
Figure 1 depicts the described steps to resize the partition of the virtual disk from 8.5GB to 20GB.
.. figure:: figures/increase-virtual-disk-size-1.png
:scale: 100 %
:alt: Increase root partition size
Figure 1: Increase root partition size.
Resize the filesytem
--------------------
#. Enter :command:`sudo resize2fs -p /dev/[modified partition name]` where
*[modified partition name]* is the partition that was changed in `parted`.
#. Run the :command:`df -h` to verify that the filesystem size has
increased.
Figure 2 depicts the described steps to resize the partition of the virtual disk from 8.5GB to 20GB.
.. figure:: figures/increase-virtual-disk-size-2.png
:scale: 100 %
:alt: Increase root filesystem with resize2fs
Figure 2: Increase root filesystem size after partition has been expanded.
Congratulations! You have resized the disk, partition, and filesystem. At
this point, the increase in disk capacity is usable.
.. _releases: https://download.clearlinux.org/releases/
@@ -10,7 +10,7 @@ maintaining |CLOSIA| after :ref:`installation <get-started>` is completed.
:maxdepth: 2
enable-user-space
update
swupd-guide
bulk-provision
mixer
mixin
@@ -78,18 +78,20 @@ package.
.. code-block:: console
$ sudo mixin package add [package-name] [--build]
$ sudo mixin package add [package-name] [--bundle bundle-name] [--build]
This command will add package-name to a bundle that is named after its parent
repository. For example, if the RPM was provided locally, it will be added to
the 'local' bundle. If it came from a repo that was added with :command:`mixin
repo add` it will be added to a bundle named after the repo-name. The `--build`
flag tells :command:`mixin` to run a `mixer` build after adding the package.
the 'local' bundle. If it came from a repo that was added with
:command:`mixin repo add`, it will be added to a bundle named after the
repo-name. If the `--bundle bundle-name` flag is provided, the package will
be added to `bundle-name` instead. The `--build` flag tells :command:`mixin`
to run a `mixer` build after adding the package.
To add more than one RPM to your previously-created bundle, repeat
the :command:`mixin package add` command and change the package name. Do not add
the `--build` flag until all packages have been added. Once done adding packages
run the following to create your local mix.
the :command:`mixin package add` command and change the package name. Do not
add the `--build` flag until all packages have been added. Once done adding
packages, run the following to create your local mix.
.. code-block:: console
@@ -0,0 +1,182 @@
.. _swupd-guide:
Use swupd
#########
*swupd* manages the software update capability of |CLOSIA|. It can check for
valid system updates and, if found, download and install them. It can also
perform verification of the system software.
|CL| uses :ref:`bundles-about<bundles>` as the base abstraction for
installing functionality on top of the core operating system. Use the `swupd`
tool to install and remove bundles.
This guide assumes:
* The device is on a well-connected network.
* The device is able to connect to the release infrastructure
http://update.clearlinux.org
.. contents::
:local:
:depth: 2
.. _man_swupd:
For a full listing of commands and options please see the man page in |CL|
.. code-block:: bash
man swupd
OS update and verification
**************************
|CL| is designed to promote a regular update cadence. `swupd` helps to
make sure that process is simple and secure.
View OS info
============
Current OS version and update server info:
.. code-block:: bash
swupd info
.. code-block:: console
Installed version: 23330
Version URL: https://download.clearlinux.org/update/
Content URL: https://cdn.download.clearlinux.org/update/
Enable or disable automatic updates
===================================
|CL| updates are automatic by default starting with version 15400 but can be set to occur only
on demand. To verify your current auto-update setting:
.. code-block:: bash
sudo swupd autoupdate
Disable automatic updates:
.. code-block:: bash
sudo swupd autoupdate --disable
To re-enable automatic:
.. code-block:: bash
sudo swupd autoupdate --enable
Check for updates
=================
.. code-block:: bash
sudo swupd check-update
Perform a manual update
=======================
You can update to a specific version or accept the latest as the default with
no arguments. Initiate a manual update:
.. code-block:: bash
sudo swupd update -m 23330
.. note::
After a kernel update, reboot immediately for the enhancements to
take effect.
System Software Verification
============================
`swupd` can determine whether system directories and files have been added
to, overwritten, removed, or modified (e.g., permissions).
.. code-block:: bash
sudo swupd verify
All directories that are watched by `swupd` are verified according to
the manifest data and hash mismatches are flagged as follows:
.. code-block:: console
Verifying version 23300
Verifying files
...0%
Hash mismatch for file: /usr/bin/chardetect
...
...
Hash mismatch for file: /usr/lib/python3.6/site-packages/urllib3/util/wait.py
...100%
Inspected 237180 files
423 files did not match
Verify successful
In this case, python packages that were installed on top of the default
install were flagged as mismatched. `swupd` can be directed to ignore
or fix issues based on :ref:`command line options <man_swupd>`.
Fixing hash mismatches
======================
`swupd` can correct any issues it detects. Additional directives can be
added including a white list of directories that will be ignored, if
desired.
The following command will repair issues, remove unknown items, and
ignore files or directories matching `/usr/lib/python`:
.. code-block:: bash
sudo swupd verify --fix --picky --picky-whitelist=/usr/lib/python
Bundles
*******
Listing installed bundles
=========================
You can list all of the bundles currently installed on the system
.. code-block:: bash
sudo swupd bundle-list --all
Finding a bundle containing a binary
====================================
Run the following to display a list of bundles that contain a particular
binary. Note that it may be present in multiple bundles:
.. code-block:: bash
swupd search -b <binary you want>
Adding a bundle
===============
Start by selecting a bundle from the list of :ref:`available-bundles`. In
this example we're adding dev-utils-dev, which is useful for development.
.. code-block:: bash
sudo swupd bundle-add dev-utils-dev
Removing a bundle
=================
Dependencies common to other bundles will not be removed
.. code-block:: bash
sudo swupd bundle-remove dev-utils-dev
@@ -1,70 +0,0 @@
.. _update:
Update Clear Linux
##################
This section describes how to update |CLOSIA|.
Prerequisites
=============
* The system is up and running the Clear Linux 15400 release or later.
* The device is on a well-connected network.
* The device is able to connect to the release infrastructure
http://update.clearlinux.org
To verify the current release running on the system, enter:
.. code-block:: console
$ sudo swupd update -s
How to update the system
========================
Starting with version 15400, Clear Linux supports auto-update. By default, it
is turned on.
To verify the current auto-update setting:
.. code-block:: console
$ swupd autoupdate
To enable auto-update:
.. code-block:: console
$ sudo swupd autoupdate --enable
To disable auto-update:
.. code-block:: console
$ sudo swupd autoupdate --disable
To force a manual update:
.. code-block:: console
$ sudo swupd update
.. note::
When the swupd console output indicates a kernel update, reboot
immediately for the enhancements to take effect.
Additional information
======================
To see the man page listing additional swupd options, install the
`sysadmin-basic` bundle to access the `man` command and later access
the man page:
.. code-block:: console
$ sudo swupd bundle-add sysadmin-basic
$ man swupd
@@ -9,9 +9,11 @@ creates a chain of trust. A broken chain of trust, seen as an invalid
signature, means the content is not valid.
This guide covers how to validate the contents of an image, which is a manual
process, and describes the automatic process ``swupd`` performs internally to
process and is the same process ``swupd`` performs internally to
validate an update.
.. _image-content-validation:
Image content validation
========================
@@ -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]
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
@@ -1,6 +1,6 @@
.. _compatible-kernels:
Compatible Clear Linux kernels
Compatible Clear Linux\* kernels
##############################
The |CLOSIA| provides the following Linux kernels with a respective bundle.
@@ -19,7 +19,7 @@ Kernel Container
================
The *kernel-container* bundle contains the kernel used by the
`Intel® Clear Containers`_ project. This kernel is optimized for
Intel® Clear Containers project. This kernel is optimized for
fast booting and performs best on |CC| running on the Intel® architectures
described on the :ref:`supported hardware list<system-requirements>`.
The optimization patches are found in our `Linux-Container`_ GitHub repo.
@@ -44,11 +44,10 @@ The *kernel-kvm* bundle focuses on the Linux
:abbr:`KVM (Kernel-based Virtual Machine)`. It is optimized for fast booting
and performs best on Virtual Machines running on the Intel® architectures
described on the :ref:`supported hardware list<system-requirements>`.
Use this kernel when running |CL| as the guest OS
on top of *qemu/kvm*. Use this kernel with **cloud orchestrators** using
*qemu/kvm* internally as their **hypervisor**.
This kernel can be used as a stand alone Linux VM, see our
:ref:`instructions on using KVM<kvm>` for more information. The
Use this kernel when running |CL| as the guest OS on top of *qemu/kvm*. Use
this kernel with **cloud orchestrators** using *qemu/kvm* internally as
their **hypervisor**. This kernel can be used as a standalone |CL| VM, see
our :ref:`instructions on using KVM<kvm>` for more information. The
optimization patches are found in our `Linux-KVM`_ GitHub repo.
Kernel Hyper-V\*
@@ -59,8 +58,8 @@ Hyper-V. It is optimized for fast booting and performs best on Virtual
Machines running on the Intel® architectures described on the
:ref:`supported hardware list<system-requirements>`.
Use this kernel when running |CL| as the guest OS of **Cloud Instances** in
projects such as Microsoft `Azure`_\*. This kernel can be used as a stand
alone Linux VM, see our :ref:`instructions on using Hyper-V<hyper-v>` for
projects such as Microsoft `Azure`_\*. This kernel can be used in a
standalone |CL| VM, see our :ref:`instructions on using Hyper-V<hyper-v>` for
more information. The optimization patches are found in our `Linux-HyperV`_
GitHub repo.
@@ -73,8 +72,8 @@ is optimized for fast booting and performs best on Virtual
Machines running on the Intel® architectures described on the
:ref:`supported hardware list<system-requirements>`.
Use this kernel when running |CL| as the guest OS of **Cloud Instances** in
projects such as Microsoft `Azure`_. This kernel can be used as a stand
alone Linux VM, see our :ref:`instructions on using Hyper-V<hyper-v>` for
projects such as Microsoft `Azure`_. This kernel can be used in a standalone
|CL| VM, see our :ref:`instructions on using Hyper-V<hyper-v>` for
more information. The optimization patches are found in our
`Linux-HyperV-LTS`_ GitHub repo.
@@ -89,5 +88,4 @@ more information. The optimization patches are found in our
.. _CIAO: https://github.com/01org/ciao
.. _Azure:
https://azuremarketplace.microsoft.com/en-us/marketplace/apps/clear-linux-project.clear-linux-os
.. _Intel® Clear Containers:
https://clearlinux.org/features/intel®-clear-containers
@@ -0,0 +1,77 @@
.. _image-types:
Clear Linux\* image types
#######################
.. _image-types-content:
|CLOSIA| offers many types of `images`_ for different platforms and environments.
The naming convention of a |CL| image filename is:
.. code-block:: console
clear-[version number]-[image type].[compression type]
* The *[version number]* field specifies the version number.
* The *[image type]* field specifies the type of image and its corresponding
file format.
* The *[compression type]* field specifies the compression type. Two types of
compressions are used: GNU\* zip (*.gz*) and XZ (*.xz*).
Table 1 lists the currently available images that are platform independent.
Table 2 lists the currently available images that are platform specific.
.. list-table:: Table 1: Types of platform-independent Clear Linux images
:widths: 15, 85
:header-rows: 1
* - Image Type
- Description
* - installer.img
- Preferred image of Clear Linux with interactive installer.
* - installer.iso
- ISO of Clear Linux with interactive installer. Only for special cases where ISO image format is required (not for use with a USB key)
* - live.img
- image for live booting into memory, without requiring installaton.
.. list-table:: Table 2: Types of platform-specific Clear Linux images
:widths: 15, 85
:header-rows: 1
* - Image Type
- Description
* - azure.vhd
- Virtual Hard Disk for use on Microsoft\* Azure\* cloud platform
* - azure-docker.vhd
- Virtual Hard Disk for use on Microsoft Azure cloud platform with Docker\* pre-installed
* - azure-machine-learning.vhd
- Virtual Hard Disk for use on Microsoft Azure cloud platform with the `machine-learning-basic` bundle installed
* - cloud.img
- Image for use by cloud deployments such as OpenStack\*
* - containers.img
- Image for use by Clear Containers runtime. Includes `optimized kernel`_ for Clear Containers.
* - hyperv.vhdx
- Virtual Hard Disk for use with Microsoft Hyper-V\* hypervisor. Includes `optimized kernel`_ for Hyper-V.
* - kvm.img
- Image for booting in a simple VM with start_qemu.sh. Includes
`optimized kernel`_ for KVM.
* - vmware.vmdk
- Virtual Machine Disk for VMware\* platforms inclduing Player, Workstation, and ESXi.
.. _images: https://download.clearlinux.org/image
.. _`optimized kernel`: https://clearlinux.org/documentation/clear-linux/reference/compatible-kernels
@@ -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/
+81
View File
@@ -0,0 +1,81 @@
.. _kata:
Install Kata Containers\*
#######################
This tutorial describes how to install, configure and run Kata Containers\* on
|CLOSIA|. Kata Containers\* is an open source project and community working to
build a standard implementation of lightweight Virtual Machines (VMs) that feel
and perform like containers, but provide the workload isolation and security
advantages of VMs. Kata Containers\* is available in Clear Linux versions above 23380.
Prerequisites
*************
This tutorial assumes you have installed |CL| on your host system.
For detailed instructions on installing |CL| on a bare metal system, visit
the :ref:`bare metal installation tutorial<bare-metal-install>`.
Before you install any new packages, update |CL| with the following command:
.. code-block:: bash
sudo swupd update
Install Kata Containers\*
***********************
Kata Containers\* is included in the :file:`containers-virt` bundle. To install the
framework, enter:
.. code-block:: bash
sudo swupd bundle-add containers-virt
Configure Docker to use Kata Containers\* by default
.. code-block:: bash
sudo mkdir -p /etc/systemd/system/docker.service.d/
cat <<EOF | sudo tee /etc/systemd/system/docker.service.d/kata-containers.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -D --add-runtime kata-runtime=/usr/bin/kata-runtime --default-runtime=kata-runtime
EOF
Restart the Docker\* and Kata Containers\* systemd services
.. code-block:: bash
sudo systemctl daemon-reload
sudo systemctl restart docker
Run Kata Containers\*
*******************
.. code-block:: bash
sudo docker run -ti busybox sh
**Congratulations!**
You successfully installed and set up Kata Containers\* on |CLOSIA|.
More information about Docker\* in |CLOSIA|.
#############################################
Docker\* on |CLOSIA| provides a docker.service service file to start the Docker\*
daemon. The daemon will use runc or cc-runtime depending on the environment:
If you are running |CL| on baremetal or on a VM with Nested
Virtualization activated, Docker\* will use cc-runtime as the default runtime.
If you are running |CL| on a VM without Nested Virtualization, Docker\*
will use runc as the default runtime. It is not necessary to configure Docker\*
to use cc-runtime manually since Docker\* itself will automatically use this
runtime on systems that support it.
To check which runtime your system is using, run:
.. code-block:: bash
sudo docker info | grep runtime
@@ -12,6 +12,7 @@ specific |CLOSIA| use cases.
wordpress
flatpak/flatpak
machine-learning/machine-learning
docker/docker
azure/azure
multi-boot/multi-boot
hadoop
@@ -20,4 +21,6 @@ specific |CLOSIA| use cases.
telemetry-backend/telemetry-backend
smb/smb
spark
kata
kata_migration