Giter Site home page Giter Site logo

recordevolution / reswarmos Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 33.09 MB

A small, customized host operating system for IoT devices meeting the needs of Reswarm

License: Apache License 2.0

Shell 81.82% Dockerfile 0.96% Makefile 5.57% Python 3.33% Vim Script 0.10% Go 8.22%
iot reswarm raspberry-pi container minimal-linux embedded-linux embedded-devices

reswarmos's People

Contributors

contis2908 avatar dewitteruben avatar mario-fink avatar markope avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

reswarmos's Issues

Wifi not online after Raspi restart

Even though a wifi is entered it does not connect on boot. I have to plug in a LAN cable to get connection. Only then it switches to wifi.

On Wednsday I have a product presentation in front of two team leaders and others. This could decide the fate of Record Evolution in Conti.

ReswarmOS layer

use any "base" image, like i.a. ubuntu, Raspbian, arch, manjaro and turn it into a Reswarm(OS) compatible image by adding the "Reswarm layer" including addition of required dependencies, setup of services, etc.

Prepare an image for use as virtual machine in the cloud

A version has to be prepared for intel/amd.

See here what to take care of to use a custom image as the boot disk for gcloud instance:

https://cloud.google.com/compute/docs/import/import-existing-image?_ga=2.186626336.-867078282.1597174099#create_image_file

I created a bucket for holding the reswarm images already https://console.cloud.google.com/storage/browser/reswarmos;tab=objects?project=record-1283&prefix=&forceOnObjectsSortingFiltering=false

sshd configuration

employ security hardening configuration options to sshd_config by:

  • no root login
    -allow login only by users configured
  • allow login only on local subnet
  • etc.

container build

set up a docker container as environment for building the buildroot image

user and groups

set up proper user and groups, i.e. custom user including its own group, add custom user to sudoer list

interactive login

transition to support both Pi3 and Pi4 broke the interactive login (keyboard + screen) in commit d628776

reswarm user

create unix system user on first boot corresponding to Reswarm user the device belongs to

shell dashboard

provide some shell dashboard (e.g. triggered by motd.sh) showing:

  • network status
  • memory/disk/device status, free disk space
  • service status
  • ReswarmOS version/update status

reswarm os updater

implement update mechanism to avoid the need for reflashing a device with latest version of reswarmOS

restructure repo

clean up/simplify structure of repository focusing on buildroot

Pi 3 image

add image configuration for Raspberry Pi 3

update bundle certificate

avoid trying to install unverified update bundle because of expired certificate by either:

  • use certificate with unlimited validity ?! (=> no, probably not)
  • renew certificate during build/install process (only possible as long as certificate in charge on device is valid !?)
  • daemon on device to renew and issue new certificate!!

long terminal text doesn't wrap properly and makes second line unreadable

Seems to be like this on multiple terminal apps, (default mac one and iterm2)
I'm not 100% sure if this is OS related? Feel free to close if it isn't.

Just something I noticed while typing/copying long commands:
Example I used:
sudo ./reagent-linux-arm-7 -config demo_demo_swarm_TestDevice.reswarm -logFile /home/ruben/reagent.log -appsDirectory /home/ruben -debug

Result in terminal:
image

vim config

for every user provide default .vimrc config

automatic switching of WiFi

automatically switch between know (preconfigured) WiFi networks depending on availability, signal strength and range.

rootfs resizing

during very first boot perform rootfs resizing to adapt to overall disk size

Create a custom ReswarmOS builder front end.

Create a web front end that allows users to customize ReswarmOS for their purposes.

In a web frontend, they should

  1. Choose the CPU
  2. The desired drivers from a list
  3. Click "create ReswarmOS"

setup 'reagent' user

set up 'reagent' user with root privileges (instead of using root user) that runs the reagent for better customization of

  • process priorities
  • traffic control
  • permissions

fake-hwclock

employ fake hardware clock to provide approximately correct timestamp during early boot process

bluetooth support

Bluetooth is currently not setup, and not accessible/usable from within Docker
Not really urgent, would currently only be useful for hobby projects ๐Ÿ˜‹

use u-boot as bootloader

most of the updating frameworks (including RAUC, ostree) rely on a specific bootloader like i.a. u-boot

LTE device quirk

Setup:

  • The device has a working WLAN connection or has an Ethernet cable plugged in
  • An LTE device is plugged in, and is recognized by NetworkManager as 'connected'
    • However: The LTE device has no data left or has no reception

Problem:
It seems like the NetworkManager does not consider switching over to another interface since it assumes that when the stick is 'connected', it also has internet access
This results in, in this case, the agent unable to connect to RESWARM even though it is has a working Ethernet/WLAN connection

Unplugging the stick in this situation, forces the NetworkManager to switch to Ethernet or WLAN, and makes the agent come back online.

Ideal way this is solved:
The NetworkManager always uses an Ethernet or WLAN connection over the LTE device OR It is somehow detected if the stick has no service or has run out of data (if there's no valid connection) and the traffic is passed to any other available interface.

Possible solution:
Maybe the priority settings in the NetworkManager config can resolve this issue.
This would be resolved if the NetworkManager always switches over to either Ethernet or WLAN whenever that interface is available and connected.

Control docker daemon resource usage

reference: https://docs.docker.com/engine/reference/commandline/dockerd/

Add this to the docker daemon config

{
    "max-concurrent-downloads": 3,
    "max-concurrent-uploads": 5,
    "cpu-rt-period": 100000,
    "cpu-rt-runtime": 95000
}

Explanation for CPU config: https://www.kernel.org/doc/Documentation/scheduler/sched-rt-group.txt

So if I understand correctly it will reserve 5% CPU for non docker related tasks and is responsive at 100ms. (The params are to be given in microseconds)

NOOS fails to restart

successfully set up and first time started device does not come up again after restart

config in BOOT partition

all configuration must be done with configuration files in the boot (FAT32) partition since this is the only one that is also supported by Windows and macOS

docker insecure registries

setup docker insecure registries in /etc/docker/daemon.json and add any configured insecure regs provided in a reswarm file

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.