Skip to content

Commit

Permalink
docs/{concepts, guides}: fix minor fomatting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Hu <[email protected]>
  • Loading branch information
huyang531 committed Aug 21, 2024
1 parent 5faf4e6 commit a0fbcdb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
22 changes: 13 additions & 9 deletions content/docs/concepts/build-process.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |
Unikraft's build system which generate a unikernel.
---

Unikraft is designed to build ultra-lightweight VM images. For that matter, the
Unikraft is designed to build ultra-lightweight VM images. For that matter, the
build system is designed to take only the absolute necessary pieces of code and
bind them togheter.

Expand All @@ -25,19 +25,23 @@ The lifecycle of the construction of a Unikraft unikernel includes several
distinct steps:

1. Configuring the Unikraft unikernel application with compile-time options;
2. Fetching and preparing the source code for external libraries;
3. Compiling the libraries and the core Unikraft code;
4. Linking the final unikernel image.
1. Fetching and preparing the source code for external libraries;
1. Compiling the libraries and the core Unikraft code;
1. Linking the final unikernel image.

## GNU Make-based build system

Unikraft is a configurable operating system, where each component can be
modified, configured, according to the user’s needs. This configuration is done
using a version of Kconfig, through the Config.uk files. In these files, options
modified, configured, according to the user’s needs.
This configuration is done
using a version of Kconfig, through the Config.uk
files. In these files, options
are added to enable libraries, applications and different components of the
Unikraft core. The user can then apply those configuration options, using make
Unikraft core.
The user can then apply those configuration options, using make
menuconfig, which generates an internal configuration file that can be
understood by the build system, .config. Once configured, the Unikraft image can
understood by the build system, .config
. Once configured, the Unikraft image can
be built, using make, and run, using the appropriate method (Linux ELF loader,
qemu-kvm, xen, others).

Expand All @@ -50,4 +54,4 @@ qemu-kvm, xen, others).
description="Overview of Unikraft's build process with respect to the
intermediate artfacts generated considered from the perspective of its GNU
Make-based build system."
/>
/>
11 changes: 4 additions & 7 deletions content/docs/concepts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Unikernels are specifically designed for use in cloud environments. In most
production systems often the standard unit of isolation is the VM since this
provides the greatest degree of security for the enclosed application(s). Its
isolation is made possible directly by hardware primitives instead of OS-level
(software) primitives. However, a fully virtualized traditional VMs is too
(software) primitives. However, a fully virtualized traditional VM is too
heavy for most applications which has led to the container-based model.
Naturally, the evolution of running applications in the cloud has led to the
model where containers are deployed within VMs due to the properties of each
Expand Down Expand Up @@ -71,7 +71,6 @@ of an Ubuntu VM), Containers and Unikernels, represented by Unikraft:
| **Security** | Very secure | Least secure of the 3 | Very secure |
| **Features** | Everything you could think of | Depends on the needs | Only the absolute necessary |


## Componenization

At the heart of the unikernel model lies with the collection of composable,
Expand All @@ -90,20 +89,18 @@ pre-existing libraries such as OpenSSL.
> Read more about [Unikraft's modular
> architecture](/docs/concepts/architecture).

## Configurability

To meet the needs of a large variety of different use cases, KPIs and contexts,
configuration of library components allow users to tune specific attributes to
their liking. This ability to configure all parts of the unikernel is
first-class in Unikraft and enables developers to develop the best-in-class
first-class in Unikraft and enables developers to develop the best-in-class applications.

In Unikraft, this system is enabled by a custom port of [Linux's KConfig
system](#) which allows users to quickly and easily pick and choose which
In Unikraft, this system is enabled by a custom port of Linux's KConfig
system which allows users to quickly and easily pick and choose which
libraries to include in the build process, as well as to configure options for
each of them, where available.


## Tooling and Integrations

The core of Unikraft is a suite of tools which aid in the creation of the final
Expand Down
12 changes: 10 additions & 2 deletions content/guides/internals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ The process should end with the following output:
GZ helloworld_qemu-x86_64.gz
make[1]: Leaving directory '/home/X/workdir/helloworld/workdir/unikraft'
```

Notice that each line in `make`'s output consists of an operation in the build process (i.e compiling, linking, symbol striping etc.) and a corresponding generated file.

### Running
Expand Down Expand Up @@ -205,19 +206,24 @@ When you exit the menu, you will most likely see this warning message:
*** This is to ensure that the new setting is applied
*** to every compilation unit.
```

This is a very good recommandation and you'll use it a lot when configuring and building applications - so make sure to run

```console
$ make properclean
```

...followed by
.
.
.followed by

```console
$ make -j$(nproc)
```

...to finally build an ARM64 unikernel.
.
.
.to finally build an ARM64 unikernel.
Since we are targeting a different architecture, we have to use QEMU to emulate an ARM64 CPU:

```console
Expand All @@ -244,6 +250,7 @@ oOo oOO| | | | | (| | | (_) | _) :_
Hello world!
Arguments: "helloworld"
```

### Enabling kernel logs

We will now try to further configure our `helloworld` application.
Expand Down Expand Up @@ -342,6 +349,7 @@ Arguments: "build/helloworld_qemu-x86_64"
```

You can notice that the debug logs prove to be quite useful: they include information such as timestamp, debugging level (warning, info, error etc.), internal library component (`libkvmpci`, `libukschedcoop` etc.) and the source file along with the line in it.

### Enabling tests

As an exercise, try to enable the `uktest` internal library from the configuration menu.
Expand Down

0 comments on commit a0fbcdb

Please sign in to comment.