Giter VIP home page Giter VIP logo

meta-kanto's Introduction

Kanto logo

Eclipse Kanto - Yocto Layer

This layer provides support for building the necessary Eclipse Kanto components.

The layer depends on the meta-virtualization one. If the edge containerization (i.e. Eclipse Kanto container management) is to be included in your target Yocto image, you need to enable the required by this layer virtualization. To do that, add in the configuration file the following line:

DISTRO_FEATURES:append = " virtualization"

For further fine-tuning and options see the meta-virtualization README.

Dependencies

Required for enabling the cloud connectivity and virtualization. Could be used as a single dependency if only suite connector is needed to be built.

URI: git://github.com/openembedded/meta-openembedded.git layers:

  • meta-networking

Required for enabling edge containerization

URI: git://git.yoctoproject.org/meta-virtualization

Table of Contents

  1. Adding the meta-kanto layer to your build
  2. Required image configurations
  3. Example image configuration

Adding the meta-kanto layer to your build

Run:

bitbake-layers add-layer meta-kanto

Required image configurations

The following configurations are required so that the included recipes from the meta-kanto layer are properly installed and enabled:

  1. Configure the system initialization manager to systemd https://www.yoctoproject.org/docs/3.1/dev-manual/dev-manual.html#using-systemd-exclusively

  2. Since kernel configurations are required, you need to set the MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS variable to include kernel modules. To do that, add in the configuration file the following line:

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"

Example image configuration

# Add the required DISTRO_FEATURES
DISTRO_FEATURES:append = " virtualization systemd"

# Configure the kernel modules required to be included
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"

# System initialization manager setup
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

# Add the Eclipse Kanto components
IMAGE_INSTALL:append = " suite-connector"

Community

meta-kanto's People

Contributors

e-grigorov avatar hristobojilov avatar k-gostev avatar konstantina-gramatova avatar stoyan-zoubev avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meta-kanto's Issues

Yocto recipe for Kanto Azure Connector

The recipe should be able to:

  • build Kanto Azure Connector from sources
  • integrate the related resources: service file, configuration, certificates etc.
  • support various platforms/architectures

Specify a default storage location in file-backup.conf

Problem: The storage directory for file-backup needs to be specified in /etc/file-backup/config.json because the default location is causing the service to fail to start on Fedora IOT.

Suggested solution: Specify a default storage location in file-backup.conf. The suggested location is "storage": "/var/lib/file-backup" in /etc/file-backup/config.json, which is probably recipes-management/file-backup/files/config.json in this repository.

Yocto recipe for Kanto File Upload

The recipe should be able to:

  • build Kanto File Upload from sources
  • integrate the related resources: service file and configuration
  • support various platforms/architectures

Yocto recipe for Kanto Local Digital Twins

The recipe should be able to:

  • build Kanto Local Digital Twins from sources
  • integrate the related resources: service file and configuration
  • support various platforms/architectures

Yocto recipe for Kanto System Metrics

The recipe should be able to:

  • build Kanto System Metrics from sources
  • integrate the related resources: service file and configuration
  • support various platforms/architectures

Provide Kirkstone fixed M4 layer

The following has to be available:

  • a Kirkstone-dedicated branch - i.e. kirkstone
  • a tag in the branch that references the layer with a fixed SRCREV to the released Kanto v0.1.0-M4 version
  • ensure the recipes are switched back to the main branch after tagging

Yocto recipe for Kanto Update Manager

The recipe should be able to:

  • build Kanto Update Manager from sources
  • integrate the related resources: service file and configuration
  • support various platforms/architectures

Yocto recipe for Kanto Software Update

The recipe should be able to:

  • build Kanto Software Update from sources
  • integrate the related resources: service file and configuration
  • support various platforms/architectures

Kanto Container Management recipe fails to compile for Leda-Distro (kirkstone)

Issue description

The Container Management recipe uses ${AUTOREV} thus pulling the latest commit from container-management. This now fails to compile for Leda-Distro which is based on kirkstone.

The full recipe log can be found here:
kanto_cm_compile_failure.log

The lines containing the failure:

HASH subkey 7ebe85e22f308a2556eb2dce4f9d611c371d0064f995533f6a3ed8738e9bf1ee "stdout" = 67c71b5ad3badf4147a7ac7cfaa2eacf4017d1f060a8b3dae9415254e28cfcc1
# github.com/docker/docker/libnetwork/networkdb
../../../../pkg/mod/github.com/moby/[email protected]+incompatible/libnetwork/networkdb/networkdb.go:149:16: undefined: atomic.Int64
../../../../pkg/mod/github.com/moby/[email protected]+incompatible/libnetwork/networkdb/networkdb.go:154:16: undefined: atomic.Int64
HASH subkey f8474e3cf420c317c9d2d8bcc1224e1d7bf857bcc9d01cdbb952715199e5dd60 "link-stdout" = d096858d49809339f49411b2867f7ff73433ab348a826577d56fd45a24739b1c
WARNING: exit code 2 from a shell command.

The issue seems to be connected to bump in the moby version: eclipse-kanto/container-management#146

Workaround for Leda

In meta-leda we have opted for our 0.1.0-M1-release to use a fixed known-good commit hash for CM.

Steps to reproduce:

  1. Checkout https://github.com/eclipse-leda/leda-distro (branch 0.1.0-M1)
  2. Following the leda-documentation setup an environment where you can build Leda 0.1.0-M1 with kas.
  3. Run kas checkout kas/leda-qemux86-64.yaml
  4. Comment out in meta-leda/meta-leda-components/recipes-sdv/eclipse-kanto/container-management_%.bbappend the L24: SRCREV="65e00358fa5aed1792059488a80fe755b36a8191"
  5. Run: kas shell kas/leda-qemux86-64.yaml -c 'bitbake container-management' (to only run the CM recipe) or kas build kas/leda-qemux86-64.yaml (to run a full Leda-distro build)

Yocto recipe for Kanto Container Management

The recipe should be able to:

  • build Kanto Container Management from sources
  • integrate the related resources: service file and configuration
  • support various platforms/architectures

Yocto recipe for Kanto Suite Bootstrapping

The recipe should be able to:

  • build Kanto Suite Bootstrapping from sources
  • integrate the related resources: service file and configuration
  • support various platforms/architectures

Ensure automated integration testing

The available integration tests per Kanto component must be run against an image built using the respective recipes from the Yocto meta layer.

Depending on the duration for the tests execution - environment setup, test image build, tests execution, etc. it has to be decided on what basis these integration tests should run - per PR, nightly, etc.

Yocto recipes for Eclipse Kanto

Yocto recipes (.bb files) contain information about a single piece of software:

  • source code repository
  • patches
  • configurations
  • compile instructions
  • packaging

Every Kanto component requires own recipe to be a part of the Yocto build.

Tasks

Wrong argument in update manager service unit template

Issue

The update manager recipe compiles and installs the UM config.json and binary in the final image, but the service unit fails to start the service. Looking at the logs, we can see the following error:

Jul 27 08:25:40 qemux86-64 systemd[1]: Stopped Eclipse Kanto - Update Manager.
Jul 27 08:25:40 qemux86-64 systemd[1]: Started Eclipse Kanto - Update Manager.
Jul 27 08:25:41 qemux86-64 update-manager[347]: flag provided but not defined: -configFile

Comparing the error log and the help of UM we can see there is an error in the service unit template here:
https://github.com/eclipse-kanto/meta-kanto/blob/kirkstone/recipes-management/update-manager/files/service.template#L10

Currently L10 is:

ExecStart=@UM_BIN_DD@/update-manager -configFile @UM_CFG_DD@/update-manager/config.json

But should be:

ExecStart=@UM_BIN_DD@/update-manager -config-file @UM_CFG_DD@/update-manager/config.json

That is, the option name is -config-file and not -configFile.

Expected Behavior

The service unit is patched with the proper option name and it starts successfully.

Yocto recipe for Kanto Suite Connector

The recipe should be able to:

  • build Kanto Suite Connector from sources
  • integrate the related resources: service file, configuration, certificates etc.
  • support various platforms/architectures

facing issue while building kanto recipes using yocto

we are trying to integrate kanto recipes in yocto below are some details:

  • using meta-kanto (branch: main)
  • default go package version 1.16.7 (updated to new version 1.19.7)

while integrating recipes , we are facing downloading issue with some go modules:
Error:
containerm/ctr/ctrd_metrics_util.go:17:2: github.com/containerd/[email protected]: Get https://proxy.golang.org/github.com/containerd/cgroups/@v/v1.0.4.zip: dial tcp: lookup proxy.golang.org: no such host

containerm/ctr/ctrd_cache.go:21:2: github.com/containerd/[email protected]: Get https://proxy.golang.org/github.com/containerd/containerd/@v/v1.6.18.zip: dial tcp: lookup proxy.golang.org: no such host

could you help us to fix this issue:

Apply the new Eclipse Kanto project license scheme

The Eclipse Kanto project is currently restructuring its license scheme - from Eclipse Public License 2.0 only to dual licensing under Eclipse Public License 2.0 and Apache License 2.0 (you can read more about it here).

The following changes must be applied to all project repositories:

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0, or the Apache Software License
2.0 which is available at https://www.apache.org/licenses/LICENSE-2.0.

... Text of the Eclipse Public License 2.0 ...

... Text of the Apache Software License 2.0 ...

  • Update the Declared Project Licenses section of the NOTICE.md file with the new license information, i.e.:
This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 which
is available at https://www.apache.org/licenses/LICENSE-2.0.

SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
  • Update all Yocto recipes according to the new project's licensing scheme, i.e.:
LICENSE = "EPL-2.0 | Apache-2.0"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=<new md5 checksum>"

Yocto recipe for Kanto AWS Connector

The recipe should be able to:

  • build Kanto AWS Connector from sources
  • integrate the related resources: service file, configuration, certificates etc.
  • support various platforms/architectures

Yocto recipe for Kanto File Backup

The recipe should be able to:

  • build Kanto File Backup from sources
  • integrate the related resources: service file, configuration, certificates etc.
  • support various platforms/architectures

Make logs storage configurable for the Kanto Suite Connector recipe

The recipe uses an .inc mechanism to ensure all aspects of the Kanto Suite Connector behavior are easily configurable via a .bbappend.

All major aspects are currently covered there except the desired logs storage location for the component. It should made configurable aligned with the adopted configuration approach for the recipe.

Move to the latest go version

The last Go version is set in the parent feature. Based on it, these steps have to be executed:

  • check for potential updates from go mod tidy
  • check the component build
  • check that all tools from the validation flow will pass
  • update the Go version in the GitHub validation flow
  • update the Go version in the notice file
  • if required, update the related libraries in the notice file

Provide fixed M4 layer for the main branch

The following has to be available:

  • a tag in the branch that references the layer with a fixed SRCREV to the released Kanto v0.1.0-M4 version
  • ensure the recipes are switched back to the main branch after tagging

Provide Kirkstone fixed M2 layer

The following has to be available:

  • a Kirkstone-dedicated branch - i.e. kirkstone
  • a tag in the branch that references the layer with a fixed SRCREV to the released Kanto v0.1.0-M2 version
  • ensure the recipes are switched back to the main branch after tagging

Update the configuration handling for the Kanto Suite Connector recipe

Currently, the default configuration of the recipe sets the SC_CFG_DD to "${sysconfdir}", i.e. /etc.
The value later used to populate the templates must be preserved as-is configured by the user or default to ensure ease of use and not implicitly extended with a /suite-connector suffix by the recipe.

The systemd and binary templated configurations must be updated accordingly to refer the suite-connector subdirectory in SC_CFG_DD to load the respective configurations.

Support for Langdale and Dunfell

Great to see a Yocto layer for Kanto supporting the Kirkstone LTS release.

It would be great if meta-kanto would also be compatible with the current Dunfell LTS release, as many existing device manufacturers tend to have not yet updated.

Also preparing for the next LTS (Langdale) would be good.

Tasks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.