Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

WIP: Restructure and Manifests #26

Merged
merged 169 commits into from
Dec 4, 2020

Conversation

nderjung
Copy link
Member

@nderjung nderjung commented Sep 29, 2020

This series introduces a massive restructure to kraft internals. It creates a clear seperation between a Unikraft component (whether the core, architecture, platform, library or application) and the mechanic which is used to retrieve it. This is conceptualized through a Manifest class.

In the previous structural layout of kraft, the organisation of a component was centered around the idea that it in itself is a idempotent repository. This is actually not the case, since a). internal components are not repositories and b). external repositories are not necessarily git repositories. In the latter case, the distribution of unikraft components can be streamlined by providing them, for example, as tarballs without full version history for faster retrieval and the fact that this SCM is not required for all builds.

To work around this new concept, kraft had to be reorganised in order to facilitate the existence of some component which can be (but is not always in the case of internals) retrieved by some manifest. This led to the redistrubtion of the Project class which used to encompass a working application, and the various component classes into simpler and more modular modules which can be worked individually with or without a remote source origin (via the manifest).

N.B. Due to the fact that this has been such a large restructure, many commits include a wide veriaty of changes which may not necessarily accurately reflect the full change to the file itself.

This PR is a WIP. More updates inbound.

This commit represents the first of a series which break the
functionality of kraft in order to perform a larger restructure of
its internals.  As a result, subsequent commits will cause breaking
changes.

In this first commit, we rename the directory of the commands directory.

Signed-off-by: Alexander Jung <[email protected]>
This commit introduces the concept of a remote manifest.  The remote
manifest represents a way of pointing to some Unikraft source code,
whether this is the core or a microlibrary.  The Manifest contains
meta information about the component which can later be used in
conjunction with the automatic retrieval of microlibraries before
the construction of a unikernel itself.

Signed-off-by: Alexander Jung <[email protected]>
Since introducing the Manifest class, we have now seperated the
relationship between what is a component and what is a remote
source origin and so the Project class is no longer needed.

Signed-off-by: Alexander Jung <[email protected]>
Signed-off-by: Alexander Jung <[email protected]>
This commit brings the component top-level of kraft tree such that
it can be used later by more complex component types.  This will
eventually be inherited by the (internal) architecture, (internal)
platform, library and application classes which will be structured
into their own directories.

Signed-off-by: Alexander Jung <[email protected]>
This commit introduces a number of new methods to be used when
working directly with templates.  Particularly, they focus on
finding the right template and working with the individual
template.

Signed-off-by: Alexander Jung <[email protected]>
@nderjung nderjung added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Sep 29, 2020
@nderjung nderjung added this to the kraft v0.5.0 milestone Sep 29, 2020
Signed-off-by: Alexander Jung <[email protected]>
This commit moves the core component from the original components
directory to a top-level directory such that it can be used by
other components.

Signed-off-by: Alexander Jung <[email protected]>
This move marks the conversion of the Architecture component to its
own independent module.

Signed-off-by: Alexander Jung <[email protected]>
This commit moves the platform component to its own module and
provides inheritance with the new component framework.

Signed-off-by: Alexander Jung <[email protected]>
@nderjung nderjung force-pushed the nderjung/restructure branch from e883cf6 to 0085e69 Compare September 29, 2020 17:22
This commit restructure the network component such that it is a driver
for the platform component.  This prevents it from inheriting component
attributes which are otherwise reserved for repositories.

Signed-off-by: Alexander Jung <[email protected]>
@nderjung nderjung force-pushed the nderjung/restructure branch from ed11841 to 9ce3c24 Compare September 29, 2020 17:27
@nderjung nderjung force-pushed the nderjung/restructure branch from ef67044 to 76ad469 Compare December 1, 2020 19:04
Signed-off-by: Alexander Jung <[email protected]>
This is actually a big headache to maintain for package
stability.

Signed-off-by: Alexander Jung <[email protected]>
Signed-off-by: Alexander Jung <[email protected]>
This commit fixes the following linting issues:

 * E111 indentation is not a multiple of four
 * E125 continuation line with same indent as next logical line
 * E128 continuation line under-indented for visual indent
 * E231 missing whitespace after ','
 * E251 unexpected spaces around keyword / parameter equals
 * W291 trailing whitespace
 * E301 expected 1 blank line
 * E302 expected 2 blank lines
 * E303 too many blank lines
 * E304 blank lines found after function decorator
 * E305 expected 2 blank lines after class or function definition
 * F401 imported but unused
 * E502 the backslash is redundant between brackets
 * E711 comparison to None should be 'if cond is None:'
 * E741 ambiguous variable name
 * F821 undefined name
 * C901 is too complex

Signed-off-by: Alexander Jung <[email protected]>
@nderjung nderjung force-pushed the nderjung/restructure branch from 2e8a018 to 58217c4 Compare December 4, 2020 13:46
@nderjung nderjung marked this pull request as ready for review December 4, 2020 22:18
@nderjung nderjung merged commit 0f72335 into unikraft:staging Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant