Skip to content

Jcarolinares/opta family block #677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Create and Upload a Custom Container to the Portenta X8
position: 9
difficulty: intermediate
tags: [Linux, Python, Containers, ADB]
description: This tutorial will show you how to create and upload your custom container to your Portenta X8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'Data Logging with MQTT, Node-RED, InfluxDB and Grafana'
position: 12
description: 'This tutorial will show you how to set up a local data logging application using an MQTT broker, Node-RED, InfluxDB, Grafana, and the Arduino® Portenta X8.'
difficulty: intermediate
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'Output WebGL Content on a Screen'
position: 10
description: 'This tutorial shows how to install and modify a container that outputs web browser and webGL content'
difficulty: beginner
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'Managing Containers with Docker on Portenta X8'
position: 5
description: 'This tutorial shows how to install and manage your containers using Docker.'
difficulty: beginner
tags:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
title: How to use Portenta X8 board manager
position: 7
difficulty: beginner
tags: [Linux, containers, factories, foundries]
description: This article contains information about the fundamental concepts of the Portenta X8
author: Benjamin Dannegård
hardware:
- hardware/04.pro/board/portenta-x8
software:
- fioctl

---

## Overview

The Portenta X8 is one of the more advanced boards available from Arduino. And with that comes some new concepts that are not standard for Arduino boards. In this article we will go through some of the foundations of the Portenta X8 and help you understand how the board works and how you can benefit from the advanced features of this board. You will learn about FoundriesFactory® and how containers on the Portenta X8 work.

## Goals

- Get in-depth information about how the Portenta X8 works
- Learn how containers work

### Required Hardware and Software

- [Portenta X8](https://store.arduino.cc/portenta-x8)
- [fioctl](https://docs.foundries.io/latest/getting-started/install-fioctl/index.html)

## Instructions

If you need help with setting up your board then please have a look at the "Getting Started" tutorial. That tutorial will show you how to set up your board with FoundriesFactory and install containers on it.

## Embedded Linux

To work in an embedded Linux environment there a few things to consider. When approaching linux-based embedded devices software solutions, you need to provide a base distribution, a mechanism to update it and some applications that can run on the board. The X8 uses a Linux distribution built with the Yocto Project® as the base platform, with applications that are installed and packaged as confined containers.

A ready-made Linux distribution that packages everything seems most attractive for end users but you need to find a distribution that implements the function that you need. If you need to tweak them you may end up in a mess of patches on the top of someone else's build system. On the other hand, a generic distribution has some problems since installing software over it may pollute the original system and cause issues when updating the base platform. For example you install a new application and the older one no longer works. In addition to that you have to implement a lot of things like cybersecurity functions and system updates. Finally, your solution may rely on a too "generic" distribution, with tons of software you don't need. So you may end up removing a lot of software on the target and also turning features on and off. Until you mess up things or you need to update the system and you restart with a new fresh image and restart everything from the beginning.

### Benefits of Foundries.io

Foundries.io™ basically created their generic-but-not-too-generic distribution based on Yocto with minimal software installed, by default implementing top level cybersecurity features like OP-TEE and OSTREE that makes their solution ideal for professional applications. A custom OTA system update mechanism which is based on a client running on target and a robust cloud server. And they married Docker-compose as a way to deploy a software solution to a target. This is like having an app store for a particular device with the difference that we're not installing an app but a container which may contain a whole distribution or a minimal distribution running only our app or our set of apps.

In addition to that they developed the cloud side as well. In a nutshell you can use what's called FoundriesFactory, a cloud DevSecOps subscription service to build, test, deploy, and maintain secure, updatable IoT and Edge products. It provides a unique id and automatic builds of the base system and containers for this system in one place. Let's now take a look at the Foundries.io Factory page.

### Foundries.io Factory

With the help of the Arduino Cloud integration with Foundries.io, you can easily create your Factory right from the Arduino Cloud page. You can set your Factory's platform and name. The platform here will be the Portenta X8.

![Factory page](assets/factory-page.png)

Your Factory page allows you to add members, so that you can easily keep track of the members of your team that should have access to the Portenta X8's that are linked to your Factory. You can also set up teams for better management. On the page you can also find a list of all devices linked to the Factory, along with their name and version of container that is currently uploaded to the board. On the containers page you can find all the different versions of containers uploaded to the Factory.

On the "source" page of your Factory, you can find the four repositories that are used to customize the images. These are:

- **ci-scripts.git**: Scripts that define the platform and container build jobs to the FoundriesFactory continuous integration system.
- **lmp-manifest.git**: The repo manifest for the platform build. It defines which layer versions are included in the platform image. This includes **meta-partner-arduino**, the layer containing Arduino specific customizations (machine definition, device drivers, etc).
- **meta-subscriber-overrides.git**: OE layer that defines what is included into your Factory image. You can add board specific customizations and overrides, add and remove packages provided in the default Linux microPlatform base.
- **containers.git**: This is where containers and docker-compose apps are defined. It allows you to define what containers to build, and how to orchestrate them on the platform.

While the "targets" page contains the images built by the Continuous integration system each time something is committed in the repositories. Committing to **lmp-manifest.git** or **meta-subscriber-overrides.git** repositories will create a platform target, while committing to **containers.git** will create a container target. These targets will generate the artifacts for the platforms as specified in the **ci-scripts.git**, including all the required files to program the target in case of platform builds. You can inspect your FoundriesFactory targets in the "targets" page.

## Containers

Containers allow for easy deployment of Linux based processes, uploaded through git, which can then be tracked on your Factory page. A Linux container are processes that are isolated from the rest of the system. A container is an image file that contains all the files that are necessary to run it. This makes the Linux containers portable and consistent throughout development, testing and production. Making them much quicker to use than development pipelines that rely on replicating traditional testing environments.

Foundries.io provides a service that builds images using the Yocto Project and specifically built around the Linux microPlatform (LmP) distribution they maintain. LmP contains an extensive set of software components needed for IoT applications.

Using [fioctl](https://docs.foundries.io/latest/getting-started/install-fioctl/index.html) allows you to manage your boards through CLI. This will make it possible for you to easily upload containers to a board that is linked to your Factory. When the board is online and connected to the Factory you can easily push new apps to the board. Using fioctl command lines you only need to state the Factory, board and app.

### Benefits of Containers

For example if you are developing an application on a laptop and your environment has a specific configuration. Other developers may have slightly different configurations. The application will rely on your configuration and is dependent on specific files, libraries and dependencies. While your business has development and production environments with their own configurations and supporting files. You would want to emulate that environment as much as possible locally.

With containers you can make your app work across environments, pass quality assurance and get it deployed as fast and easy as possible.

The contents of a container image can be compared to a an installation of a Linux distribution complete with RPM packages, configuration files, etc. However, a container image distribution is easier to install rather than a new copy of the operating system.

A Linux container is a good solution for solutions that require portability, configurability and isolation. The idea behind Linux containers is to be able to develop solutions faster to meet business needs as they arise. In certain scenarios, like when real-time data streaming is implemented, containers are the only way to provide the scalability that the application needs. Regardless of the infrastructure on site, in the cloud, or a mix of both.

## Conclusion

Now you should have a better understanding of how the Portenta X8 works with factories and containers. This article also gives a better picture of how to utilize the Portenta X8 to its full potential. Be sure to check out our other tutorials with the Portenta X8 to see how to practically use factories and containers.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
beta: true
title: 'How To Build a Custom Image for Your Portenta X8'
position: 11
description: 'This tutorial teaches you how to compile a custom image for your Portenta X8'
difficulty: advanced
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
beta: true
title: 'How To Flash Your Portenta X8'
position: 16
description: 'This tutorial teaches you how to flash your Portenta X8 through USB'
difficulty: intermediate
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'Multi-Protocol Gateway With Portenta X8 & Max Carrier'
position: 14
description: 'This tutorial shows how to setup a multi-protocol gateway environment on Portenta X8 using Max Carrier'
tags:
- Containers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
beta: true
title: 'Portenta X8 Getting Started'
position: 2
description: 'Learn how to set up the Portenta X8'
difficulty: intermediate
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'Data Exchange Between Python on Linux and an Arduino Sketch'
position: 6
description: 'This tutorial will show you how to run a python application that exchanges data with an Arduino Sketch.'
tags:
- RPC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'Uploading Sketches to the M4 Core on Arduino Portenta X8'
position: 15
description: 'This tutorial explains how to upload Arduino sketches to the M4 core.'
difficulty: intermediate
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'Using FoundriesFactory Waves Fleet Management'
position: 4
description: 'Learn how to manage multiple Portenta X8 devices using FoundriesFactory fleet management tool, Waves'
difficulty: intermediate
tags:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading