Compare commits

...

29 Commits

Author SHA1 Message Date
Kevin Putnam 3cbcfeb503 Fixed two broken links found in weekly check.
Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
2019-12-20 10:49:49 -08:00
bktan8 81ea8a4e54 Add how to boot Clear via GRUB. (#909)
Add dual-boot-linux link to the multi-boot doc.
Closes #908 
Signed-off-by: Bun K Tan <bun.k.tan@intel.com>
2019-12-19 11:22:18 -08:00
Kevin Putnam f975d1dc00 Update to wifi guide to include wpa_supplicant. (#939)
* Update to wifi guide to include wpa_supplicant.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Addressed reviewer feedback.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Missed one piece of feedback.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Small changes based on testing on Clear Linux to verify the current solution.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Caught a couple small things.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Update wifi.rst

Add more context and update commands to be as executable as possible.

* Fixed a typo and a couple of formatting problems.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
2019-12-18 14:24:37 -08:00
Beth Dean e90885986f Update for DLRS V5 release (#962) 2019-12-17 21:20:01 -08:00
bktan8 7b21fb9159 Update increase-virtual-disk-size doc. (#958)
Signed-off-by: Bun K Tan <bun.k.tan@intel.com>
2019-12-16 14:46:23 -08:00
bktan8 b753e49df3 Minor fixes to DigitalOcean doc. (#959)
Signed-off-by: Bun K Tan <bun.k.tan@intel.com>
2019-12-16 09:27:24 -08:00
bktan8 edbb9286e5 Deploy Clear to DigitalOcean guide. (#952)
Closes #886 
Signed-off-by: Bun K Tan <bun.k.tan@intel.com>
2019-12-13 14:20:18 -08:00
DougTW 1b15019f03 vnc.rst: corrected figure numbering to be sequential (#944)
* vnc.rst: corrected figure numbering to be sequential, starting with Figure 5.

Signed-off-by: Doug Martin <doug.martin@intel.com>

* Fixed incorrectly numbered reference to a figure.

Signed-off-by: Doug Martin <doug.martin@intel.com>
2019-12-13 09:43:18 -08:00
extremepayne f9d976de41 Windows command sha512 -> SHA512 (#956)
* Windows command sha512 -> SHA512

The command fails (on my computer) unless the hash algorithm is passed as uppercase.
As per: https://answers.microsoft.com/en-us/windows/forum/all/certutil-hashfile-sha1-failed/1a9f31fa-bdf5-4c63-8e72-91608606ba14

* trigger CI
2019-12-13 09:38:08 -08:00
michael vincerra cdaa36e279 Add improved role descriptions and bundles to developer-workstation (#947)
* Add bundle function and desc to developer-workstation.
- Closes #764

* Add more bundles relevant to each role.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Add `ltp` to kernel developer; revise AI Dev to AI/ML Engineer.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Revise bundles listed for kernel developer and add maker dev.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Removes Embedded Systems profile due to few relevant bundles.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Remove game developer per review from @ahkok.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Adds containers-virt to Computer Vis. Engineer; and reference note.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-12-12 10:42:43 -08:00
michael vincerra e2e1a2896c Replace stacks-tensorflow-mkl with stacks-dlrs-mkl per @DnPls. (#955)
Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-12-11 11:21:01 -08:00
DougTW 0a8674c530 parallels.rst: Fixes Figure caption indent Closes #896 (#942)
* Fixes Figure caption indent

Signed-off-by: Doug Martin <doug.martin@intel.com>

* parallels.rst: fixed alignment
- Removed tabs and replaced with spaces

Signed-off-by: Doug Martin <doug.martin@intel.com>
2019-12-09 11:29:53 -08:00
michael vincerra 7a4e6c6d1c Combine two VMWare guides into one: vmw-player. (#950)
* Combine VMWare guides into one, separate image types with tabs in vmw-player.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Re-arrange all figures into _figures dir and manage file dependencies.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Fix indentation error in tabs preventing successful build.
- Reorganize vmw-player-preconf figures.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Replace Figure 11; move Detach the |CL| installer ISO to Desktop tab.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Reorg figures and order of ops per forked flow, reviewer feedback.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-12-09 10:16:36 -08:00
michael vincerra 410768be7e Simplify section "Boot a live desktop image to fix..." in fix-broken-install (#951)
* Simplify section Boot a live desktop image to fix...
- Remove include per request from @bktan8
- Make concise the Prereq's

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Fix spacing syntax.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Clarify swupd scope re /var dir. Revise wording in Prereqs.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-12-05 13:33:39 -08:00
mns6070 389887026e Updated to mount the /boot partition (#946)
* Update fix-broken-install.rst
* Updates to lsblk command Ln 52 and wording on Ln 56.
2019-12-04 13:29:36 -08:00
DougTW 0aa9fad0ec dpdk.rst: Fixes Figure caption indent (see pr 896) (#945)
- This PR doesn't close pr 896 because there are multiple files to be fixed. Last PR will close pr 896.

Signed-off-by: Doug Martin <doug.martin@intel.com>
2019-12-02 23:47:14 +01:00
DougTW 96b4c58aa7 Fixes Figure caption indent (#941)
Signed-off-by: Doug Martin <doug.martin@intel.com>
2019-12-02 15:33:03 -06:00
DougTW d539c6feff dlrs.rst: Fixes Figure caption indent (see pr 896) (#943)
-This pr doesn't close pr 896 because multiple files need to be edited. Last PR will close pr 896.

Signed-off-by: Doug Martin <doug.martin@intel.com>
2019-12-02 15:30:19 -06:00
bktan8 6e3e1d9135 Troubleshooting tip on how to erase LVM partitions (#937)
* Troubleshooting tip on how to erase LVM partitions
to baremetal installation guides.

Signed-off-by: Bun K Tan <bun.k.tan@intel.com>

* Update source/get-started/bare-metal-install-server.rst
2019-11-22 13:41:09 -08:00
michael vincerra f8207916a3 Resolve rendering error in README. (#935)
* Resolve rendering error in README.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Removes hashes for steps.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Revise header level.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-11-22 10:57:14 -08:00
Kevin Putnam c98dfdad9c Fixes reference URLS that were being automatically turned into active links that don't go anywhere. (#934)
Simple fix - escape the URL by adding "\".

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
2019-11-22 10:55:18 -08:00
michael vincerra 912bb57255 Add virtualenv option for contributors in README. (#927)
Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

Revise Makefile to enable make venv target and add instructions.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

Revises README.md and root-level Makefile target `make venv`.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

Revise venv target; revise README to simplify activation/deactivation.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

Revise syntax to emph markdown rendering.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

Fix formatting errors and make consistent ref to platforms.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-11-21 16:40:49 -08:00
bktan8 8ca656b901 iPXE updated to use clr-installer. (#932)
ister and icis deprecated.

See also: https://github.com/clearlinux/clr-bundles/issues/171
Signed-off-by: Bun K Tan <bun.k.tan@intel.com>
2019-11-21 15:39:14 -08:00
Kevin Putnam 112ec79c56 Added support for sphinx-tabs and created an example on the Stacks DB reference stack guide. (#928)
Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
2019-11-21 15:05:26 -08:00
michael vincerra 9264ae8b73 Correct external GitHub link; correct syntax of internal link to building custom Docker image. (#931)
Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-11-20 14:02:13 -08:00
puneetse dbf84a7bb9 Add guide for Media Reference Stack (#929)
* Add guide for Media Reference Stack

* Correct errors in syntax and docstring refs for successful build.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Corrects docstring ref title from `tutorial-proxy` to `proxy`
- Resolves build error detected by Travis

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-11-20 11:38:42 -08:00
michael vincerra a39c15e550 Remove empty spaces and check syntax based on prev failures. (#930)
* Remove empty spaces and check syntax based on prev failures.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Removes 👍 to isolate problem.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-11-19 21:00:25 -08:00
michael vincerra 74fd2fab55 Revise bullet to clarify offline install option, bare-metal-install-desktop (#925)
* Revise bullet to clarify offline install option, bare-metal-install-desktop.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>

* Modify wording per reviewer feedback.

Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
2019-11-18 14:45:55 -08:00
michael vincerra c9134c7283 Create greetings.yml (#922)
Create a greetings message to show users who submit their first Issue or first PR to the repo.
2019-11-16 16:14:49 -08:00
106 changed files with 2671 additions and 1550 deletions
+13
View File
@@ -0,0 +1,13 @@
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Welcome to Clear Linux* OS Docs. Thanks for submitting your first issue.'
pr-message: 'Welcome to Clear Linux* OS Docs. Thanks for submitting your first PR.'
+1 -2
View File
@@ -34,7 +34,6 @@ clean:
rm -rf venv
venv:
virtualenv -p python$(PY_VERSION) venv;
virtualenv venv;\
source venv/bin/activate; \
pip3 install -r requirements.txt;
+82 -1
View File
@@ -67,6 +67,86 @@ If you want to build the documentation exactly as seen on the website, use
``make py`` followed by ``make htmlall``. This builds some
external dependencies and all supported languages.
Use virtualenv
**************
To develop documentation in a ``virtualenv``, use the ``venv`` target.
The Clear Linux OS documentation make target ``venv`` provides a
simple development environment that ensures that you have the
latest packages and that you manage Python versions separately. Use of the
``virtualenv`` requires **Python 3.6** or higher. For Windows examples below, use Powershell as an Administrator.
The **virtual environment** uses the same version of Python that was used to **create the virtual environment**.
Verify ``pip`` is installed. A file path to pip should appear.
On Clear Linux OS and macOS\*:
.. code-block:: bash
which pip
On Windows\* 10 OS:
.. code-block:: bash
pip --version
If ``pip`` is not installed, install it.
On Clear Linux OS and macOS:
.. code-block:: bash
python3 -m pip install --user --upgrade pip
On Windows 10 OS:
.. code-block:: bash
py -m pip install --upgrade pip
.. note::
This assumes Python was already added to your Windows path.
Install virtualenv
==================
Install ``virtualenv``.
On Clear Linux OS and macOS\*:
.. code-block:: bash
python3 -m pip install --user virtualenv
On Windows 10 OS:
.. code-block:: bash
py -m pip install --user virtualenv
Create the ``virtualenv`` and install the required packages:
.. code-block:: bash
make venv
Activate the ``venv``.
.. code-block:: bash
source venv/bin/activate
Follow `Run the build`_ section to start developing documentation.
Remove the ``venv`` when finished developing.
.. code-block:: bash
deactivate
Additional help
***************
@@ -80,7 +160,8 @@ build before building again by running ``make clean``:
make clean
This will completely remove the previous build output.
This will completely remove the previous build output, including artifacts
from the `make venv` target when done outside an active venv.
Convenience script
==================
+1
View File
@@ -6,3 +6,4 @@ sphinx-intl==2.0.0
sphinx-sitemap==1.0.2
Jinja2==2.10.1
GitPython==2.1.11
sphinx-tabs
Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

+18
View File
@@ -0,0 +1,18 @@
1) Capture screenshot
2) Open in GIMP 2.10
3) Select the area of interest
4) Copy the selection; take note of X, Y dimensions of the selection
5) "File" > "New"
- Add 100 extra pixels to X for the "Width"
- Add 100 extra pixels to Y for the "Height"
- Set "Fill with" to "Transparency"
6) Switch from the "Selection" tool to the "Move" tool and move the
the top-left corner of the image to 2 squares down and 2 squares across
7) Right-click the image and select "Layer" > "Anchor Layer"
8) "Filters" > "Decor" > "Light and Shadow" > "Drop Shadow"
- X = 20.0
- Y = 20.0
- Radius = 20.0
- Opacity = 0.2
Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

@@ -169,7 +169,7 @@ th,td {
margin-left: 5px;
}
.active:after {
.collapsible.active:after {
content: "\2212";
}
+1 -1
View File
@@ -34,7 +34,7 @@ import shlex
#]
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx_sitemap'
'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx_sitemap', 'sphinx_tabs.tabs'
]
# Add any paths that contain templates here, relative to this directory.
@@ -144,8 +144,9 @@ To fulfill minimum installation requirements, complete the
* Check marks indicate a selection has been made.
* An Internet connection is required. You may want to launch a browser
prior to installation to verify your Internet connection.
* The installer image contains the default bundles required for
installation. An Internet connection is only required if you install
additional bundles from `Advanced options`_.
|CL| Desktop Installer
**********************
@@ -650,6 +651,11 @@ Create partitions per requirements in Table 1.
- /
- *Size depends upon use case/desired bundles.*
Troubleshooting
***************
:ref:`erase-lvm-troubleshooting-tip`
.. _Downloads: https://clearlinux.org/downloads
@@ -942,4 +942,61 @@ entering :guilabel:`Configure Installation Media`:
- Windows\* OS: :command:`diskpart`, then :command:`list disk`
- macOS\* platform: :command:`diskutil list`
.. _erase-lvm-troubleshooting-tip:
Erase LVM Partitions Before Installing |CL|
===========================================
If youre planning to install |CL| on a drive that has LVM partitions,
you must erase them first before using clr-installer.
Here is an example of a drive (/dev/sda) with LVMs:
.. code-block:: console
:emphasize-lines: 6-9
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 627.6M 1 loop
sda 8:0 0 335.4G 0 disk
├─sda1 8:1 0 200M 0 part
├─sda2 8:2 0 1G 0 part
└─sda3 8:3 0 334.2G 0 part
├─LVM-root 252:0 0 70G 0 lvm
├─LVM-home 252:1 0 248.4G 0 lvm
└─LVM-swap 252:2 0 15.7G 0 lvm
If you do not erase the LVMs first, you will encounter a clr-installer
error like this:
.. code-block:: console
root@clr-live~ # clr-installer
Please report this crash using GitHub Issues:
https://github.com/clearlinux/clr-installer/issues
Include the following as attachments to enable diagnosis:
/root/pre-install-clr-installer.yaml
/root/clr-installer.log
You may need to remove any personal data of concern from the attachments.
The Installer will now exit.
exit status 1
Error Trace:
errors.Wrap()
errors/errors.go:91
storage.makeFs()
storage/ops.go:79
The quickest and simplest method to erasing the LVMs is to execute these
commands:
.. code-block:: bash
sudo sgdisk -Z /dev/<device>
sudo partprobe
sudo dmsetup remove_all --force
sudo partprobe
.. _Downloads: https://clearlinux.org/downloads
@@ -279,3 +279,10 @@ instance from running.
Congratulations! You are up and running with |CL| on AWS. To see what you
can do with your |CL| instance, visit our :ref:`tutorials <tutorials>`
section for examples on using your |CL| system.
Related topics
**************
* :ref:`azure`
* :ref:`gce`
* :ref:`clr-digitalocean`
@@ -519,6 +519,13 @@ For additional information visit the |CL|
To learn more about the MS Azure CLI 2.0 tool and options that are available,
visit the `MS Azure documentation and tutorials`_ website.
Related topics
**************
* :ref:`gce`
* :ref:`aws-web`
* :ref:`clr-digitalocean`
.. _`Azure Portal`:
https://portal.azure.com
@@ -0,0 +1,364 @@
.. _clr-digitalocean:
|CL-ATTR| on DigitalOcean\*
###########################
This guide explains how to import a |CL-ATTR| image to `DigitalOcean`_
and then deploy a VM instance.
.. contents::
:local:
:depth: 1
Prerequisites
*************
* Set up a DigitalOcean account.
* Create an SSH key on your client system that you will use to remote
into the VM. You can follow the `DigitalOcean's SSH key creation guide`_.
Add |CL| Image to DigitalOcean
******************************
Before you can deploy a |CL| instance on DigitalOcean, you need to add
an image since it's currently not available in its marketplace.
You can use our pre-built image or you can build your own custom image.
Use pre-built image
===================
.. note::
Our cloud images (`clear-<release version>-digitalocean.img.gz`) for
DigitalOcean are considered **Beta** until we finish setting up our
automated testing of the images against the DigitalOcean environment.
Apart from the initial version, `clear-31870-digitalocean.img.gz`_, we
cannot guarantee that future versions and updates to the initial
version is problems-free.
.. bktan8 - commented out until the images are fully validated by DevOps
and go live on official Downloads page.
Go to the |CL| `downloads` page and copy the URL for the
**Cloud Guest Legacy** image. See Figure 1.
figure:: ../../_figures/digitalocean/01-digitalocean.png
:scale: 100 %
:alt: Cloud Guest Legacy image
Figure 1: Cloud Guest Legacy image
#. Copy the URL for `clear-31870-digitalocean.img.gz`_.
#. Skip to the `Upload image`_ section.
Build custom image
==================
For this method, you need a |CL| system to generate an image using
the *clr-installer* tool.
#. Add the *clr-installer* and *gzip* bundles.
.. code-block:: bash
sudo swupd bundle-add clr-installer gzip
#. Create an image configuration YAML file.
See `Installer YAML Syntax`_ for more information on the clr-installer
configuration YAML syntax.
.. code-block:: bash
cat > clear-digitalocean.yaml << EOF
#clear-linux-config
# switch between aliases if you want to install to an actual block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "clear-digitalocean.img"}
]
targetMedia:
- name: \${bdevice}
size: "800M"
type: disk
children:
- name: \${bdevice}1
fstype: ext4
options: -O ^64bit
mountpoint: /
size: "800M"
type: part
bundles: [
bootloader,
openssh-server,
os-cloudguest,
os-core,
os-core-update,
systemd-networkd-autostart
]
autoUpdate: false
postArchive: false
postReboot: false
telemetry: false
legacyBios: true
keyboard: us
language: en_US.UTF-8
kernel: kernel-kvm
version: 0
EOF
The settings that are required in order to make the image
work on DigitalOcean are:
* *os-cloudguest* bundle: Allows DigitalOcean to provision the
image with settings such as hostname, resource (CPU, memory,
storage) sizing, and user creation.
* *legacyBios: true*: The image need to support legacy BIOS to boot
on DigitalOcean.
#. Generate the image.
.. code-block:: bash
sudo clr-installer -c clear-digitalocean.yaml
The output should be :file:`clear-digitalocean.img`.
#. Compress the image with *gzip* to save bandwidth and upload time.
.. code-block:: bash
gzip clear-digitalocean.img
The output should be :file:`clear-digitalocean.img.gz`.
.. note::
*bzip2* is the other compression format DigitalOcean accepts.
Upload image
============
#. On DigitalOcean's website, go to :menuselection:`MANAGE --> Images
--> Custom Images`.
See Figure 1.
.. figure:: ../../_figures/digitalocean/01-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Upload custom images
Figure 1: DigitalOcean - Upload custom images
#. Select an upload method.
* To import a pre-built image from |CL| `downloads`_, click
:guilabel:`Import via URL`, paste the URL, and click :guilabel:`Next`.
See Figure 2.
.. figure:: ../../_figures/digitalocean/02-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Import via URL
Figure 2: DigitalOcean - Import via URL
* To import your custom image, click :guilabel:`Upload Image`
and select the image from your client system.
#. Set the :guilabel:`DISTRIBUTION` type as :guilabel:`Unknown`.
See Figure 3.
|
#. Choose your preferred datacenter region.
#. Click :guilabel:`Upload Image`.
Wait for the upload to finish before proceeding to the next section.
.. figure:: ../../_figures/digitalocean/03-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Set image distribution type, region, tag
Figure 3: DigitalOcean - Set image distribution type, region, tag
Create and Deploy a |CL| Instance
*********************************
#. On DigitalOcean's website, go to :menuselection:`MANAGE --> Droplets`
and then click :guilabel:`Create Droplet`.
See Figure 4.
.. figure:: ../../_figures/digitalocean/04-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Create Droplet
Figure 4: DigitalOcean - Create Droplet
#. Under :guilabel:`Choose an image`, select :guilabel:`Custom images`.
See Figure 5.
|
#. Select your uploaded |CL| image.
.. figure:: ../../_figures/digitalocean/05-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Choose custom image
Figure 5: DigitalOcean - Choose custom image
#. Under :guilabel:`Choose a plan`, select your preferred plan.
See Figure 6.
.. figure:: ../../_figures/digitalocean/06-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Choose plan
Figure 6: DigitalOcean - Choose plan
#. Under :guilabel:`Choose a datacenter region`, select the region you
want the instance deployed to.
See Figure 7.
.. figure:: ../../_figures/digitalocean/07-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Choose datacenter region
Figure 7: DigitalOcean - Choose datacenter region
#. Assign SSH key to default *clear* user.
By default, the user *clear* will be added to the instance and
an SSH key must be assigned to this account.
a. Under :guilabel:`Authentication`, select :guilabel:`SSH keys` and
click :guilabel:`New SSH Key`.
See Figure 8.
.. figure:: ../../_figures/digitalocean/08-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Add SSH key
Figure 8: DigitalOcean - Add SSH key
#. Copy and paste your SSH public key in the :guilabel:`SSH key content`
text field.
See Figure 9.
|
#. Give a name for the SSH key.
#. Click :guilabel:`Add SSH Key`.
.. figure:: ../../_figures/digitalocean/09-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Add public SSH key
Figure 9: DigitalOcean - Add public SSH key
.. note::
If you need to add additional users to the instance, you can do that
wth a YAML-formatted *cloud-config* user data script.
For more information on cloud-config scripting for |CL|, see our
subset implementation of cloud-init called `micro-config-drive`_.
a. Under :guilabel:`Select additional options`,
select :guilabel:`User data`.
#. Add your YAML-formatted *cloud-config* user data in the field below.
Here is a simple example:
.. code-block:: console
#cloud-config
users:
- name: foobar
gecos: Foo B. Bar
homedir: /home/foobar
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC65OihS4UP27xKOpqKWgT9
mgUNwEqhUEpTGGvopjT65Y/KU9Wfj6EYsdGzbHHcMUhFSTxAUAV4POH5d0LR
MzI7sXMe528eCmpm2fTOHDDkVrurP/Jr2bjB9IrfSMkBYS8uRd603xNg/RDq
EH3XzVeEDdEAxoej0mzsJ2UkQSBi+PD1J7JeCbX2lsb55x2yWzaUa+BTai7+
/TU4UabTRDtFTiXhx2rImSSguofDISVll6W5TTzbGmHdoEI+8DIAFU66ZgC9
SzL75LQi1YAWlj5XG+dXhN6Ev6KFM34odvWdxeCj0jcx5UIXcieBfOuLujEH
dVybwNLG7hxDy/67BA1j username@mydomain.com
sudo:
- [ "ALL=(ALL) NOPASSWD:ALL" ]
#. Under :guilabel:`Finalize and create`:
a. Set the number of instances you want to deploy.
#. Set the hostname for the instance.
See Figure 10.
|
#. Click :guilabel:`Create Droplet` to deploy the instance.
.. figure:: ../../_figures/digitalocean/10-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Finalize and create Droplet
Figure 10: DigitalOcean - Finalize and create Droplet
Connect to Your |CL| Instance
*****************************
#. On DigitalOcean's website, go to :menuselection:`MANAGE --> Droplets`.
See Figure 11.
|
#. Get the IP address of your |CL| instance.
.. figure:: ../../_figures/digitalocean/11-digitalocean.png
:scale: 100 %
:alt: DigitalOcean - Get Droplet IP address
Figure 11: DigitalOcean - Get Droplet IP address
#. On your client system, SSH into your instance.
For example:
.. code-block:: bash
ssh clear@<IP-address-of-instance> -i <SSH-private-key>
Related topics
**************
* :ref:`gce`
* :ref:`azure`
* :ref:`aws-web`
.. _clear-31870-digitalocean.img.gz: https://cdn.download.clearlinux.org/releases/31870/clear/clear-31870-digitalocean.img.gz
.. _DigitalOcean: https://www.digitalocean.com/
.. _DigitalOcean's SSH key creation guide: https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/create-with-openssh/
.. _downloads: https://clearlinux.org/downloads
.. _Installer YAML Syntax:
https://github.com/clearlinux/clr-installer/blob/master/scripts/InstallerYAMLSyntax.md
.. _micro-config-drive: https://github.com/clearlinux/micro-config-drive
+1 -1
View File
@@ -260,7 +260,7 @@ Related topics
* :ref:`azure`
* :ref:`aws-web`
* :ref:`clr-digitalocean`
.. _Google Cloud Platform: https://cloud.google.com/
+1
View File
@@ -35,6 +35,7 @@ Install
bare-metal-install-desktop
bare-metal-install-server
install-configfile
ipxe-install
.. _virtual-machine-install:
+580
View File
@@ -0,0 +1,580 @@
.. _ipxe-install:
Install |CL| Over the Network with iPXE
#######################################
PXE :abbr:`PXE (Pre-boot Execution Environment)` is an industry standard
that describes client-server interaction with network-boot software and
uses the DHCP and TFTP protocols. iPXE, a fork of gPXE, is an open-source
version of PXE. It enables computers without built-in PXE capability to
network-boot using protocols such as HTTP, :abbr:`iSCSI (Internet Small
Computer Systems Interface)`, :abbr:`AoE (ATA over Ethernet\*)`, and
:abbr:`FCoE (Fiber Channel over Ethernet\*)`.
This guide demonstrates how to setup an iPXE server to install |CL-ATTR|
over the network.
Figure 1 depicts the flow of information between an iPXE server and a
PXE client.
.. figure:: ../_figures/ipxe/ipxe-install-1.png
:alt: PXE information flow
Figure 1: PXE information flow
.. caution::
The |CL| PXE image that boots through the iPXE process automatically
erases all data and partitions on the PXE client system and performs
a fresh installation according to a clr-installer YAML configuration
file.
Prerequisites
*************
Your iPXE server must have:
* Ethernet/LAN boot option
* At least two network adapters
* Connection to a public (WAN) network
* Secure Boot option disabled in BIOS
Your clients must have:
* Ethernet/LAN boot option
* One network adapter
* Secure Boot option disabled in BIOS
* The minimum requirements to run |CL|. Review the :ref:`compatibility-check`.
Connect the iPXE server and clients to a network switch on a private
(LAN) network, as shown in Figure 2.
.. figure:: ../_figures/ipxe/ipxe-install-2.png
:alt: Network topology
Figure 2: Network topology
Install |CL| on server
**********************
#. Install |CL| on the system that will serve as the iPXE server.
We recommend using the `server` version.
#. Open a terminal window.
#. Add the :command:`pxe-server` bundle to your |CL| system.
The bundle contains all the necessary apps (web server, iPXE firmwares,
dnsmasq which provides TFTP, DNS, DHCP functionalities) to run an
iPXE server.
.. code-block:: bash
sudo swupd bundle-add pxe-server
#. Define the following variables used for setting up the iPXE server.
Be sure to substitute the value for the WAN_INTERFACE and
LAN_INTERFACE variables with your LAN and WAN interfaces names.
Use :command:`ip a` to list your network devices and get their
names.
.. code-block:: bash
IPXE_APP_NAME=ipxe
IPXE_PORT=50000
WEB_ROOT_DIR=/var/www
IPXE_ROOT_DIR=${WEB_ROOT_DIR}/${IPXE_APP_NAME}
TFTP_ROOT_DIR=/srv/tftp
CLR_INSTALLER_CONF_DIR=clr-installer-configs
WAN_INTERFACE=eno1
LAN_INTERFACE=eno2
IPXE_SUBNET=192.168.100
IPXE_LAN_IP=${IPXE_SUBNET}.1
IPXE_SUBNET_MASK_IP=255.255.255.0
IPXE_SUBNET_BITMASK=16
Setup nginx web server to host iPXE
***********************************
#. Set up an nginx web server to serve the |CL| PXE image to clients
using these steps:
.. code-block:: bash
sudo mkdir -p /etc/nginx/conf.d
sudo cp /usr/share/nginx/conf/nginx.conf.example /etc/nginx/nginx.conf
sudo tee -a /etc/nginx/conf.d/${IPXE_APP_NAME}.conf << EOF
server {
listen ${IPXE_PORT};
server_name localhost;
# directory to store ipxe
location /${IPXE_APP_NAME}/ {
root ${WEB_ROOT_DIR}/${IPXE_APP_NAME};
rewrite ^/${IPXE_APP_NAME}(/.*)$ \$1 break;
}
# directory to store clr-installer configs
location /${CLR_INSTALLER_CONF_DIR}/ {
root ${WEB_ROOT_DIR}/${CLR_INSTALLER_CONF_DIR};
rewrite ^/${CLR_INSTALLER_CONF_DIR}(/.*)$ \$1 break;
}
}
EOF
#. Set nginx to start automatically on boot and then start it.
.. code-block:: bash
sudo systemctl enable nginx
sudo systemctl start nginx
Configure iPXE
**************
#. Download the latest |CL| PXE image and extract the files into the iPXE root.
.. code-block:: bash
sudo curl -o /tmp/clear-pxe.tar.xz \
https://cdn.download.clearlinux.org/current/clear-$(curl \
https://cdn.download.clearlinux.org/latest)-pxe.tar.xz
sudo mkdir -p ${IPXE_ROOT_DIR}
sudo tar -xJf /tmp/clear-pxe.tar.xz -C ${IPXE_ROOT_DIR}
sudo ln -sf $(ls ${IPXE_ROOT_DIR} | grep 'org.clearlinux.*') ${IPXE_ROOT_DIR}/linux
.. note::
Ensure that the initial ramdisk file is named :file:`initrd` and
the kernel file is named :file:`linux`, which is a symbolic link to the
actual kernel file.
#. Create an iPXE boot script. The script presents a menu of bootable images to
download, boot, and install |CL|, according to a designated clr-installer
YAML configuration file.
.. code-block:: bash
sudo tee -a ${IPXE_ROOT_DIR}/ipxe_boot_script.ipxe << EOF
#!ipxe
set menu-timeout 5000
set submenu-timeout \${menu-timeout}
isset \${menu-default} || set menu-default clr-server
:menu
menu Select a version of Clear Linux OS to install
item clr-desktop Clear Linux OS (Desktop)
item clr-server Clear Linux OS (Server)
item ipxe-shell iPXE Shell
item reboot Reboot
choose --timeout \${menu-timeout} --default \${menu-default} selected || goto cancel
set menu-timeout 0
goto \${selected}
:clr-desktop
echo Booting and installing Clear Linux OS (Desktop)...
kernel linux quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug \\
tsc=reliable no_timer_check noreplace-smp rw initrd=initrd \\
clri.descriptor=http://${IPXE_LAN_IP}:${IPXE_PORT}/${CLR_INSTALLER_CONF_DIR}/clr-desktop.yaml
initrd initrd
boot || goto failed
:clr-server
echo Booting and installing Clear Linux OS (Server)...
kernel linux quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug \\
tsc=reliable no_timer_check noreplace-smp rw initrd=initrd \\
clri.descriptor=http://${IPXE_LAN_IP}:${IPXE_PORT}/${CLR_INSTALLER_CONF_DIR}/clr-server.yaml
initrd initrd
boot || goto failed
:cancel
echo Menu canceled, going to iPXE shell
:ipxe-shell
echo Type 'exit' to return to the menu
shell
set menu-timeout 0
set submenu-timeout 0
goto menu
echo Booting
:failed
echo Booting failed, going to iPXE shell
goto shell
:reboot
echo Rebooting...
sleep 1
reboot
EOF
.. note::
The `clri.discriptor` option tells clr-installer where to download a YAML
configuration file to use. Without this option, the |CL| PXE image will
simply boot and not perform any installation.
Add clr-installer YAML configuration files
******************************************
After the |CL| PXE image boot, clr-installer downloads the YAML configuration file
specified in the kernel command-line and installs accordingly.
See `Installer YAML Syntax`_ for more information on clr-installer configuration
YAML syntax.
#. Create the directory to store the configuration files.
.. code-block:: bash
sudo mkdir -p ${WEB_ROOT_DIR}/${CLR_INSTALLER_CONF_DIR}
#. Create this sample `Desktop` configuration called :file:`clr-desktop.yaml`.
.. code-block:: bash
sudo tee -a ${WEB_ROOT_DIR}/${CLR_INSTALLER_CONF_DIR}/clr-desktop.yaml << EOF
#clear-linux-config
# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "/dev/sda"}
]
targetMedia:
- name: \${bdevice}
type: disk
children:
- name: \${bdevice}1
fstype: vfat
mountpoint: /boot
size: "150M"
type: part
- name: \${bdevice}2
fstype: swap
size: "250M"
type: part
- name: \${bdevice}3
fstype: ext4
mountpoint: /
size: "0" # Use remaining disk space
type: part
bundles: [ bootloader, os-core, os-core-update, desktop-autostart, libreoffice,
vlc, c-basic, git, openssh-server, vim ]
autoUpdate: true
postArchive: false
postReboot: true
telemetry: false
hostname: clrlinux-desktop
keyboard: us
language: en_US.UTF-8
kernel: kernel-native
users:
- login: clrlinux
username: Clear Linux
# Password is "clear123"
password: \$6\$SJJMfnInWQg.CvMA\$m2F8dJGj71zvi9mSNMktHMsPH3qhBm8pgXDNdaBe2yFfgi479JXvEqWkvQ6OxIUgGNQ5YXFIF0tCn.hEXB90G/
admin: true
- login: root
username: Root Root
# Password is "clear123"
password: \$6\$SJJMfnInWQg.CvMA\$m2F8dJGj71zvi9mSNMktHMsPH3qhBm8pgXDNdaBe2yFfgi479JXvEqWkvQ6OxIUgGNQ5YXFIF0tCn.hEXB90G/
admin: true
pre-install: [
{cmd: "curl -o /tmp/add-issue.sh http://${IPXE_LAN_IP}:${IPXE_PORT}/${CLR_INSTALLER_CONF_DIR}/add-issue.sh"},
{cmd: "chmod +x /tmp/add-issue.sh"}
]
post-install: [
{cmd: "echo PermitRootLogin yes > \${chrootDir}/etc/ssh/sshd_config"},
{cmd: "/tmp/add-issue.sh \${chrootDir}"}
]
EOF
#. Create this sample `Server` configuration called :file:`clr-server.yaml`.
.. code-block:: bash
sudo tee -a ${WEB_ROOT_DIR}/${CLR_INSTALLER_CONF_DIR}/clr-server.yaml << EOF
#clear-linux-config
# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "/dev/sda"}
]
targetMedia:
- name: \${bdevice}
type: disk
children:
- name: \${bdevice}1
fstype: vfat
mountpoint: /boot
size: "150M"
type: part
- name: \${bdevice}2
fstype: swap
size: "250M"
type: part
- name: \${bdevice}3
fstype: ext4
mountpoint: /
size: "0" # Use remaining disk space
type: part
bundles: [ bootloader, os-core, os-core-update, vim ]
autoUpdate: true
postArchive: false
postReboot: true
telemetry: false
hostname: clrlinux-server
keyboard: us
language: en_US.UTF-8
kernel: kernel-native
users:
- login: clrlinux
username: Clear Linux
# Password is "clear123"
password: \$6\$SJJMfnInWQg.CvMA\$m2F8dJGj71zvi9mSNMktHMsPH3qhBm8pgXDNdaBe2yFfgi479JXvEqWkvQ6OxIUgGNQ5YXFIF0tCn.hEXB90G/
admin: true
- login: root
username: Root Root
# Password is "clear123"
password: \$6\$SJJMfnInWQg.CvMA\$m2F8dJGj71zvi9mSNMktHMsPH3qhBm8pgXDNdaBe2yFfgi479JXvEqWkvQ6OxIUgGNQ5YXFIF0tCn.hEXB90G/
admin: true
pre-install: [
{cmd: "curl -o /tmp/add-issue.sh http://${IPXE_LAN_IP}:${IPXE_PORT}/${CLR_INSTALLER_CONF_DIR}/add-issue.sh"},
{cmd: "chmod +x /tmp/add-issue.sh"}
]
post-install: [
{cmd: "echo PermitRootLogin yes > \${chrootDir}/etc/ssh/sshd_config"},
{cmd: "/tmp/add-issue.sh \${chrootDir}"}
]
EOF
#. Add following content to the :file:`add-issue.sh` script, which will be
used by the above two YAML configuration files:
.. code-block:: bash
sudo tee -a ${WEB_ROOT_DIR}/${CLR_INSTALLER_CONF_DIR}/add-issue.sh << EOF
#!/bin/bash
echo "Creating custom issue file for \$1"
echo "Welcome to the Clear Linux* OS
* Documentation: https://clearlinux.org/documentation
* Community Support: https://community.clearlinux.org
" >> \$1/etc/issue
exit 0
EOF
Configure network
*****************
#. The DNS server, included with the `pxe-server` bundle,
conflicts with the DNS stub listener provided in `systemd-resolved`.
Disable the DNS stub listener and temporarily stop `systemd-resolved`.
.. code-block:: bash
sudo mkdir -p /etc/systemd
sudo tee -a /etc/systemd/resolved.conf << EOF
[Resolve]
DNSStubListener=no
EOF
sudo systemctl stop systemd-resolved
#. Disable NetworkManager. The base installation of |CL| comes with two
network managers, systemd-networkd and NetworkManager, with the latter
being the default. systemd-networkd is recommended for a server use case,
so we will disable NetworkManager.
.. code-block:: bash
sudo systemctl mask --now NetworkManager
#. Assign a static IP address to the LAN side network adapter
and restart `systemd-networkd`.
.. code-block:: bash
sudo mkdir -p /etc/systemd/network
sudo tee -a /etc/systemd/network/70-internal-static.network << EOF
[Match]
Name=${LAN_INTERFACE}
[Network]
DHCP=no
Address=${IPXE_LAN_IP}/${IPXE_SUBNET_BITMASK}
EOF
sudo systemctl enable systemd-networkd
sudo systemctl restart systemd-networkd
Setup NAT
*********
#. Configure :abbr:`NAT (Network Address Translation)` to route traffic from
the LAN to the WAN network so clients can download upstream bundles for
installation. And to make these changes persistent during reboots, save the
changes to the firewall.
.. code-block:: bash
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o ${WAN_INTERFACE} -j MASQUERADE
sudo systemctl enable iptables-save.service
sudo systemctl restart iptables-save.service
sudo systemctl enable iptables-restore.service
sudo systemctl restart iptables-restore.service
#. Configure the kernel to forward network packets to different interfaces.
Otherwise, NAT will not work.
.. code-block:: bash
sudo mkdir -p /etc/sysctl.d
sudo tee -a /etc/sysctl.d/80-nat-forwarding.conf << EOF
net.ipv4.ip_forward=1
EOF
sudo tee -a /proc/sys/net/ipv4/ip_forward << EOF
1
EOF
Setup dnsmaq for DHCP, DNS, and TFTP functionalities
****************************************************
#. Create a configuration file for `dnsmasq` to listen on a dedicated IP address
for TFTP, DNS, and DHCP functions. PXE clients on the LAN network will talk to
this IP address.
.. code-block:: bash
sudo tee -a /etc/dnsmasq.conf << EOF
listen-address=${IPXE_LAN_IP}
EOF
#. Add the options to serve iPXE firmware images to clients over TFTP to
the :file:`dnsmasq` configuration file.
.. code-block:: bash
sudo tee -a /etc/dnsmasq.conf << EOF
enable-tftp
tftp-root=${TFTP_ROOT_DIR}
EOF
#. Add the options to host a DHCP server for clients to the :file:`dnsmasq`
configuration file.
.. code-block:: bash
sudo tee -a /etc/dnsmasq.conf << EOF
dhcp-leasefile=/var/db/dnsmasq.leases
dhcp-authoritative
dhcp-option=option:router,${IPXE_LAN_IP}
dhcp-option=option:dns-server,${IPXE_LAN_IP}
dhcp-match=set:ipxeclient,60,IPXEClient*
dhcp-range=tag:ipxeclient,${IPXE_SUBNET}.2,${IPXE_SUBNET}.253,${IPXE_SUBNET_MASK_IP},15m
dhcp-range=tag:!ipxeclient,${IPXE_SUBNET}.2,${IPXE_SUBNET}.253,${IPXE_SUBNET_MASK_IP},6h
dhcp-match=set:ipxeboot,175
dhcp-boot=tag:ipxeboot,http://${IPXE_LAN_IP}:${IPXE_PORT}/${IPXE_APP_NAME}/ipxe_boot_script.ipxe
dhcp-boot=tag:!ipxeboot,undionly.kpxe,${IPXE_LAN_IP}
EOF
The configuration provides the following important functions:
* Directs clients without an iPXE implementation to the TFTP server
to acquire architecture-specific iPXE firmware images that allow them
to perform an iPXE boot.
* Activates only on the network adapter that has an IP address on the
defined subnet.
* Directs clients to the DNS server.
* Directs clients to the iPXE server for routing via NAT.
* Divides the private network into two pools of IP addresses. One pool
is for network boot and one pool is used after boot. Each pool has
their own lease times.
#. Create a file for `dnsmasq` to record the IP addresses it provides
to clients.
.. code-block:: bash
sudo mkdir -p /var/db
sudo touch /var/db/dnsmasq.leases
#. Create a TFTP hosting directory and populate it with the iPXE firmware.
.. code-block:: bash
sudo mkdir -p ${TFTP_ROOT_DIR}
sudo ln -sf /usr/share/ipxe/undionly.kpxe ${TFTP_ROOT_DIR}/undionly.kpxe
#. Start `dnsmasq` and enable startup on boot.
.. code-block:: bash
sudo systemctl daemon-reload
sudo systemctl enable dnsmasq
sudo systemctl restart dnsmasq
#. Start `systemd-resolved`.
.. code-block:: bash
sudo systemctl start systemd-resolved
.. note::
`systemd-resolved` dynamically updates the list of DNS servers for the
LAN network if you use the `dnsmasq` DNS server. The setup creates a
pass-through DNS server that relies on the DNS servers listed in
:file:`/etc/resolv.conf`.
Verify setup
************
Verify you can access these URLs before deploying:
* \http://{$IPXE_LAN_IP}:{$IPXE_PORT}/${IPXE_APP_NAME}/ipxe_boot_script.ipxe
* \http://{$IPXE_LAN_IP}:{$IPXE_PORT}/${CLR_INSTALLER_CONF_DIR}/clr-desktop.yaml
* \http://{$IPXE_LAN_IP}:{$IPXE_PORT}/${CLR_INSTALLER_CONF_DIR}/clr-server.yaml
* \http://{$IPXE_LAN_IP}:{$IPXE_PORT}/${CLR_INSTALLER_CONF_DIR}/add-issue.sh
Deploy
******
#. Connect your client system to the LAN network.
#. Power on the client.
#. Set your client to network boot. It should get an IP address and download
the iPXE script.
#. When presented with the iPXE menu, select one of the options. The client
will then download and boot the |CL| image. Once booted, clr-installer will
download the assigned YAML configuration file and begin to install |CL|.
After installation, the client will reboot to |CL|.
.. _iPXE:
http://ipxe.org/
.. _Installer YAML Syntax:
https://github.com/clearlinux/clr-installer/blob/master/scripts/InstallerYAMLSyntax.md
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

@@ -61,7 +61,7 @@ Create and configure new VM
:scale: 100%
:alt: Hyper-V Manager from the Start menu
Figure 1: Hyper-V Manager from the Start menu
Figure 1: Hyper-V Manager from the Start menu
#. Create a *New Virtual Machine* by clicking the :guilabel:`Action` menu,
@@ -71,7 +71,7 @@ Create and configure new VM
:scale: 100%
:alt: New Virtual Machine in Hyper-V Manager
Figure 2: New Virtual Machine in Hyper-V Manager
Figure 2: New Virtual Machine in Hyper-V Manager
#. Follow the *New Virtual Machine Wizard* to create a new virtual machine
specifying the options below:
@@ -102,7 +102,7 @@ Create and configure new VM
:scale: 100%
:alt: |CL| VM Settings in Hyper-V Manager
Figure 3: |CL| VM Settings page after configuration
Figure 3: |CL| VM Settings page after configuration
#. Click :guilabel:`Apply` at the bottom of the VM Settings screen.
@@ -3,8 +3,7 @@
|CL-ATTR| on Parallels\* Desktop for Mac\*
##########################################
This page explains how to run |CL| Server in :abbr:`CLI (command-line interface)`
mode as a guest OS in Parallels Desktop 14 for Mac.
This page explains how to run |CL| Server in :abbr:`CLI (command-line interface)` mode as a guest OS in Parallels Desktop 14 for Mac.
Parallels Desktop for Mac is virtualization software that allows other
operating systems, such as Linux, to run side-by-side with macOS\*.
@@ -28,7 +27,7 @@ Download ISO image
.. code-block:: bash
gunzip clear-30140-live-server.iso.xz
gunzip clear-30140-live-server.iso.xz
Initialize new VM
*****************
@@ -43,43 +42,43 @@ following steps.
:guilabel:`Continue`. (See Figure 1.)
.. figure:: /_figures/parallels/parallels-01.png
:alt: Parallels opening dialog
:alt: Parallels opening dialog
Figure 1: Parallels opening dialog
Figure 1: Parallels opening dialog
#. On the next screen, select :guilabel:`Image File`, then click
:guilabel:`Select a file...` as shown in Figure 2.
.. figure:: /_figures/parallels/parallels-02.png
:alt: Dialog to select source for VM
:alt: Dialog to select source for VM
Figure 2: Dialog to select source for VM
Figure 2: Dialog to select source for VM
#. Select your ISO file. The system displays the warning message "Unable to
detect operating system", as shown in Figure 3. This message is expected and
can be ignored. Click :guilabel:`Continue`.
.. figure:: /_figures/parallels/parallels-03.png
:alt: Warning that OS is not detected
:alt: Warning that OS is not detected
Figure 3: Warning that OS is not detected
Figure 3: Warning that OS is not detected
#. You are prompted to select your OS, as shown in Figure 4. Select
:menuselection:`More Linux > Other Linux` from the drop-down menu and click
:guilabel:`Continue`.
.. figure:: /_figures/parallels/parallels-04.png
:alt: Select OS from drop-down menu
:alt: Select OS from drop-down menu
Figure 4: Select OS from drop-down menu
Figure 4: Select OS from drop-down menu
#. Name your VM and check :guilabel:`Customize settings before installation`.
(See Figure 5.)
.. figure:: /_figures/parallels/parallels-05.png
:alt: Name and Location screen
:alt: Name and Location screen
Figure 5: Name and Location screen
Figure 5: Name and Location screen
#. Click :guilabel:`Create`. The Configuration window for the new VM opens, as
shown in Figure 6.
@@ -87,18 +86,18 @@ following steps.
Select :menuselection:`Hardware > Boot Order`.
.. figure:: /_figures/parallels/parallels-06.png
:alt: VM Configuration window
:alt: VM Configuration window
Figure 6: VM Configuration window
Figure 6: VM Configuration window
#. Expand :guilabel:`Advanced Settings`. Set :guilabel:`BIOS` to “EFI 64-bit”
and in the :guilabel:`Boot flags` field, enter “vm.bios.efi=1” as shown in
Figure 7.
.. figure:: /_figures/parallels/parallels-07.png
:alt: Advanced configuration settings
:alt: Advanced configuration settings
Figure 7: Advanced configuration settings
Figure 7: Advanced configuration settings
#. Close the Configuration window and click :guilabel:`Continue`.
@@ -115,18 +114,18 @@ Install |CL| on VM
instructions.
.. figure:: /_figures/parallels/parallels-08.png
:alt: On screen instructions from text-based installer
:alt: On screen instructions from text-based installer
Figure 8: On screen instructions from text-based installer
Figure 8: On screen instructions from text-based installer
#. After installation, reboot the VM. You are prompted to log in, as shown
in Figure 9. Log in with the credentials you used when you installed |CL|
on the VM.
.. figure:: /_figures/parallels/parallels-09.png
:alt: Log in prompt
:alt: Log in prompt
Figure 9: Log in prompt
Figure 9: Log in prompt
Congratulations! You have successfully set up a |CL| VM using Parallels
@@ -1,308 +0,0 @@
.. _vmw-player-preconf:
|CL-ATTR| on VMware\* Workstation Player (pre-configured image)
###############################################################
This page explains how to deploy a pre-configured |CL| VMware image on
`VMware Workstation 14 Player`_.
.. contents::
:local:
:depth: 1
Overview
********
VMware Workstation 14 Player is a type 2 hypervisor. For example, it runs on
top of Windows\* or Linux\* operating system. With VMware ESXi, you
can create, configure, manage, and run |CL-ATTR|
:abbr:`VMs (Virtual Machines)` on your local system.
.. note::
Screenshots in this document show VMware Workstation 14 Player for
Windows. Menus and prompts in the Linux version have minor wording
differences.
Install the VMware Workstation Player hypervisor
************************************************
#. Enable :abbr:`Intel® VT (Intel® Virtualization Technology)` and
:abbr:`Intel® VT-d (Intel® Virtualization Technology for Directed I/O)` in
your system's BIOS.
#. `VMware Workstation 14 Player`_ is available for Windows and Linux.
Download your preferred version.
#. Depending on which OS you're running, install it by following one of these
instructions:
* On supported Linux distros:
#. Enable a GUI desktop.
#. Start a terminal emulator.
#. Start the installer by issuing the command below and following the
guided steps.
.. code-block:: bash
sudo sh ./VMware-Player-[version number].x86_64.bundle
* On Windows:
#. Start the installer.
#. Follow the setup wizard.
For additional help, see the `VMware Workstation Player Documentation`_.
Download the latest |CL| VMware image
*************************************
Get the latest |CL| VMware image from the `image repository`_.
Look for :file:`clear-[version number]-vmware.vmdk.xz`. You can also use
this command:
.. code-block:: bash
curl -O https://cdn.download.clearlinux.org/image/$(curl https://cdn.download.clearlinux.org/image/latest-images | grep vmware)
Decompress and verify the image
*******************************
Visit :ref:`download-verify-decompress` and follow the instructions for your
Windows\* or Linux\* environment. Visit :ref:`image-types` for additional
information about all available |CL| images.
Create and configure a new VM
*****************************
#. Start the `VMware Workstation Player` app.
#. On the home screen, click :guilabel:`Create a New Virtual Machine`. See
figure 1.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-01.png
:scale: 100%
:alt: VMware Workstation 14 Player - Create a new virtual machine
Figure 1: VMware Workstation 14 Player - Create a new virtual machine
#. On the :guilabel:`Welcome to the New Virtual Machine Wizard` screen,
select the :guilabel:`I will install the operating system later` option.
See figure 2.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-02.png
:scale: 100%
:alt: VMware Workstation 14 Player - Select install operating system
Figure 2: VMware Workstation 14 Player - Select install operating
system later.
#. Click the :guilabel:`Next` button.
#. On the :guilabel:`Select a Guest Operating System` screen, set the
:guilabel:`Guest operating system` setting to :guilabel:`Linux`.
See figure 3.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-03.png
:scale: 100%
:alt: VMware Workstation 14 Player - Select guest operating system type
Figure 3: VMware Workstation 14 Player - Select guest operating system
type
#. Set :guilabel:`Version` setting to
:guilabel:`Other Linux 3.x or later kernel 64-bit`.
#. Click the :guilabel:`Next` button.
#. On the :guilabel:`Name the Virtual Machine` screen, give your new VM a
name. See figure 4.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-04.png
:scale: 100%
:alt: VMware Workstation 14 Player - Name virtual machine
Figure 4: VMware Workstation 14 Player - Name virtual machine
#. Click the :guilabel:`Next` button.
#. On the :guilabel:`Specify Disk Capacity` screen, click
the :guilabel:`Next` button. Keep the default disk settings unchanged.
When we attach the pre-configured |CL| VMware image, we will remove the
default virtual disk and replace it with the pre-configured one. See
figure 5.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-05.png
:scale: 100%
:alt: VMware Workstation 14 Player - Set disk capacity
Figure 5: VMware Workstation 14 Player - Set disk capacity
#. On the :guilabel:`Ready to Create Virtual Machine` screen, click the
:guilabel:`Customize Hardware...` button. See figure 6.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-06.png
:scale: 100%
:alt: VMware Workstation 14 Player - Customize hardware
Figure 6: VMware Workstation 14 Player - Customize hardware
#. Under the :guilabel:`Device` list, select :guilabel:`Processors`. See
figure 7.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-07.png
:scale: 100%
:alt: VMware Workstation 14 Player - Set virtualization engine option
Figure 7: VMware Workstation 14 Player - Set virtualization engine
option
#. Under the :guilabel:`Virtualization engine` section,
check :guilabel:`Virtualize Intel VT-x/EPT or AMD-V/RVI`.
#. To disconnect the virtual CD/DVD (IDE) since it is not needed, under the
:guilabel:`Device` list, select :guilabel:`New CD/DVD (IDE)`. See figure 8.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-08.png
:scale: 100%
:alt: VMware Workstation 14 Player - Disconnect CD/DVD (IDE)
Figure 8: VMware Workstation 14 Player - Disconnect CD/DVD (IDE)
#. Under the :guilabel:`Device status` section, uncheck
:guilabel:`Connect at power on`.
#. Click the :guilabel:`Close` button.
#. Click the :guilabel:`Finish` button.
Attach the pre-configured |CL| VMware image
*******************************************
#. Move the downloaded and decompressed pre-configured |CL| VMware image file
:file:`clear-[version number]-basic.vmdk` to the directory where your
newly-created VM resides.
.. note::
Depending on the OS, you can typically find the VMware VM files under:
* On Linux distros: :file:`/home/username/vmware`
* On Windows: :file:`C:\Users\username\Documents\Virtual Machines`
#. On the :guilabel:`VMware Workstation Player` home screen, select your
newly-created VM. See figure 9.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-09.png
:scale: 100%
:alt: VMware Workstation 14 Player - Edit virtual machine settings
Figure 9: VMware Workstation 14 Player - Edit virtual machine settings
#. Click :guilabel:`Edit virtual machine settings`.
#. To remove the default hard disk, under the :guilabel:`Device` list, select
:guilabel:`Hard Disk (SCSI)`. See figure 10.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-10.png
:scale: 100%
:alt: VMware Workstation 14 Player - Remove hard drive
Figure 10: VMware Workstation 14 Player - Remove hard drive
#. Click the :guilabel:`Remove` button.
#. To add a new hard disk and attach the pre-configured |CL| VMware image,
click the :guilabel:`Add...` button. See Figure 11.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-11.png
:scale: 100%
:alt: VMware Workstation 14 Player - Add new hard drive
Figure 11: VMware Workstation 14 Player - Add new hard drive
#. Under the :guilabel:`Hardware types` section, select :guilabel:`Hard Disk`.
#. Click the :guilabel:`Next` button.
#. Select your preferred :guilabel:`Virtual disk type`. See figure 12.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-12.png
:scale: 100%
:alt: VMware Workstation 14 Player - Select virtual disk type
Figure 12: VMware Workstation 14 Player - Select virtual disk type
#. Select the :guilabel:`Use an existing virtual disk` option. See figure 13.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-13.png
:scale: 100%
:alt: VMware Workstation 14 Player - Use existing virtual disk
Figure 13: VMware Workstation 14 Player - Use existing virtual disk
#. Click the :guilabel:`Browse` button and select the pre-configured |CL|
VMware image file. See figure 14.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-14.png
:scale: 100%
:alt: VMware Workstation 14 Player - Select ready-made VMware |CL|
Figure 14: VMware Workstation 14 Player - Select ready-made VMware |CL|
image file
#. Click the :guilabel:`Finish` button.
.. note::
When asked to convert the existing virtual disk to a newer format,
selecting either option works.
Enable UEFI boot support
************************
|CL| needs UEFI support to boot. To enable it, add the
following line to the end of your VM's :file:`.vmx` file:
.. code-block:: console
firmware = "efi"
.. note::
Depending on the OS, you can typically find the VMware VM files under:
* On Linux distros: :file:`/home/username/vmware`
* On Windows: :file:`C:\\Users\\username\\Documents\\Virtual Machines`
Power on the VM
***************
After configuring the settings above, power on your |CL| virtual machine.
#. On the :guilabel:`VMware Workstation Player` home screen, select your
VM. See figure 15.
.. figure:: figures/vmw-player-preconf/vmw-player-preconf-15.png
:scale: 100%
:alt: VMware Workstation 14 Player - Power on virtual machine
Figure 15: VMware Workstation 14 Player - Power on virtual machine
#. Click :guilabel:`Play virtual machine`.
Related topics
**************
For other guides on using the VMWare Player and ESXi, see:
* :ref:`vmw-player`
* :ref:`vmware-esxi-install-cl`
* :ref:`vmware-esxi-preconfigured-cl-image`
.. _image repository: https://cdn.download.clearlinux.org/image/
.. _VMware ESXi: https://www.vmware.com/products/esxi-and-esx.html
.. _VMware Workstation 14 Player: https://www.vmware.com/products/workstation-player.html
.. _VMware Workstation Player Documentation: https://docs.vmware.com/en/VMware-Workstation-Player/index.html
@@ -3,8 +3,7 @@
|CL-ATTR| on VMware\* Workstation Player
########################################
This page explains how to create a new VM and install |CL| on it with the
VMware Workstation Player hypervisor.
This page explains how to create a new VMware Workstation Player hypervisor and use one of two images: the |CL| Desktop installer iso, or the |CL| Pre-configured VMWare image.
.. contents::
:local:
@@ -14,9 +13,9 @@ Overview
********
`VMware Workstation Player`_ is a type 2 hypervisor. It runs on top of
Windows\* or Linux\* operating systems. With VMware Workstation Player, you can
create, configure, manage, and run |CL-ATTR| :abbr:`VMs (Virtual Machines)`
on your local system.
Windows\* or Linux\* operating systems. With VMware Workstation Player,
you can create, configure, manage, and run |CL-ATTR|
:abbr:`VMs (Virtual Machines)` on your local system.
VMware offers a type 1 hypervisor called `VMware ESXi`_ designed for the
cloud environment. For information on how to install |CL| as guest OS on
@@ -26,10 +25,8 @@ it, see :ref:`vmware-esxi-install-cl`.
The screenshots on this document show the Windows version of the
VMware Workstation 15 Player. The menus and prompts are similar to those
in other versions and for the Linux OS save some minor wording differences.
If you prefer to use a pre-configured |CL| VMware image instead,
see our :ref:`vmw-player-preconf` guide.
in other versions and for the Linux OS save some minor wording
differences.
Install the VMware Workstation Player hypervisor
************************************************
@@ -46,8 +43,8 @@ Install the VMware Workstation Player hypervisor
By default, selecting download means you receive the latest version
of this application. Commands may differ based on the version.
#. Install VMware Workstation Player following the instructions
appropriate for your system's OS:
#. Install VMware Workstation Player by following the instructions
appropriate for your system OS:
* On supported Linux distros:
@@ -67,43 +64,28 @@ Install the VMware Workstation Player hypervisor
For additional help, see the `VMware Workstation Player Documentation`_.
Download the latest |CL| installer
**********************************
Get the latest installer with |CL| OS Desktop from the `downloads`_ page.
Visit :ref:`image-types` for additional information about all available |CL| images.
We also provide instructions for downloading and verifying a Clear Linux ISO.
For more information, refer to :ref:`download-verify-decompress`.
Create and configure a new VM
*****************************
#. Start the `VMware Workstation Player` app.
#. Start the ``VMware Workstation Player`` app.
#. On the home screen, click :guilabel:`Create a New Virtual Machine`. See
Figure 1.
.. figure:: figures/vmw-player/vmw-player-01.png
.. figure:: /_figures/vmw-player/vmw-player-01.png
:scale: 100%
:alt: VMware Workstation Player - Create a new virtual machine
Figure 1: VMware Workstation Player - Create a new virtual
machine
#. On the :guilabel:`Welcome to the New Virtual Machine Wizard` screen,
select the :guilabel:`Installer disc image file (iso)` option.
See Figure 2.
#. Select :guilabel:`I will install the operating system later`.
.. figure:: figures/vmw-player/vmw-player-02.png
.. figure:: /_figures/vmw-player/vmw-player-02.png
:scale: 100%
:alt: VMware Workstation Player - Select |CL| installer ISO
:alt: I will install the operating system later.
Figure 2: VMware Workstation Player - Select |CL| installer ISO
#. Click the :guilabel:`Browse` button and select the decompressed |CL|
installer ISO.
Figure 2: I will install the operating system later.
#. Click the :guilabel:`Next` button.
@@ -111,7 +93,7 @@ Create and configure a new VM
:guilabel:`Guest operating system` setting to :guilabel:`Linux`. See
Figure 3.
.. figure:: figures/vmw-player/vmw-player-03.png
.. figure:: /_figures/vmw-player/vmw-player-03.png
:scale: 100%
:alt: VMware Workstation Player - Select guest operating system type
@@ -119,14 +101,14 @@ Create and configure a new VM
type
#. Set the :guilabel:`Version` setting to
:guilabel:`Other Linux 4.x or later kernel 64-bit`.
:guilabel:`Other Linux 5.x or later kernel 64-bit`.
#. Click the :guilabel:`Next` button.
#. On the :guilabel:`Name the Virtual Machine` screen, name the new VM. See
Figure 4.
.. figure:: figures/vmw-player/vmw-player-04.png
.. figure:: /_figures/vmw-player/vmw-player-04.png
:scale: 100%
:alt: VMware Workstation Player - Name virtual machine
@@ -137,7 +119,7 @@ Create and configure a new VM
#. On the :guilabel:`Specify Disk Capacity` screen, set the VM's maximum disk
size. See Figure 5.
.. figure:: figures/vmw-player/vmw-player-05.png
.. figure:: /_figures/vmw-player/vmw-player-05.png
:scale: 100%
:alt: VMware Workstation Player - Set disk capacity
@@ -153,7 +135,7 @@ Create and configure a new VM
#. On the :guilabel:`Ready to Create Virtual Machine` screen, click the
:guilabel:`Customize Hardware...` button. See Figure 6.
.. figure:: figures/vmw-player/vmw-player-06.png
.. figure:: /_figures/vmw-player/vmw-player-06.png
:scale: 100%
:alt: VMware Workstation Player - Customize hardware
@@ -161,13 +143,14 @@ Create and configure a new VM
#. Select :guilabel:`Memory` and set the size to 2GB. See Figure 7.
.. figure:: figures/vmw-player/vmw-player-07.png
.. figure:: /_figures/vmw-player/vmw-player-07.png
:scale: 100%
:alt: VMware Workstation Player - Set memory size
Figure 7: VMware Workstation Player - Set memory size
.. note::
The |CL| installer ISO needs a minimum of 2GB of RAM.
After completing installation, |CL| can run on as little as
128MB of RAM. Thus, you can reduce the memory size if needed.
@@ -176,13 +159,16 @@ Create and configure a new VM
#. Under the :guilabel:`Device` list, select :guilabel:`Processors`. See
Figure 8.
.. figure:: figures/vmw-player/vmw-player-08.png
.. figure:: /_figures/vmw-player/vmw-player-08.png
:scale: 100%
:alt: VMware Workstation Player - Set virtualization engine option
Figure 8: VMware Workstation Player - Set virtualization engine
option
#. Under :guilabel:`Processors` and :guilabel:`Number of processor cores`,
enter 4.
#. Under the :guilabel:`Virtualization engine` section,
check :guilabel:`Virtualize Intel VT-x/EPT or AMD-V/RVI`.
@@ -197,7 +183,7 @@ Enable UEFI boot support
#. Power off the VM. click the :guilabel:`Player` menu. See Figure 9.
.. figure:: figures/vmw-player/vmw-player-09.png
.. figure:: /_figures/vmw-player/vmw-player-09.png
:scale: 100%
:alt: VMware Workstation Player - Power off virtual machine
@@ -205,7 +191,7 @@ Enable UEFI boot support
#. Go to :guilabel:`Power` and select :guilabel:`Shut Down Guest`.
#. Add the following line to the end of your VM's :file:`.vmx` file:
#. Add the following line to the end of your VM's :file:`.vmx` file.
.. code-block:: console
@@ -218,43 +204,164 @@ Enable UEFI boot support
* On Linux distros: :file:`/home/username/vmware`
* On Windows: :file:`C:\\Users\\username\\Documents\\Virtual Machines`
Download the latest |CL| image
******************************
Download the appropriate image per the tab below. We also provide
additional information about :ref:`image-types` and instructions on how to
:ref:`download-verify-decompress`.
Attach the appropriate image
============================
.. tabs::
.. tab:: |CL| Desktop
This option provides a live-desktop iso installer.
#. Navigate to the `downloads`_ page and download the |CL| Desktop.
After the download is complete, you will attach this image.
#. On the :guilabel:`VMware Workstation 15 Player`, right-click the
new VM, created in `Create and configure a new VM`_.
#. From the pop-up menu, select :guilabel:`Settings`.
#. From :guilabel:`Virtual Machine settings`,
under :guilabel:`Hardware`, select ``CD/DVD``.
#. Under :guilabel:`Connection` at right, select
:guilabel:`Use ISO image file`.
#. Click :guilabel:`Browse` and select the decompressed
|CL| installer ISO. See Figure 10.
.. figure:: /_figures/vmw-player/vmw-player-10.png
:scale: 100%
:alt: VMware Workstation Player - Select |CL| installer ISO
Figure 10: VMware Workstation Player - Select |CL| installer
ISO
#. Follow the guide :ref:`install-on-target-start` to complete the
installation of |CL|.
#. After the installation completes, reboot the VM. This reboot
restarts the |CL| installer.
#. To enable the mouse pointer so you access VMware Workstation
Player's menus, press :kbd:`<CTRL>` + :kbd:`<ALT>` on the keyboard.
#. To disconnect the CD/DVD to stop it from booting the |CL|
installer ISO again, click the :guilabel:`Player` menu. See
Figure below.
.. figure:: /_figures/vmw-player/vmw-player-11.png
:scale: 100%
:alt: VMware Workstation Player - Edit CD/DVD settings
Figure 11: VMware Workstation Player - Edit CD/DVD settings
#. Go to :menuselection:`Removable Devices-->CD/DVD
(IDE)-->Disconnect`.
#. Click the :guilabel:`OK` button.
#. Continue below.
.. tab:: |CL| Pre-configured VMWare image
#. Navigate to the `downloads`_ page and select the ``VMware``
image. Look for :file:`clear-[version number]-vmware.vmdk.xz`.
#. Move the downloaded and decompressed pre-configured |CL| VMware
image file :file:`clear-[version number]-basic.vmdk` to the
directory where your newly-created VM resides.
.. note::
Depending on the OS, you can typically find the VMware VM
files under:
* Linux distros :file:`/home/username/vmware`
* Windows :file:`C:\Users\username\Documents\Virtual Machines`
#. On the :guilabel:`VMware Workstation 15 Player`, right-click the
new VM, created in `Create and configure a new VM`_.
#. From the pop-up menu, select :guilabel:`Settings`.
#. Under :guilabel:`Hardware` and :guilabel:`Device` list, select
:guilabel:`Hard Disk (SCSI)`. See figure 12.
.. figure:: /_figures/vmw-player/vmw-player-preconf-12.png
:scale: 100%
:alt: VMware Workstation Player - Remove hard drive
Figure 12: VMware Workstation Player - Remove hard drive
#. Click the :guilabel:`Remove` button.
#. To add a new hard disk and attach the pre-configured |CL|
VMware image, click the :guilabel:`Add` button. See Figure 13.
.. figure:: /_figures/vmw-player/vmw-player-preconf-13.png
:scale: 100%
:alt: VMware Workstation Player - Add new hard drive
Figure 13: VMware Workstation Player - Add new hard drive
#. Under the :guilabel:`Hardware types` section, select
:guilabel:`Hard Disk`.
#. Click the :guilabel:`Next` button.
#. Select your preferred :guilabel:`Virtual disk type`.
See figure 14.
.. figure:: /_figures/vmw-player/vmw-player-preconf-14.png
:scale: 100%
:alt: VMware Workstation Player - Select virtual disk type
Figure 14: VMware Workstation Player - Select virtual disk type
#. Select the :guilabel:`Use an existing virtual disk` option.
See figure 15.
.. figure:: /_figures/vmw-player/vmw-player-preconf-15.png
:scale: 100%
:alt: VMware Workstation Player - Use existing virtual disk
Figure 15: VMware Workstation Player - Use existing virtual disk
#. Click the :guilabel:`Browse` button and select the
pre-configured |CL| VMware image file. See figure 16.
.. figure:: ../../_figures/vmw-player/vmw-player-preconf-16.png
:scale: 100%
:alt: VMware Workstation Player - Select ready-made VMware |CL|
Figure 16: VMware Workstation Player - Select ready-made VMware |CL| image file
#. Click the :guilabel:`Finish` button.
.. note::
When asked to convert the existing virtual disk to a newer format, selecting either option works.
Install |CL| into the new VM
****************************
#. Select the newly-created VM and click the :guilabel:`Play virtual machine`
button. See Figure 10.
button. See Figure below.
.. figure:: figures/vmw-player/vmw-player-10.png
.. figure:: /_figures/vmw-player/vmw-player-17.png
:scale: 100%
:alt: VMware Workstation Player - Power on virtual machine
Figure 10: VMware Workstation Player - Power on virtual machine
#. Follow the :ref:`install-on-target-start` guide to complete the
installation of |CL|.
#. After the installation completes, reboot the VM. This reboot restarts the
|CL| installer.
Detach the |CL| installer ISO from the VM
*****************************************
#. To enable the mouse pointer so you access VMware Workstation Player's
menus, press :kbd:`<CTRL>` + :kbd:`<ALT>` on the keyboard.
#. To disconnect the CD/DVD to stop it from booting the |CL| installer ISO
again, click the :guilabel:`Player` menu. See Figure 11.
.. figure:: figures/vmw-player/vmw-player-11.png
:scale: 100%
:alt: VMware Workstation Player - Edit CD/DVD settings
Figure 11: VMware Workstation Player - Edit CD/DVD settings
#. Go to :menuselection:`Removable Devices-->CD/DVD (IDE)-->Disconnect`.
#. Click the :guilabel:`OK` button.
Figure 17: VMware Workstation Player - Power on virtual machine
Install open-vm-tools
*********************
@@ -262,8 +369,9 @@ Optional: You may want to install the `open-vm-tools` in your virtual
machine. The Open Virtual Machine Tools (open-vm-tools) are the open source
implementation of VMware Tools for Linux\* guest operating systems.
#. Power on your |CL| virtual machine. On the
:guilabel:`VMware Workstation Player` home screen, select your VM. See Figure 10.
#. Power on your |CL| virtual machine. On the
:guilabel:`VMware Workstation Player` home screen, select your VM.
See Figure 10.
#. Click :guilabel:`Play virtual machine`.
@@ -282,9 +390,7 @@ Related topics
For other guides on using the VMWare Player and ESXi, see:
* :ref:`vmw-player-preconf`
* :ref:`vmware-esxi-install-cl`
* :ref:`vmware-esxi-preconfigured-cl-image`
.. _VMware ESXi: https://www.vmware.com/products/esxi-and-esx.html
@@ -21,13 +21,9 @@ Manually installing |CL| on a new VM gives additional configuration flexibility
during installation. For example: alternate disk sizes, number of partitions,
pre-installed bundles, etc.
If you prefer to use a pre-configured |CL| VMware image instead, refer to
:ref:`vmware-esxi-preconfigured-cl-image`.
.. note::
VMware also offers a type 2 hypervisor designed for the desktop environment,
called `VMware Workstation Player`_. Refer to :ref:`vmw-player-preconf` or
VMware also offers a type 2 hypervisor designed for the desktop environment, called `VMware Workstation Player`_. Refer to
:ref:`vmw-player` for more information.
Visit :ref:`image-types` to learn more about all available images.
@@ -277,12 +273,6 @@ After configuring the settings above, power on the VM.
Figure 16: VMware ESXi - Navigator > Virtual Machines > Power on VM
Related topics
**************
* :ref:`vmware-esxi-preconfigured-cl-image`
.. _VMware ESXi: https://www.vmware.com/products/esxi-and-esx.html
.. _VMware Workstation Player: https://www.vmware.com/products/workstation-player.html
.. _image: https://cdn.download.clearlinux.org/image/
@@ -1,288 +0,0 @@
.. _vmware-esxi-preconfigured-cl-image:
|CL-ATTR| on VMware\* ESXi (pre-configured image)
#################################################
This page explains how to deploy a pre-configured |CL| VMware
:abbr:`VM (Virtual Machine)` image on a VMware ESXi 6.5 host.
.. contents::
:local:
:depth: 1
Overview
********
`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 |CL-ATTR| virtual machines at scale.
We provide a pre-configured |CL| VMware image that can be run on a VMware ESXi
6.5 host.
If manual installation is preferred, refer to :ref:`vmware-esxi-install-cl`.
.. note::
VMware also offers a type 2 hypervisor designed for the desktop environment,
called `VMware Workstation Player`_. Refer to :ref:`vmw-player-preconf` or
:ref:`vmw-player` for more information.
Download the latest |CL| VMware image
*************************************
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:
.. code-block:: bash
curl -O https://cdn.download.clearlinux.org/image/$(curl https://cdn.download.clearlinux.org/image/latest-images | grep vmware)
Visit :ref:`image-types` for additional information about all available |CL| images.
We also provide instructions for downloading and verifying a Clear Linux ISO.
For more information, refer to :ref:`download-verify-decompress`.
Upload the |CL| image to the VMware server
******************************************
Once the |CL| VMware prebuilt image has been downloaded and
decompressed on your local system, it must be uploaded to a datastore
on the VMware ESXi server.
The steps in this section can also be referenced from the VMware documentation
`Using Datastore File Browser in the VMware Host Client`_.
#. 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.
.. 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.
.. 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 decompressed |CL| VMware image file
:file:`clear-[version number]-vmware.vmdk` and upload it.
Convert the |CL| image to an ESXi-supported format
**************************************************
Once the |CL| VMware prebuilt image has been uploaded to the VMware ESXi
datastore, it must be converted to a format for use with VMware's ESXi
hypervisor.
The steps in this section can also be referenced from the VMware documentation on `Cloning and converting virtual machine disks with vmkfstools`_
#. 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 following the
steps described in `Enable the Secure Shell (SSH) in the VMware Host Client`_.
As a security best practice, remember to disable SSH access after following the steps in this section.
#. 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
*****************************
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.
#. In the right window, click the :guilabel:`Create / Register VM` button.
.. 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:
#. Select the :guilabel:`Create a new virtual machine` option. See
Figure 5.
#. 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 5: VMware ESXi - Create a new virtual machine
#. 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:`Compatibility` 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:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-6.png
:scale: 100 %
:alt: VMware ESXi - Give a name and select guest OS type
Figure 6: VMware ESXi - Give a name and select guest OS type
#. On the :guilabel:`Select storage` step:
#. Accept the default option.
#. Click the :guilabel:`Next` button.
#. On the :guilabel:`Customize settings` step:
#. 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:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-7.png
:scale: 100 %
:alt: VMware ESXi - Enable hardware virtualization
Figure 7: 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:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-8.png
:scale: 100 %
:alt: VMware ESXi - Remove hard drive
Figure 8: VMware ESXi - Remove hard drive
#. Since a pre-configured 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:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-9.png
:scale: 100 %
:alt: VMware ESXi - Disconnect the CD/DVD drive
Figure 9: VMware ESXi - Disconnect the CD/DVD drive
#. Attach the :file:`clear-[version number]-esxi.vmdk` file that was
converted from the pre-configured |CL| VMware image.
#. Click the :guilabel:`Add hard disk` button and select the
:guilabel:`Existing hard drive` option. See Figure 10.
.. figure:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-10.png
:scale: 100 %
:alt: VMware ESXi - Add an existing hard drive
Figure 10: 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:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-11.png
:scale: 100 %
:alt: VMware ESXi - Select the converted `vmdk` file
Figure 11: VMware ESXi - Select the converted
:file:`clear-[version number]-esxi.vmdk` file
#. |CL| needs UEFI support in order to boot. Enable UEFI boot support.
#. 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:: figures/vmware-esxi/vmware-esxi-preconfigured-cl-image-12.png
:scale: 100 %
:alt: VMware ESXi - Set boot firmware to EFI
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 |CL|
*****************************
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.
.. 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
Related topics
**************
* :ref:`vmware-esxi-install-cl`
.. _VMware ESXi: https://www.vmware.com/products/esxi-and-esx.html
.. _Using Datastore File Browser in the VMware Host Client: 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/
.. _Cloning and converting virtual machine disks with vmkfstools: https://kb.vmware.com/kb/1028042
.. _Enable the Secure Shell (SSH) in the VMware Host Client: https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.html.hostclient.doc/GUID-B649CB74-832F-467B-B6A4-8BA67AD5C1F0.html
.. _VMware Workstation Player: https://www.vmware.com/products/workstation-player.html
.. _image: https://cdn.download.clearlinux.org/image/
-1
View File
@@ -86,7 +86,6 @@ Related topics
**************
* :ref:`mixer`
* :ref:`bulk-provision`
.. _ister.py: https://github.com/bryteise/ister
.. _Current release: https://cdn.download.clearlinux.org/current/
@@ -1,172 +0,0 @@
.. _bulk-provision:
Bulk provision
##############
This guide explains how to perform a bulk provision of |CL-ATTR| using a
combination of the |CL| installer, Ister, and
:abbr:`ICIS (Ister Cloud Init Service)`.
.. contents::
:local:
:depth: 1
Overview
********
To configure a bulk provision:
* Define Ister configuration files to customize the installation process
* Define cloud-init\* files to customize the installation instance
* Host the configuration files in ICIS to allow Ister to use them during
the installation
Figure 1 depicts the flow of information between a PXE server and a PXE
client that needs to be set up to perform a bulk provision.
.. figure:: ./figures/bulk-provision-flow.png
:alt: Bulk provision information flow
Figure 1: Bulk provision information flow
Prerequisites
*************
Before performing a bulk provision, verify you have a PXE server capable
of performing network boots of |CL|. Please refer to our
:ref:`guide on how to perform an iPXE boot<ipxe-install>` using
:abbr:`NAT (network address translation)` for details.
Because a bulk provision relies on a reboot, ensure the following
preparations have been made:
* No existing disks are bootable.
* The network boot option must come immediately after the disk boot option
on any computer performing the installation.
Configuration
*************
#. Install ICIS by following the getting started guide on the
`ICIS`_ GitHub\* repository.
#. Create an Ister installation file and save it to the
:file:`static/ister` directory within the web hosting directory for
ICIS. The installation file is a JSON block and provides Ister
with the steps it needs to perform an installation. The file outlines
what partitions, file systems, and mount points Ister should set
up. Lastly, the file outlines which bundles to install. See our
:ref:`bundles` document for the list of available bundles. The
following example shows the contents of an Ister installation file:
.. code-block:: json
{
"DestinationType":"physical",
"PartitionLayout":[
{"disk":"sda", "partition":1, "size":"512M", "type":"EFI"},
{"disk":"sda", "partition":2, "size":"512M", "type":"swap"},
{"disk":"sda", "partition":3, "size":"rest", "type":"linux"}
],
"FilesystemTypes":[
{"disk":"sda", "partition":1, "type":"vfat"},
{"disk":"sda", "partition":2, "type":"swap"},
{"disk":"sda", "partition":3, "type":"ext4"}
],
"PartitionMountPoints":[
{"disk":"sda", "partition":1, "mount":"/boot"},
{"disk":"sda", "partition":3, "mount":"/"}
],
"Version":"latest",
"Bundles":[
"kernel-native",
"os-core",
"os-core-update",
"os-cloudguest"
],
"IsterCloudInitSvc":"http://192.168.1.1:60000/icis/"
}
.. important::
Every Ister installation file hosted on ICIS must contain the
the `IsterCloudInitSvc` parameter as well as the :command:`os-cloudguest`
bundle. These entries allow Ister to customize an instance of of an
install.
#. Create an Ister configuration file to define the location of the
Ister installation file. Save it to the :file:`static/ister` directory
within the web hosting directory of ICIS. The following example shows
an Ister configuration file:
.. code-block:: none
template=http://192.168.1.1:60000/icis/static/ister/ister.json
#. Modify the iPXE boot script by adding a kernel parameter to the command line
for booting the network image. Add the kernel parameter `isterconf` with
the location of the Ister configuration file hosted on ICIS as the
kernel parameter value. The following example shows an iPXE boot script
with the `isterconf` parameter:
.. code-block:: none
#!ipxe
kernel linux quiet init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable no_timer_check noreplace-smp rw initrd=initrd isterconf=http://192.168.1.1:60000/icis/static/ister/ister.conf
initrd initrd
boot
.. note::
After the network image of |CL| boots, Ister inspects the
parameters used during boot in :file:`/proc/cmdline` to find the
location of the Ister configuration file.
#. Write a cloud-init document to customize the instance of the installation
according to your requirements. The `cloud-init`_ documentation provides a
guide on how to write a cloud-init document. The guide covers the
customization options provided by cloud-init after an installation.
#. Save the cloud-init document to the :file:`static/roles` directory within
the web hosting directory for ICIS with the name of a role you would
like to create. For example, a role may be "database", "web", or "ciao".
#. After creating the roles, also known as cloud-init files, assign roles to
MAC addresses of PXE clients. To do so, modify the :file:`config.txt` file
in the :file:`static` directory within the web hosting directory of ICIS.
The following example shows an example assignment:
.. code-block:: none
# MAC address,role
00:01:02:03:04:05,ciao
If MAC addresses of PXE clients are not listed within the
:file:`config.txt` file, a default role for those MAC address may be
defined as follows:
.. code-block:: none
# MAC address,role
default,ciao
#. Verify the following URLs are accessible on your local network:
* \http://192.168.1.1:60000/icis/static/ister/ister.conf
* \http://192.168.1.1:60000/icis/static/ister/ister.json
* \http://192.168.1.1:60000/icis/get_config/<MAC address>
* \http://192.168.1.1:60000/icis/get_role/<role>
* \http://192.168.1.1:60000/ipxe/ipxe_boot_script.txt
#. Power on the PXE client and watch it boot and install |CL|.
#. Power-cycle the PXE client and watch it customize the |CL| installation.
**Congratulations!** You have successfully performed a bulk provision of |CL|.
.. _ICIS:
https://github.com/clearlinux/ister-cloud-init-svc
.. _cloud-init:
https://cloudinit.readthedocs.io
@@ -221,7 +221,7 @@ through the *os-cloudguest* bundles which allow you to configure many Day 1
tasks such as setting hostname, creating users, or placing
SSH keys in an automated way at boot. For more information on
automating configuration during deployment of |CL| endpoints see the
:ref:`bulk-provision` guide.
:ref:`ipxe-install` guide.
A configuration management tool is useful for maintaining consistent system
and application-level configuration. Ansible\* is offered through the
@@ -252,4 +252,4 @@ challenges your monitoring systems, and business continuity plans.
server for this purpose, however implementation details are not in the
scope of this document. In general, they should be close to your
endpoints, highly available, and easy to scale with a load balancer when
necessary.
necessary.
@@ -17,67 +17,183 @@ other Linux\* distributions.
Workstation Setup
*****************
After installing the minimum set of bundles required to get started, you can add
more bundles relevant to your specific use case.
After installing the minimum set of bundles required to get started, you can
add more bundles relevant to your specific use case.
To run any process required for |CL| development, you can add the large bundle
:ref:`*os-clr-on-clr* <enable-user-space>`. However, given how many packages this
bundle contains, you may want to deploy a leaner OS with only bundles relevant to
your project.
To run any process required for |CL| development, you can add the large
bundle :ref:`*os-clr-on-clr* <enable-user-space>`. However, you may want to deploy a leaner OS with only bundles relevant to your project.
Use Table 1, *Developer Profiles*, to identify the *minimum
required bundles* to get started developing based on your role or project.
While your role may not neatly fit in one of these categories, consider
Table 1 as a starting point.
Use the **Developer Profiles** tabs to start installing *suggested bundles*
based on your role or project. Installing any ``dkms`` bundle gives all the
tools you need to start. Consider these profiles as a starting point.
.. list-table:: **Table 1. Developer Profiles**
:widths: 20, 20, 20, 20
:header-rows: 1
.. tip::
Click on a bundle to learn how to install it using :command:`swupd`.
* - |CL| Bundle
- *Internet of Things (IoT)*
- *System Administrator*
- *Client/Cloud/Web Developer*
.. tabs::
* - :command:`editors`
-
-
-
.. tab:: AI/ML Engineer
* - :command:`network-basic`
-
-
-
.. list-table::
:widths: 50, 50
:header-rows: 1
* - :command:`openssh-server`
-
-
-
* - Function
- Bundle
* - :command:`webserver-basic`
-
-
-
* - Build machine learning applications with a full suite of libraries.
- `machine-learning-basic <https://clearlinux.org/software/bundle/machine-learning-basic/>`_
* - :command:`application-server`
-
-
-
* - Build machine learning applications with PyTorch, an optimized tensor library for deep learning.
- `machine-learning-pytorch <https://clearlinux.org/software/bundle/machine-learning-pytorch/>`_
* - :command:`database-basic`
-
-
-
* - Build machine learning applications using Tensorflow, a library for numerical computation using deep neural networks.
- `machine-learning-tensorflow <https://clearlinux.org/software/bundle/machine-learning-tensorflow/>`_
* - :command:`desktop-autostart`
-
-
-
* - Web-based, interactive tools for machine learning.
- `machine-learning-web-ui <https://clearlinux.org/software/bundle/machine-learning-web-ui/>`_
* - :command:`dev-utils`
-
-
-
* - Machine learning Docker container.
- `machine-learning <https://clearlinux.org/software/docker/machine-learning/>`_
* - Pre-built Python libraries for Data Science.
- `python-extras <https://clearlinux.org/software/bundle/python-extras>`_
* - API helper for cloud access.
- `cloud-api <https://clearlinux.org/software/bundle/cloud-api/>`_
.. tab:: Computer Vision Engineer
.. list-table::
:widths: 50, 50
:header-rows: 1
* - Function
- Bundle
* - Build computer vision applications.
- `computer-vision-basic <https://clearlinux.org/software/bundle/computer-vision-basic/>`_
* - Work with deep learning and edge-optimized models.
- `computer-vision-models <https://clearlinux.org/software/bundle/computer-vision-models/>`_
* - Basic OpenVINO™ toolkit.
- `computer-vision-openvino <https://clearlinux.org/software/bundle/computer-vision-openvino/>`_
* - API helper for cloud access.
- `cloud-api <https://clearlinux.org/software/bundle/cloud-api/>`_
* - Run container applications from Dockerhub in lightweight virtual machines.
- `containers-virt <https://clearlinux.org/software/bundle/containers-virt>`_
* - All content for pkgconfig file opencv.pc.
- `devpkg-opencv <https://clearlinux.org/software/bundle/devpkg-opencv/>`_
* - *Refer also to Cloud Orchestration Engineer*
-
.. tab:: Cloud Orchestration Engineer
.. list-table::
:widths: 50, 50
:header-rows: 1
* - Function
- Bundle
* - Contains Clear Linux\* OS native software for cloud.
- `ethtool <https://clearlinux.org/software/bundle/ethtool/>`_
* - Utilities for controlling TCP/IP networking and traffic control.
- `iproute2 <https://clearlinux.org/software/bundle/iproute2/>`_
* - API helper for cloud access.
- `cloud-api <https://clearlinux.org/software/bundle/cloud-api/>`_
* - C++ runtime support.
- `libstdcpp <https://clearlinux.org/software/bundle/libstdcpp/>`_
* - Load and enumerate PKCS#11 modules.
- `p11-kit <https://clearlinux.org/software/bundle/p11-kit/>`_
.. tab:: Kernel Developer
.. list-table::
:widths: 50, 50
:header-rows: 1
* - Function
- Bundle
* - Installs kernel, initrd, kernel config, system map; creates a bootloader entry.
- `kernel-install <https://clearlinux.org/software/bundle/kernel-install/>`_
* - Support module for building/loading via Dynamic Kernel Module System (DKMS) in LTS kernel.
- `kernel-lts-dkms <https://clearlinux.org/software/bundle/kernel-lts-dkms/>`_
* - Support module for building/loading via Dynamic Kernel Module System (DKMS) in native kernel.
- `kernel-native-dkms <https://clearlinux.org/software/bundle/kernel-native-dkms/>`_
* - Support module for building/loading via Dynamic Kernel Module System (DKMS) in AWS kernel.
- `kernel-aws-dkms <https://clearlinux.org/software/bundle/kernel-aws-dkms/>`_
* - Run the Kernel-based Virtual Machine (KVM) with |CL| as a guest under KVM.
- `kernel-kvm <https://clearlinux.org/software/bundle/kernel-kvm/>`_
* - Linux Test Project.
- `ltp <https://clearlinux.org/software/bundle/ltp/>`_
.. tab:: Maker Developer
.. list-table::
:widths: 50, 50
:header-rows: 1
* - Function
- Bundle
* - Basic tools for makers and experimenters.
- `maker-basic <https://clearlinux.org/software/bundle/maker-basic/>`_
* - GIS/Mapping tools for makers.
- `maker-gis <https://clearlinux.org/software/bundle/maker-gis/>`_
* - Electronic Design Tool.
- `Fritzing <https://clearlinux.org/software/flathub/fritzing>`_
* - Open-source electronics prototyping platform.
- `arduino-ide <https://clearlinux.org/software/flathub/arduino-ide/>`_
.. tab:: System Administrator
.. list-table::
:widths: 50, 50
:header-rows: 1
* - Function
- Bundle
* - Run popular terminal text editors.
- `editors <https://clearlinux.org/software/bundle/editors/>`_
* - Run network utilities and modify network settings.
- `network-basic <https://clearlinux.org/software/bundle/network-basic/>`_
* - Run a secure shell (SSH) server for access from remote machines.
- `openssh-server <https://clearlinux.org/software/bundle/openssh-server/>`_
* - Run a HTTP web server.
- `web-server-basic <https://clearlinux.org/software/bundle/web-server-basic>`_
* - Run an application server via HTTP.
- `application-server <https://clearlinux.org/software/bundle/application-server/>`_
* - Run an SQL database.
- `database-basic <https://clearlinux.org/software/bundle/database-basic>`_
* - Bundle to automatically launch the GUI upon boot.
- `desktop-autostart <https://clearlinux.org/software/bundle/desktop-autostart/>`_
swupd search
************
@@ -101,8 +217,8 @@ developing your project.
* :ref:`Mixer <mixer>`
* :ref:`Autospec <autospec>`
Other resources for developers
-----------------------------------
Related topics
--------------
* `Developer Tooling Framework`_ for |CL|
* `Bundle Definition Files`_
@@ -142,7 +142,7 @@ checksum file designated with the suffix `-SHA512SUMS`.
.. code-block:: bash
CertUtil -hashfile ./clear-[version number]-[image type].[compression type] sha512
CertUtil -hashfile ./clear-[version number]-[image type].[compression type] SHA512
#. Manually compare the output with the original checksum value shown in
the downloaded checksum file and make sure they match.
@@ -173,4 +173,4 @@ Image types
.. include:: ../../reference/image-types.rst
:start-after: incl-image-filename-end:
.. _image: https://clearlinux.org/downloads
.. _image: https://clearlinux.org/downloads
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

@@ -3,8 +3,7 @@
Fix a broken installation
#########################
This guide explains how to fix a broken installation of |CL-ATTR| using a live
desktop image on a USB.
This guide explains how to fix a broken installation of |CL-ATTR| using a live desktop image on a USB.
.. contents::
:local:
@@ -17,25 +16,21 @@ This guide assumes you have installed |CL| on a target system, but the OS
does not boot or function properly.
The process described in this guide can only verify and fix files that
:ref:`swupd<swupd-guide>` owns in :file:`/usr`. Files outside of this path, such
as :file:`/home/`, :file:`/etc`, :file:`/var`, etc., cannot be repaired by this
process.
:ref:`swupd<swupd-guide>` owns in :file:`/usr` and :file:`/var`. Files outside of this path, such as :file:`/home/`, :file:`/etc`, etc., cannot be repaired by this process.
Prerequisites
*************
* Download and install the live desktop image on a USB. See
:ref:`bare-metal-install-desktop` for install instructions.
* Download and burn the live desktop image on a USB.
See :ref:`bare-metal-install-desktop` for instructions.
Boot a live desktop image to fix target system
**********************************************
#. Boot the |CL| live desktop image.
.. include:: ../../get-started/bare-metal-install-desktop.rst
:start-after: install-on-target-start:
:end-before: install-on-target-end:
#. Select |CL| in the boot menu.
Mount root partition, verify, and fix
*************************************
@@ -49,11 +44,11 @@ Mount root partition, verify, and fix
.. code-block:: bash
lsblk
lsblk -o NAME,LABEL,PARTTYPE,PARTLABEL
We'll use :file:`/dev/sda3/` as the root partition example.
#. Next, mount the partition to the :file:`/mnt` folder.
#. Next, mount the root partition to the :file:`/mnt` folder.
.. code-block:: bash
@@ -1,103 +1,111 @@
.. _increase-virtual-disk-size:
Increase virtual disk size of an image
Increase Virtual Disk Size of an Image
######################################
This guide describes how to increase the disk size of your prebuilt |CL-ATTR|
image if you need more capacity.
|CL-ATTR| pre-built images come in different sizes, ranging from 300 MB to 20
GB. This guide describes how to increase the disk size of your pre-built
image if you need more capacity. We will use the :ref:`KVM image<kvm>` as
an example to demonstrate the process of increasing disk size and expanding
the last partition to take up the added space.
.. contents::
:local:
:depth: 1
Determine the partition order and sizes of the prebuilt image
*************************************************************
Determine disk size and list of partitions
******************************************
|CL| prebuilt images come in different sizes, ranging from 300 MB to 20
GB.
There are two methods to find the disk size and the list of partitions of
a pre-built |CL| image.
There are two methods to find the order and sizes of partitions virtual disk
of your prebuilt |CL| image.
Method 1: Use :command:`lsblk` on the VM
========================================
In both examples, the prebuilt Hyper-V image has a disk size of 8.5 GB with
:file:`/dev/sda3` being the partition for the root filesystem (/)
Checking :command:`lsblk` on the VM
===================================
The first method is to boot up your :abbr:`VM (Virtual Machine)` and
execute the :command:`lsblk` command as shown below:
The first method is to boot up your VM and execute the :command:`lsblk`
command as shown below:
.. code-block:: bash
sudo lsblk
lsblk
An example output of the :command:`lsblk` command:
.. code-block:: console
:emphasize-lines: 4,7
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 /
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sr0 11:0 1 1024M 0 rom
vda 254:0 0 8.6G 0 disk
├─vda1 254:1 0 510M 0 part
├─vda2 254:2 0 33M 0 part [SWAP]
└─vda3 254:3 0 8G 0 part /
An example of this can also be seen in Figure 1.
Checking :file:`config.json` used to build the image
====================================================
Method 2: Look at the image configuration YAML file
===================================================
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,
The second method to look at the image configuration YAML file that was
used to produce the image.
For example, to find the size of the KVM image version number 31880,
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.
#. Drill down into the `31880 > clear > config > image` directory.
#. Download and open the :file:`kvm.yaml` file.
#. Locate the `targetMedia` section.
The example shows a total disk size of 8.54 GB, 512 MB for the EFI
partition, 32 MB for the swap partition, and 8 GB for the root partition.
.. code-block:: console
:linenos:
:emphasize-lines: 3,9,13,18
"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" } ],
targetMedia:
- name: ${bdevice}
size: "8.54G"
type: disk
children:
- name: ${bdevice}1
fstype: vfat
mountpoint: /boot
size: "512M"
type: part
- name: ${bdevice}2
fstype: swap
size: "32M"
type: part
- name: ${bdevice}3
fstype: ext4
mountpoint: /
size: "8G"
type: part
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.
Power off VM and increase virtual disk size
===========================================
Before you can expand the last partition of your image, you must make
space available by increasing the virtual disk size. After that, you
can resize the last partition and finally resize the filesystem.
Follow these steps:
To increase the virtual disk size for a prebuilt image, perform the steps
below:
Increase virtual disk size
==========================
#. Shut down your VM if it is running.
#. Use the process defined by your hypervisor or cloud provider to increase
#. Shut down your VM.
#. Use the process defined by your hypervisor or cloud provider to increase
the virtual disk size of your |CL| VM.
#. Power up the VM.
#. Power up your VM.
Resize the last partition of the virtual disk
=============================================
Resize the partition of the virtual disk
========================================
#. Log in to an account with root privileges.
#. Open a terminal emulator.
#. Log in.
#. Open a terminal window.
#. Add the :command:`storage-utils` bundle to install the
:command:`parted` and :command:`resize2fs` tools.
@@ -105,7 +113,7 @@ Resize the partition of the virtual disk
sudo swupd bundle-add storage-utils
#. Launch the `parted` tool.
#. Launch the :command:`parted` tool.
.. code-block:: bash
@@ -113,21 +121,20 @@ Resize the partition of the virtual disk
#. In the `parted` tool, perform these steps:
#. Press :command:`p` to print the partitions table.
a. Press :command:`p` to print the partitions table.
#. If the warning message below is displayed, enter :command:`Fix`.
.. code-block:: console
Warning: Not all of the space available to :file:`/dev/sda` appears to be
used, you can fix the GPT to use all of the space (an extra ...
Warning: Not all of the space available to :file:`/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?
Fix/Ignore?
#. 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.
#. Enter :command:`resizepart <partition number>` where
*<partition number>* is the number of the partition to modify.
#. Enter the new `End` size.
.. note::
@@ -139,36 +146,37 @@ Resize the partition of the virtual disk
An example of this can be seen in Figure 1.
#. Enter :command:`q` to exit `parted` when you are finished resizing the
image.
partition.
Figure 1 depicts the described steps to resize the partition of the virtual disk from 8.5GB to 20GB.
Figure 1 depicts the described steps to resize the partition of the
virtual disk from 8.5 GB to 30 GB.
.. figure:: figures/increase-virtual-disk-size-1.png
.. rst-class:: dropshadow
.. figure:: ../../_figures/increase-virtual-disk-size/01-increase-virtual-disk-size.png
:scale: 100 %
:alt: Increase root partition size
Figure 1: Increase root partition size.
Figure 1: Increase root partition size
Resize the filesystem
=====================
#. Enter :command:`sudo resize2fs -p /dev/[modified partition name]` where
*[modified partition name]* is the partition that was changed in the `parted`
#. Enter :command:`sudo resize2fs -p /dev/<modified partition name>` where
*<modified partition name>* is the partition that was changed in the `parted`
tool.
#. Run the :command:`df -h` to verify that the filesystem size has
increased.
#. Run :command:`lsblk` 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 2 depicts the described steps to resize the filesystem of the virtual
disk from 8.5 GB to 30 GB.
.. figure:: figures/increase-virtual-disk-size-2.png
.. rst-class:: dropshadow
.. figure:: ../../_figures/increase-virtual-disk-size/02-increase-virtual-disk-size.png
:scale: 100 %
:alt: Increase root filesystem with resize2fs
Figure 2: Increase root filesystem size after partition has been expanded.
Figure 2: Increase root filesystem with :command:`resize2fs`
**Congratulations!** You have resized the disk, partition, and filesystem. At
this point, the increase in disk capacity is usable.
.. _releases: https://cdn.download.clearlinux.org/releases/
.. _releases: https://cdn.download.clearlinux.org/releases/
+1 -1
View File
@@ -171,7 +171,7 @@ cables as shown in figure 2.
.. figure:: ./figures/pyshical_net.png
Figure 2: Physical network environment
Figure 2: Physical network environment
Run l3fwd application (Platform B)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

-342
View File
@@ -1,342 +0,0 @@
.. _ipxe-install:
Install over the network with iPXE
##################################
This guide describes how to install |CL-ATTR| using :abbr:`PXE (Pre-boot
Execution Environment)` over the network.
.. contents::
:local:
:depth: 1
Overview
********
PXE is an industry standard that describes client-server interaction with
network-boot software and uses the DHCP and TFTP protocols. This guide shows one
method of using the PXE environment to install |CL|.
The PXE extension called `iPXE`_ adds support for additional protocols such as
HTTP, :abbr:`iSCSI (Internet Small Computer Systems Interface)`, :abbr:`AoE
(ATA over Ethernet\*)`, and :abbr:`FCoE (Fiber Channel over Ethernet\*)`. iPXE
enables network booting on computers with no built-in PXE support.
To install |CL| through iPXE, you must create a PXE client. Figure 1 depicts
the flow of information between a PXE server and a PXE client.
.. figure:: ./figures/network-boot-flow.png
:alt: PXE information flow
Figure 1: PXE information flow.
.. caution::
The |CL| image that boots through the PXE process automatically erases all
data and partitions on the PXE client system and creates 3 new partitions
to install onto.
Prerequisites
*************
Before booting with iPXE, make the following preparations.
Your PXE client system must meet the requirements to run |CL| and have a boot
order where the network boot option is prioritized before the disk boot
option. To determine if your PXE client system meets the minimum requirements
for |CL|, review the :ref:`compatibility-check`.
Connect the PXE server and PXE clients to a switch on a private network, as
shown in figure 2.
.. figure:: ./figures/network-boot-setup.png
:alt: Network topology
Figure 2: Network topology.
Your PXE server must have:
* Ethernet/LAN boot option.
* At least two network adapters.
* Connection to a public network.
* Secure boot option disabled.
.. note::
You must disable the secure boot option in the BIOS because the UEFI
binaries used to boot |CL| are not signed.
Configuration
*************
To set up |CL| using iPXE automatically, use the :file:`configure-ipxe.sh`
script included with :abbr:`ICIS (Ister Cloud Init Service)`. For additional
instructions on the script, refer to the guide on the `ister-cloud-init-svc`_
GitHub\* repository.
To set up |CL| manually, perform the steps below.
#. Define the variables used for iPXE boot configuration.
.. code-block:: console
ipxe_app_name=ipxe
ipxe_port=50000
web_root=/var/www
ipxe_root=$web_root/$ipxe_app_name
tftp_root=/srv/tftp
external_iface=eno1
internal_iface=eno2
pxe_subnet=192.168.1
pxe_internal_ip=$pxe_subnet.1
pxe_subnet_mask_ip=255.255.255.0
pxe_subnet_bitmask=16
#. Log in and get root privilege.
.. code-block:: bash
sudo -s
#. Add the :command:`pxe-server` bundle to your |CL| system. The bundle contains all
files needed to run a PXE server.
.. code-block:: bash
sudo swupd bundle-add pxe-server
#. Download the latest network-bootable release of |CL| and extract the
files.
.. code-block:: bash
sudo mkdir -p $ipxe_root
sudo curl -o /tmp/clear-pxe.tar.xz \
https://cdn.download.clearlinux.org/current/clear-$(curl \
https://cdn.download.clearlinux.org/latest)-pxe.tar.xz
sudo tar -xJf /tmp/clear-pxe.tar.xz -C $ipxe_root
sudo ln -sf $(ls $ipxe_root | grep 'org.clearlinux.*') $ipxe_root/linux
.. note::
Ensure that the initial ramdisk file is named :file:`initrd` and
the kernel file is named :file:`linux`, which is a symbolic link to the
actual kernel file.
#. Create an iPXE boot script with the following contents. During an iPXE
boot, the iPXE boot script directs the PXE client to download the files to
boot and install |CL|. Use the names previously given to the initial
ramdisk and kernel files.
.. code-block:: console
sudo cat > $ipxe_root/ipxe_boot_script.ipxe << EOF
#!ipxe
kernel linux quiet init=/usr/lib/systemd/systemd-bootchart \
initcall_debug tsc=reliable no_timer_check noreplace-smp rw \
initrd=initrd
initrd initrd
boot
EOF
#. The :command:`pxe-server` bundle contains a lightweight web-server known as
nginx. Create a configuration file for nginx to serve |CL| to PXE
clients with the following contents:
.. code-block:: console
sudo mkdir -p /etc/nginx/conf.d
sudo cat > /etc/nginx/conf.d/$ipxe_app_name.conf << EOF
server {
listen $ipxe_port;
server_name localhost;
location /$ipxe_app_name/ {
root $web_root;
autoindex on;
}
}
EOF
sudo cp /usr/share/nginx/conf/nginx.conf.example /etc/nginx/nginx.conf
.. note::
Create a separate nginx configuration file to serve network-bootable
images on a non-standard port number. This action saves existing nginx
configurations.
#. Start nginx and enable the startup on boot option.
.. code-block:: bash
sudo systemctl start nginx
sudo systemctl enable nginx
#. The :command:`pxe-server` bundle contains a lightweight DNS server which
conflicts with the DNS stub listener provided in `systemd-resolved`.
Disable the DNS stub listener and temporarily stop `systemd-resolved`.
.. code-block:: console
sudo mkdir -p /etc/systemd
sudo cat > /etc/systemd/resolved.conf << EOF
[Resolve]
DNSStubListener=no
EOF
sudo systemctl stop systemd-resolved
#. Assign a static IP address to the network adapter for the private network
and restart `systemd-networkd` with the following commands:
.. code-block:: console
sudo mkdir -p /etc/systemd/network
sudo cat > /etc/systemd/network/70-internal-static.network << EOF
[Match]
Name=$internal_iface
[Network]
DHCP=no
Address=$pxe_internal_ip/$pxe_subnet_bitmask
EOF
sudo systemctl restart systemd-networkd
#. Configure :abbr:`NAT (Network Address Translation)` to route traffic from
the private network to the public network. This action makes the PXE
server act as a router. To make these changes persistent during reboots, save the
changes to the firewall with the following commands:
.. code-block:: bash
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o $external_iface -j MASQUERADE
sudo systemctl enable iptables-save.service
sudo systemctl restart iptables-save.service
sudo systemctl enable iptables-restore.service
sudo systemctl restart iptables-restore.service
.. note::
The firewall masks packets to make them appear as coming from the PXE
server and hides PXE clients from the public network.
#. Configure the kernel to forward network packets to different
interfaces. Otherwise, NAT will not work.
.. code-block:: bash
sudo mkdir -p /etc/sysctl.d
sudo echo net.ipv4.ip_forward=1 > /etc/sysctl.d/80-nat-forwarding.conf
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
#. The :command:`pxe-server` bundle contains iPXE firmware images that allow computers
without an iPXE implementation to perform an iPXE boot. Create a TFTP
hosting directory and populate the directory with the iPXE firmware images
with the following commands:
.. code-block:: bash
sudo mkdir -p $tftp_root
sudo ln -sf /usr/share/ipxe/undionly.kpxe $tftp_root/undionly.kpxe
#. The :command:`pxe-server` bundle contains a lightweight TFTP, DNS, and DHCP
server known as `dnsmasq`. Create a configuration file for `dnsmasq`
to listen on a dedicated IP address for those functions. PXE clients on
the private network will use this IP address.
.. code-block:: console
sudo cat > /etc/dnsmasq.conf << EOF
listen-address=$pxe_internal_ip
EOF
#. Add the options to serve iPXE firmware images to PXE clients over TFTP to
the `dnsmasq` configuration file.
.. code-block:: console
sudo cat >> /etc/dnsmasq.conf << EOF
enable-tftp
tftp-root=$tftp_root
EOF
#. Add the options to host a DHCP server for PXE clients to the :file:`dnsmasq`
configuration file.
.. code-block:: console
sudo cat >> /etc/dnsmasq.conf << EOF
dhcp-leasefile=/var/db/dnsmasq.leases
dhcp-authoritative
dhcp-option=option:router,$pxe_internal_ip
dhcp-option=option:dns-server,$pxe_internal_ip
dhcp-match=set:pxeclient,60,PXEClient*
dhcp-range=tag:pxeclient,$pxe_subnet.2,$pxe_subnet.253,$pxe_subnet_mask_ip,15m
dhcp-range=tag:!pxeclient,$pxe_subnet.2,$pxe_subnet.253,$pxe_subnet_mask_ip,6h
dhcp-match=set:ipxeboot,175
dhcp-boot=tag:ipxeboot,http://$pxe_internal_ip:$ipxe_port/$ipxe_app_name/ipxe_boot_script.ipxe
dhcp-boot=tag:!ipxeboot,undionly.kpxe,$pxe_internal_ip
EOF
The configuration provides the following important functions:
* Directs PXE clients without an iPXE implementation to the TFTP server
to acquire architecture-specific iPXE firmware images that allow them
to perform an iPXE boot.
* Activates only on the network adapter that has an IP address on the
defined subnet.
* Directs PXE clients to the DNS server.
* Directs PXE clients to the PXE server for routing via NAT.
* Divides the private network into two pools of IP addresses. One pool
is for network boot and one pool is used after boot. Each pool has
their own lease times.
#. Create a file for `dnsmasq` to record the IP addresses it provides
to PXE clients.
.. code-block:: bash
sudo mkdir -p /var/db
sudo touch /var/db/dnsmasq.leases
#. Start `dnsmasq` and enable startup on boot.
.. code-block:: bash
sudo systemctl enable dnsmasq
sudo systemctl restart dnsmasq
#. Start `systemd-resolved`.
.. code-block:: bash
sudo systemctl start systemd-resolved
.. note::
`systemd-resolved` dynamically updates the list of DNS servers for the
private network if you use the `dnsmasq` DNS server. The setup creates a
pass-through DNS server that relies on the DNS servers listed in
:file:`/etc/resolv.conf`.
#. Power on the PXE client and watch the client boot and install |CL|.
After booting, |CL| automatically partitions the hard drive,
installs itself, updates to the latest version, and reboots.
**Congratulations!** You have successfully installed and configured a PXE
server that enables PXE clients to boot and install |CL| over the network.
.. _iPXE:
http://ipxe.org/
.. _ister-cloud-init-svc:
https://github.com/clearlinux/ister-cloud-init-svc
+10 -10
View File
@@ -567,14 +567,14 @@ truly terminate an active VNC session, follow these steps:
Encrypt VNC traffic through an SSH tunnel
*****************************************
By default, VNC traffic is not encrypted. Figure 6 shows an example warning
By default, VNC traffic is not encrypted. Figure 5 shows an example warning
from RealVNC Viewer.
.. figure:: ../../_figures/vnc/vnc-6.png
:scale: 90 %
:alt: RealVNC Viewer - Connection not encrypted warning
Figure 6: RealVNC Viewer - Connection not encrypted warning
Figure 5: RealVNC Viewer - Connection not encrypted warning
To add security, VNC traffic can be routed through an SSH tunnel. This is
accomplished by following these steps:
@@ -659,7 +659,7 @@ For Method 3:
Add the |CL| :command:`network-basic` bundle to get the :command:`netstat`
command.
Figure 7 shows two VNC sessions (5901 and 5905) accepting connections from
Figure 6 shows two VNC sessions (5901 and 5905) accepting connections from
any host as specified by the `0.0.0.0`'s. This is before the
:command:`-localhost` option was used.
@@ -667,9 +667,9 @@ any host as specified by the `0.0.0.0`'s. This is before the
:scale: 100 %
:alt: VNC session accepting connection from any host
Figure 7: VNC sessions (5901 and 5905) accepting connections from any host
Figure 6: VNC sessions (5901 and 5905) accepting connections from any host
Figure 8 shows two VNC sessions (5901 and 5905) only accepting connections from
Figure 7 shows two VNC sessions (5901 and 5905) only accepting connections from
localhost as specified by `127.0.0.1`'s. This is after the
:command:`-localhost` option was used.
@@ -677,7 +677,7 @@ localhost as specified by `127.0.0.1`'s. This is after the
:scale: 100 %
:alt: VNC session only accepting connection from localhost
Figure 8: VNC sessions (5901 and 5905) only accepting connections from localhost
Figure 7: VNC sessions (5901 and 5905) only accepting connections from localhost
Set up an SSH tunnel from your client system to your |CL| host
==============================================================
@@ -720,7 +720,7 @@ Set up an SSH tunnel from your client system to your |CL| host
:guilabel:`Host Name (or IP address)` field.
#. Set the :guilabel:`Connection type` option to :guilabel:`SSH`.
#. Configure the SSH tunnel. See Figure 9 for an example.
#. Configure the SSH tunnel. See Figure 8 for an example.
a. Under the :guilabel:`Category` section, go to
:guilabel:`Connection` > :guilabel:`SSH` > :guilabel:`Tunnels`.
@@ -738,7 +738,7 @@ Set up an SSH tunnel from your client system to your |CL| host
:scale: 100 %
:alt: Putty - configure SSH tunnel
Figure 9: Putty - configure SSH tunnel
Figure 8: Putty - configure SSH tunnel
#. Click the :guilabel:`Open` button.
#. Enter your |CL| account password (not your VNC password).
@@ -760,14 +760,14 @@ your VNC session.
**On Windows and macOS using `RealVNC`:**
#. Start the RealVNC viewer app.
#. Enter `localhost` and the fully-qualified VNC port number. See Figure 10
#. Enter `localhost` and the fully-qualified VNC port number. See Figure 9
for an example.
.. figure:: ../../_figures/vnc/vnc-10.png
:scale: 100 %
:alt: RealVNC viewer app connecting to localhost:1234
Figure 10: RealVNC viewer app connecting to `localhost:1234`
Figure 9: RealVNC viewer app connecting to `localhost:1234`
.. note::
+193 -11
View File
@@ -3,23 +3,29 @@
Configure Wi-Fi
###############
We recommend using `NetworkManager <https://developer.gnome.org/NetworkManager/stable/NetworkManager.html>`_ to manage network connections. If you
choose to connect to Wi-Fi while using the
:ref:`live installer <bare-metal-install-desktop>` image, your Wi-Fi settings
will be added to your system during the installation process.
We recommend using `NetworkManager
<https://developer.gnome.org/NetworkManager/stable/NetworkManager.html>`_ to
manage wireless network connections. If you choose to connect to Wi-Fi while
using the :ref:`live installer <bare-metal-install-desktop>` image, your Wi-Fi
settings will be added to your system during the installation process.
NetworkManager provides three simple methods for configuring Wi-Fi.
NetworkManager provides three simple methods for configuring Wi-Fi: Desktop,
CLI, and TUI. NetworkManager uses :command:`wpa_supplicant`, which can also be
used on its own for a more lightweight installation.
.. contents::
:local:
:depth: 1
Using Network Manager
*********************
Desktop GUI (Graphical User Interface)
**************************************
======================================
1. Click anywhere on the icons at the right side of the top of the screen to
bring up a menu and click on :guilabel:`Wi-Fi Not Connected` then
choose :guilabel:`Select Network`.
bring up a menu and click on :guilabel:`Wi-Fi Not Connected` then choose
:guilabel:`Select Network`.
.. figure:: /_figures/wifi/wifi-1.1.png
@@ -43,7 +49,7 @@ Desktop GUI (Graphical User Interface)
.. figure:: /_figures/wifi/wifi-5.png
CLI (Command Line Interface)
****************************
============================
#. List the available Wi-Fi networks
@@ -73,7 +79,7 @@ CLI (Command Line Interface)
To avoid having the Wi-Fi password stored in bash history, consider using the TUI.
TUI (Text-based User Interface)
*******************************
===============================
#. Launch the NetworkManager Text User Interface
@@ -102,8 +108,184 @@ TUI (Text-based User Interface)
.. figure:: /_figures/wifi/nmtui_5.png
Using wpa_supplicant
********************
wpa_suppliant can be used directly, without NetworkManager, to associate a
wireless adapter with an access point. After association is established, an IP
address needs to be assigned or obtained.
Associate with a wireless access point
======================================
#. Make sure NetworkManager is stopped and disabled by masking the service.
.. code-block:: bash
sudo systemctl stop NetworkManager.service
sudo systemctl mask NetworkManager.service
#. Stop the wpa_supplicant.service, which may have been started by NetworkManager.
.. code-block:: bash
sudo systemctl stop wpa_supplicant.service
#. Create a ``wpa_supplicant`` configuration directory.
.. code-block:: bash
sudo mkdir -p /etc/wpa_supplicant
#. Determine your wireless interface name.
.. code-block:: bash
iw dev
Use the name following "Interface" on the first line (eg. wlp1s0)
.. code-block:: console
:emphasize-lines: 1
Interface wlp1s0
ifindex 3
wdev 0x1
addr 00:xx:xx:38:34:7a
type managed
txpower 0.00 dBm
Set the $INTERFACE_NAME environment variable to take advantage of copying
and pasting commands.
.. code-block:: bash
export INTERFACE_NAME=wlp1s0
#. Create a minimal configuration file called
:file:`/etc/wpa_supplicant/wpa_supplicant-$INTERFACE_NAME.conf`
and add the following:
.. code-block:: bash
sudo tee /etc/wpa_supplicant/wpa_supplicant-$INTERFACE_NAME.conf > /dev/null <<'EOF'
ctrl_interface_group=wheel
ctrl_interface=/run/wpa_supplicant
update_config=1
EOF
#. Start the wpa_supplicant service to complete the configuration process.
.. code-block:: bash
sudo systemctl start wpa_supplicant@$INTERFACE_NAME.service
#. Use :command:`wpa_cli` (interactive mode) to scan for available networks.
In this example, our network is named *Network1*.
.. code-block:: bash
:emphasize-lines: 1,2,5,7
sudo wpa_cli
> scan
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
> scan_results
bssid / frequency / signal level / flags / ssid
00:xx:xx:73:7b:46 5180 -55 [WPA2-PSK-CCMP][ESS] Network1
00:xx:xx:83:fa:70 5240 -76 [WPA2-EAP-CCMP][ESS] Network2
00:xx:xx:4f:e9:2c 2412 -67 [WPA2-PSK-CCMP][ESS][P2P] Printer
00:xx:xx:af:fe:3e 5765 -79 [WPA2-PSK-CCMP][ESS] Network3
00:xx:xx:e9:eb:29 2412 -76 [WPA2-PSK-CCMP][ESS] Network4
00:xx:xx:26:4a:b9 2412 -79 [WPA2-PSK-CCMP][ESS][P2P] Printer2
00:xx:xx:b9:0d:d4 2462 -79 [WPA2-PSK-CCMP][ESS] Network5
#. Set up your network connection replacing *Network1* with your wireless
SSID name and *Network1Password* with the password for your network.
.. code-block:: bash
:emphasize-lines: 1,3,5,7
> add_network
0
> set_network 0 ssid "Network1"
OK
> set_network 0 psk "Network1Password"
OK
> enable_network 0
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>SME: Trying to authenticate with 00:xx:xx:5d:d9:26 (SSID='Network1' freq=5180 MHz)
<3>Trying to associate with 00:xx:xx:5d:d9:26 (SSID='Network1' freq=5180 MHz)
<3>Associated with 00:xx:xx:5d:d9:26
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>WPA: Key negotiation completed with 00:xx:xx:5d:d9:26 [PTK=CCMP GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to 00:xx:xx:5d:d9:26 completed [id=0 id_str=]
#. Save the configuration and quit out of :command:`wpa_cli`.
.. code-block:: bash
> save_config
OK
> quit
.. note::
The network password is saved as plaintext in
:file:`/etc/wpa_supplicant/wpa_supplicant-$INTERFACE_NAME.conf`. Use
`wpa_passphrase
<https://wiki.archlinux.org/index.php/WPA_supplicant#Connecting_with_wpa_passphrase>`_
for a more secure method.
Assign an IP address
====================
After the wireless adapter has been associated with wireless access point, an
IP address needs to be assigned for access to the network.
The example below uses ``systemd-networkd`` to request an IP address from the
access point via DHCP. Another network manager can be used if preferred. If
there is a static IP address you'd like to assign, see the
:ref:`assign-static-ip` documentation.
#. Create the :file:`/etc/systemd/network` directory
.. code-block:: bash
sudo mkdir -p /etc/systemd/network
#. Create a :file:`/etc/systemd/network/25-wireless-$INTERFACE_NAME.network` file
with a Match and Network section.
.. code-block:: bash
printf "[Match]\nName=$INTERFACE_NAME\n\n[Network]\nDHCP=ipv4" | sudo tee /etc/systemd/network/25-wireless-$INTERFACE_NAME.network
#. Restart the ``systemd-networkd.service``.
.. code-block:: bash
sudo systemctl restart systemd-networkd.service
#. Enable the ``systemd-networkd`` and ``wpa_supplicant`` services to start automatically
on future boots.
.. code-block:: bash
sudo systemctl enable --now systemd-networkd.service
sudo systemctl enable --now wpa_supplicant@$INTERFACE_NAME.service
Other resources
***************
* NetworkManager CLI `documentation <https://developer.gnome.org/NetworkManager/stable/nmcli.html>`_.
* Additional CLI `examples <https://developer.gnome.org/NetworkManager/stable/nmcli-examples.html>`_.
* Additional CLI `examples <https://developer.gnome.org/NetworkManager/stable/nmcli-examples.html>`_.
* wpa_supplicant `advanced usage documentation <https://wiki.archlinux.org/index.php/WPA_supplicant#Advanced_usage>`_
+108 -101
View File
@@ -254,130 +254,132 @@ Preparing PMEM for container use
The cassandra-pmem image is capable of using both `fsdax` and `devdax`, the necessary steps to configure the PMEM to work with cassandra are documented here.
fsdax
-----
.. tabs::
Verify that the PMEM is in `fsdax` mode
.. group-tab:: devdax
.. code-block:: bash
We need to verify the device we want to use is in `devdax` mode
sudo ndctl list -u
.. code-block:: bash
.. code-block:: console
sudo ndctl create-namespace -fe namespace0.0 --mode=devdax
{
"dev":"namespace0.0",
"mode":"fsdax",
"map":"mem",
"size":"4.00 GiB (4.29 GB)",
"sector_size":512,
"blockdev":"pmem0"
}
.. code-block:: console
{
"dev":"namespace0.0",
"mode":"devdax",
"map":"dev",
"size":"3.94 GiB (4.23 GB)",
"uuid":"cb738cc7-711d-4578-bebf-1f7ba02ca169",
"daxregion":{
"id":0,
"size":"3.94 GiB (4.23 GB)",
"align":2097152,
"devices":[
{
"chardev":"dax0.0",
"size":"3.94 GiB (4.23 GB)"
}
]
},
"align":2097152
}
If for some reason the device is not in `fsdax` mode you can reconfigure the namespace as follows:
If needed, we can reconfigure it using :command:`ndctl create-namespace -fe <namespace-name> --mode=devdax`.
.. code-block:: bash
Before using a `devdax` device we need to clear the device:
sudo `ndctl create-namespace -fe <namespace-name> --mode=fsdax`
.. code-block:: bash
sudo pmempool rm -vaf /dev/dax0.0
Once the PMEM namespace is configured, you will see a device named :file:`/dev/pmem{0-9}`. We will create a filesystem on that device. The filesystem could be `ext4` or `xfs`, for this example we are going to use `ext4`.
The `jvm.options` configuration for Apache Cassandra should look like the following:
.. code-block:: bash
.. code-block:: console
sudo mkfs.ext4 /dev/pmem0
-Dpmem_path=/dev/dax0.0
-Dpool_size=0
.. code-block:: console
Where
* pmem_path is the `devdax` device.
* pool_size=0 indicates to use the entire `devdax` device.
mke2fs 1.45.2 (27-May-2019)
Creating filesystem with 1031680 4k blocks and 258048 inodes
Filesystem UUID: 303c03f5-ac4e-4462-8bf9-bc6b0fae53fe
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
When using the `Docker image with Apache Cassandra`_, the file `jvm.options` is automatically populated.
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
.. group-tab:: fsdax
Verify that the PMEM is in `fsdax` mode
.. code-block:: bash
sudo ndctl list -u
.. code-block:: console
{
"dev":"namespace0.0",
"mode":"fsdax",
"map":"mem",
"size":"4.00 GiB (4.29 GB)",
"sector_size":512,
"blockdev":"pmem0"
}
Once the filesystem is created, we mount it with the dax option
If for some reason the device is not in `fsdax` mode you can reconfigure the namespace as follows:
.. code-block:: bash
.. code-block:: bash
sudo mount /dev/pmem0 /mnt/pmem -o dax
sudo `ndctl create-namespace -fe <namespace-name> --mode=fsdax`
When using `fsdax` mode cassandra-pmem creates a pool file on the pmem mountpoint, so the `jvm.options` configuration should look like the output below:
Once the PMEM namespace is configured, you will see a device named :file:`/dev/pmem{0-9}`. We will create a filesystem on that device. The filesystem could be `ext4` or `xfs`, for this example we are going to use `ext4`.
.. code-block:: console
.. code-block:: bash
-Dpmem_path=/mnt/pmem/cassandra_pool
-Dpool_size=3221225472
sudo mkfs.ext4 /dev/pmem0
.. code-block:: console
mke2fs 1.45.2 (27-May-2019)
Creating filesystem with 1031680 4k blocks and 258048 inodes
Filesystem UUID: 303c03f5-ac4e-4462-8bf9-bc6b0fae53fe
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
Once the filesystem is created, we mount it with the dax option
.. code-block:: bash
sudo mount /dev/pmem0 /mnt/pmem -o dax
When using `fsdax` mode cassandra-pmem creates a pool file on the pmem mountpoint, so the `jvm.options` configuration should look like the output below:
.. code-block:: console
-Dpmem_path=/mnt/pmem/cassandra_pool
-Dpool_size=3221225472
Where
* `pmem_path` is the path to the pool file, which should include the path itself and the file name
* `pool_size` is the size of the pool file in bytes. If you are using the `Docker image with Apache Cassandra`_ you can pass this value as an environment variable to the container runtime in Gb and the calculation is done automatically.
Where
* `pmem_path` is the path to the pool file, which should include the path itself and the file name
* `pool_size` is the size of the pool file in bytes. If you are using the `Docker image with Apache Cassandra`_ you can pass this value as an environment variable to the container runtime in Gb and the calculation is done automatically.
Is important to note that when creating the filesystem in the pmem device certain amount of space of the device is used by the filesystem metadata so the pool_size should be smaller than the total pmem namespace size.
Is important to note that when creating the filesystem in the pmem device certain amount of space of the device is used by the filesystem metadata so the pool_size should be smaller than the total pmem namespace size.
When using the `Docker image with Apache Cassandra`_, the file `jvm.options` is automatically populated with the environment variables `CASSANDRA_PMEM_POOL_NAME` and `CASSANDRA_FSDAX_POOL_SIZE_GB`.
When using the `Docker image with Apache Cassandra`_, the file `jvm.options` is automatically populated with the environment variables `CASSANDRA_PMEM_POOL_NAME` and `CASSANDRA_FSDAX_POOL_SIZE_GB`.
devdax
------
We need to verify the device we want to use is in `devdax` mode
.. code-block:: bash
sudo ndctl create-namespace -fe namespace0.0 --mode=devdax
.. code-block:: console
{
"dev":"namespace0.0",
"mode":"devdax",
"map":"dev",
"size":"3.94 GiB (4.23 GB)",
"uuid":"cb738cc7-711d-4578-bebf-1f7ba02ca169",
"daxregion":{
"id":0,
"size":"3.94 GiB (4.23 GB)",
"align":2097152,
"devices":[
{
"chardev":"dax0.0",
"size":"3.94 GiB (4.23 GB)"
}
]
},
"align":2097152
}
If needed, we can reconfigure it using :command:`ndctl create-namespace -fe <namespace-name> --mode=devdax`.
Before using a `devdax` device we need to clear the device:
.. code-block:: bash
sudo pmempool rm -vaf /dev/dax0.0
The `jvm.options` configuration for Apache Cassandra should look like the following:
.. code-block:: console
-Dpmem_path=/dev/dax0.0
-Dpool_size=0
Where
* pmem_path is the `devdax` device.
* pool_size=0 indicates to use the entire `devdax` device.
When using the `Docker image with Apache Cassandra`_, the file `jvm.options` is automatically populated.
Run the DBRS Container
@@ -385,18 +387,23 @@ Run the DBRS Container
Replace `<image-id>` in the following commands with the name of the image you are using.
In `devdax` mode:
.. tabs::
.. code-block:: bash
.. group-tab:: devdax
docker run --device=/<devdax-device>:/dev/dax0.0 --ulimit nofile=262144:262144 -p 9042:9042 -p 7000:7000 -it --name cassandra-test <image-id>
In `devdax` mode:
.. code-block:: bash
In `fsdax` mode:
docker run --device=/<devdax-device>:/dev/dax0.0 --ulimit nofile=262144:262144 -p 9042:9042 -p 7000:7000 -it --name cassandra-test <image-id>
.. code-block:: bash
.. group-tab:: fsdax
docker run --mount type=bind,source=/<fsdax-mountpoint>,target=/mnt/pmem --ulimit nofile=262144:262144 -p 9042:9042 -p 7000:7000 -it -e 'CASSANDRA_FSDAX_POOL_SIZE_GB=<fsdax-pool-size-in-gb>' --name cassandra-test <image-id>
In `fsdax` mode:
.. code-block:: bash
docker run --mount type=bind,source=/<fsdax-mountpoint>,target=/mnt/pmem --ulimit nofile=262144:262144 -p 9042:9042 -p 7000:7000 -it -e 'CASSANDRA_FSDAX_POOL_SIZE_GB=<fsdax-pool-size-in-gb>' --name cassandra-test <image-id>
Container Configuration
@@ -612,7 +619,7 @@ To start a redisfailover instance in Kubernetes run the following
.. _Quick Start Guide: https://software.intel.com/en-us/articles/quick-start-guide-configure-intel-optane-dc-persistent-memory-on-linux
.. _Managing NVDIMMs: https://docs.pmem.io/ndctl-users-guide/managing-nvdimms
.. _Managing NVDIMMs: https://docs.pmem.io/ndctl-user-guide/managing-nvdimms
.. _Configure, Manage, and Profile: https://software.intel.com/en-us/articles/configure-manage-and-profile-intel-optane-dc-persistent-memory-modules
+166 -21
View File
@@ -20,18 +20,15 @@ customized solutions, and enables you to quickly prototype and deploy Deep
Learning workloads. Use this guide to run benchmarking workloads on your
solution.
The Deep Learning Reference Stack is available in the following versions:
The latest release of the Deep Learning Reference Stack (`DLRS V5.0`_ ) supports the following features:
* `Intel MKL-DNN-VNNI`_, which is optimized using Intel® Math Kernel Library
for Deep Neural Networks (Intel® MKL-DNN) primitives and introduces support
for Intel® AVX-512 Vector Neural Network Instructions (VNNI).
* `Intel MKL-DNN`_, which includes the TensorFlow framework optimized using
Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN)
primitives.
* `Eigen`_, which includes `TensorFlow`_ optimized for Intel® architecture.
* `PyTorch with OpenBLAS`_, which includes PyTorch with OpenBlas.
* `PyTorch with Intel MKL-DNN`_, which includes PyTorch optimized using Intel®
Math Kernel Library (Intel® MKL) and Intel MKL-DNN.
* TensorFlow* 1.15 and TensorFlow* 2.0, an end-to-end open source platform for machine learning (ML).
* PyTorch* 1.3, an open source machine learning framework that accelerates the path from research prototyping to production deployment.
* PyTorch Lightning* which is a lightweight wrapper for PyTorch designed to help researchers set up all the boilerplate state-of-the-art training.
* Transformers* , a state-of-the-art Natural Language Processing (NLP) for TensorFlow 2.0 and PyTorch.
* Intel® OpenVINO™ model server version 2019_R3, delivering improved neural network performance on Intel processors, helping unlock cost-effective, real-time vision applications.
* Intel Deep Learning Boost (DL Boost) with AVX-512 Vector Neural Network Instruction (Intel AVX-512 VNNI) designed to accelerate deep neural network-based algorithms.
* Deep Learning Compilers (TVM* 0.6), an end-to-end compiler stack.
.. important::
@@ -41,9 +38,14 @@ The Deep Learning Reference Stack is available in the following versions:
* Intel® AVX-512 images require an Intel® Xeon® Scalable Platform
* VNNI requires a 2nd generation Intel® Xeon® Scalable Platform
Releases
********
Refer to the `Deep Learning Reference Stack website`_ for information and download links for the different versions and offerings of the stack.
* `DLRS V5.0`_ release announcement.
* `DLRS V4.0`_ release announcement, including benchmark results.
* `DLRS V3.0`_ release announcement, including benchmark results.
* `DLRS V2.0`_ including PyTorch benchmark results.
@@ -60,7 +62,7 @@ Releases
Version compatibility
=====================
We validated the steps in this guide against the following software package versions:
We validated the steps in this guide against the following software package versions, unless otherwise stated:
* |CL| 26240 (Minimum supported version)
* Docker 18.06.1
@@ -373,7 +375,7 @@ Submitting PyTorch Jobs
=======================
We provide `DLRS PytorchJob`_ examples that use the Deep Learning Reference Stack as the base image for creating the container(s) that will run training workloads in your Kubernetes cluster.
Select one form the list below:
Using Kubeflow Seldon and OpenVINO* with the Deep Learning Reference Stack
@@ -465,6 +467,7 @@ Pre-requisites
dlrs-seldon/helm/seldon-model-server
Using the Intel® OpenVINO Model Optimizer
*****************************************
@@ -557,7 +560,7 @@ This example walks through the basic instructions for using the inference engine
.. code-block:: bash
docker run -p 8000:8000 stacks-tensorflow-mkl:latest bash -c ". /workspace/scripts/serve.sh && ie_serving model --model_name resnet --model_path gs://intelai_public_models/resnet_50_i8 --port 8000"
docker run -p 8000:8000 stacks-dlrs-mkl:latest bash -c ". /workspace/scripts/serve.sh && ie_serving model --model_name resnet --model_path gs://intelai_public_models/resnet_50_i8 --port 8000"
Once the server is setup, use a :command:`grpc` client to communicate with served model:
@@ -616,6 +619,138 @@ This example walks through the basic instructions for using the inference engine
Using Seldon and OpenVINO* model server with the Deep Learning Reference Stack
******************************************************************************
`Seldon Core`_ is an open source platform for deploying machine learning models on a Kubernetes cluster. In this section we will walk through using a Seldon server with OpenVINO to serve a model.
Pre-requisites
==============
* A running :ref:`kubernetes` cluster
* An existing Kubeflow deployment
* Helm
* A pre-trained model
Please refer to:
* :ref:`kubernetes`
* `Getting Started with Kubeflow`_
* `Installing Helm`_
.. note::
This document was validated with Kubernetes v1.14.8, Kubeflow v0.7, and Helm v3.0.1
Prepare the model
=================
There are several methods to add a model to a Seldon server; we will cover two of them. First a model will be stored in a persistent volume by creating a persistent volume claim and a pod, then copying the model into the pod. Second, a model will be built directly into the base image. Adding a model to a volume is perhaps more traditional in Kubernetes, but some cloud providers have access rules that disallow a private cluster, and adding the model to the image avoids the issue in that scenario.
Mount pre-trained models into a persistent volume
-------------------------------------------------
We will create a small pod to get the model into a volume.
#. Apply all PV manifests to the cluster
.. code-block:: bash
kubectl apply -f storage/pv-volume.yaml
kubectl apply -f storage/model-store-pvc.yaml
kubectl apply -f storage/pv-pod.yaml
#. Use :command:`kubectl cp` to move the model into the pod, and therefore into the volume
.. code-block:: bash
kubectl cp ./<your model file> pv-pod:/home
#. In the running container, fetch your pre-trained models and save them in the :file:`/opt/ml` directory path.
.. code-block:: bash
root@hostpath-pvc:/# cd /opt/ml
root@hostpath-pvc:/# # Copy your models here
root@hostpath-pvc:/# # exit
Add the pre-trained model to the image
--------------------------------------
A custom DLRS image is provided to serve OpenVINO through Seldon. Add a curl command to download your publicly hosted model and save it in :file:`/opt/ml` in the container filesystem. For example, if you have a model on GCP, use this command:
.. code-block:: bash
curl -o "[SAVE_TO_LOCATION]" \
"https://storage.googleapis.com/storage/v1/b/[BUCKET_NAME]/o/[OBJECT_NAME]?alt=media"
Prepare the DLRS image
======================
A base image with Seldon and the OpenVINO inference engine should be created using the :file:`Dockerfile_openvino_base` dockerfile.
.. code-block:: bash
cd docker
docker build -f Dockerfile_openvino_base -t dlrs_openvino_base .
cd ..
Deploy the model server
=======================
Now you're ready to deploy the model server using the Helm chart provided.
.. code-block:: bash
cd helm
helm install dlrs-seldon seldon-model-server \
--namespace kubeflow \
--set openvino.image=dlrs_openvino_base \
--set openvino.model.path=/opt/ml \
--set openvino.model.name=<model_name> \
--set openvino.model.input=data \
--set openvino.model.output=prob
This will create your SeldonDeployment
Extended example with Seldon using Source to Image
==================================================
`Source to Image (s2i)`_ is a tool to create docker images from source code.
#. Install source to image (s2i)
.. code-block:: bash
cd ${SRC-DIR}
wget https://github.com/openshift/source-to-image/releases/download/v1.1.14/source-to-image-v1.1.14-874754de-linux-amd64.tar.gz
tar xf source-to-image-v1.1.14-874754de-linux-amd64.tar.gz
mv s2i ${BIN_DIR}/s2i && ln -s s2i ${BIN_DIR}/sti
#. Clone the seldon-core repository
.. code-block:: bash
git clone https://github.com/SeldonIO/seldon-core.git ${SRC_DIR}/seldon-core
#. Create the new image
Using the DLRS image created above, you can build another image for deploying the Image Transformer component that consumes imagenet classificatin models.
.. code-block:: bash
cd ${SRC_DIR}/seldon-core/examples/models/openvino_imagenet_ensemble/resources/transformer/
s2i -E environment_grpc . dlrs_openvino_base:0.1 imagenet_transformer:0.1
Use this newly created image for deploying the Image Transformer component of the `OpenVino Imagenet Pipelines`_ example from Seldon.
Use Jupyter Notebook
********************
@@ -656,7 +791,7 @@ Your browser displays the following:
:scale: 50%
:alt: Jupyter Notebook
Figure 1: Jupyter Notebook
Figure 1: Jupyter Notebook
To create a new notebook, click :guilabel:`New` and select :guilabel:`Python 3`.
@@ -665,7 +800,7 @@ To create a new notebook, click :guilabel:`New` and select :guilabel:`Python 3`.
:scale: 50%
:alt: Create a new notebook
Figure 2: Create a new notebook
Figure 2: Create a new notebook
A new, blank notebook is displayed, with a cell ready for input.
@@ -673,7 +808,7 @@ A new, blank notebook is displayed, with a cell ready for input.
:scale: 50%
:alt: New blank notebook
Figure 3: New blank notebook
Figure 3: New blank notebook
To verify that PyTorch is working, copy the following snippet into the blank
cell, and run the cell.
@@ -689,7 +824,7 @@ cell, and run the cell.
:scale: 50%
:alt: Sample code snippet
Figure 4: Sample code snippet
Figure 4: Sample code snippet
When you run the cell, your output will look something like this:
@@ -697,7 +832,7 @@ When you run the cell, your output will look something like this:
:scale: 50%
:alt: Code output
Figure 5: Code output
Figure 5: Code output
You can continue working in this notebook, or you can download existing
@@ -784,7 +919,7 @@ Compiling AIXPRT with OpenMP on DLRS
To compile AIXPRT for DLRS, you will have to get the community edition of AIXPRT and update the `compile_AIXPRT_source.sh` file.AIXPRT utilizes
build configuration files, so to build AIXPRT on the image, copy, the build files from the base image, this can be done by adding these commands
to the end of the stacks-tensorflow-mkl dockerfile:
to the end of the stacks-dlrs-mkl dockerfile:
.. code-block:: console
@@ -829,7 +964,7 @@ Related topics
.. _flannel: https://github.com/coreos/flannel
.. _Getting Started with Kubeflow: https://www.kubeflow.org/docs/started/getting-started/
.. _Getting Started with Kubeflow: https://github.intel.com/verticals/usecases/blob/56717f4642ecd958dc93bbc361c551dfc578d3ed/kubeflow/README.md#getting-started-with-kubeflow
.. _Eigen: https://hub.docker.com/r/clearlinux/stacks-dlrs-oss/
@@ -845,6 +980,8 @@ Related topics
.. _DLRS V4.0: https://clearlinux.org/news-blogs/deep-learning-reference-stack-v4
.. _DLRS V5.0: https://clearlinux.org/blogs-news/deep-learning-reference-stack-v50-now-available
.. _dlrs-tfjob: https://github.com/clearlinux/dockerfiles/tree/master/stacks/dlrs/kubeflow/dlrs-tfjob
.. _Logging Architecture: https://kubernetes.io/docs/concepts/cluster-administration/logging/
@@ -899,3 +1036,11 @@ Related topics
.. _DLRS TFJob: https://github.com/clearlinux/dockerfiles/tree/master/stacks/dlrs/kubeflow/dlrs-tfjob
.. _DLRS PytorchJob: https://github.com/clearlinux/dockerfiles/tree/master/stacks/dlrs/kubeflow/dlrs-pytorchjob
.. _Installing Helm: https://helm.sh/docs/intro/install/
.. _OpenVino Imagenet Pipelines: https://docs.seldon.io/projects/seldon-core/en/stable/examples/openvino_ensemble.html
.. _Source to Image (s2i): https://docs.seldon.io/projects/seldon-core/en/latest/wrappers/s2i.html
.. _Deep Learning Reference Stack website: https://clearlinux.org/stacks/deep-learning

Some files were not shown because too many files have changed in this diff Show More