Giter VIP home page Giter VIP logo

cloudflared-remote-access-layer's Introduction

Enapter Industrial Linux - Layer Example

This repository provides an example of how to create a custom layer for Enapter Industrial Linux. The example layer includes a systemd service and a Docker container.

About Enapter Industrial Linux

Enapter Industrial Linux (EIL) is a robust and minimalistic Linux distribution optimized for industrial IoT and embedded devices.

Key Features

  • Reliable and Secure: Utilizes an overlayfs with a SquashFS root image for read-only root, aiding in system stability and reliability.

  • Power Failure Tolerance: System files are read-only, reducing the risk of corruption during power failures.

  • USB Stick Boot: Easily boot from a USB stick with a simple FAT32 partition.

  • Service Discovery: Built-in service for device discovery in the network.

  • Docker Integration: Easily run third-party programs and services inside Docker containers using Podman.

  • Flexible Layer System: Introducing the concept of layers for modular and scalable system enhancements. Add functionality using layers with systemd services, Docker containers, and more.

Requirements

To build the example layer, you need the following utilities installed. These require a Linux environment, Windows Subsystem for Linux (WSL) on Windows, or MacOS.

  • make utility: GNU Make

    Install on Ubuntu/Debian:

    sudo apt-get install make

    Install on Fedora:

    sudo dnf install make

    Install on MacOS (using Homebrew):

    brew install make
  • skopeo utility: Skopeo

    Install on Ubuntu/Debian:

    sudo apt-get install skopeo

    Install on Fedora:

    sudo dnf install skopeo

    Install on MacOS (using Homebrew):

    brew install skopeo
  • mksquashfs utility: Part of the SquashFS tools

    Install on Ubuntu/Debian:

    sudo apt-get install squashfs-tools

    Install on Fedora:

    sudo dnf install squashfs-tools

    Install on MacOS (using Homebrew):

    brew install squashfs

Custom Layers

Layers are SquashFS images containing additional software and services. Each layer has:

  • rootfs/: Directory structure overlaid on the root filesystem.

  • images/: Docker container registry for including pre-packaged containers.

Example Layer: Adding a Systemd Service and Docker Container

Layer Directory Structure

cloudflared-remote-access-layer/
├── rootfs/
│   ├── usr/
│       ├── lib/
│       │   ├── systemd/
│       │       └── system/
│       │           └── cloudflared-remote-access.service
│   ├── etc/
│       ├── systemd/
│       │   ├── system/
│       │       │   ├── default.target.wants/
│       │       │   │   └── cloudflared-remote-access.service -> /usr/lib/systemd/system/cloudflared-remote-access.service
│       │       │   └── multi-user.target.wants/
│       │       │       └── cloudflared-remote-access.service -> /usr/lib/systemd/system/cloudflared-remote-access.service
└── images/
    ├── # (Docker container registry structure will be created by 'skopeo copy')`

Build Process

  1. Prepare your USB stick:

  2. Create and deploy your layer:

    • Structure your layer as shown. Please check the Makefile in this repository as an example
    • Use mksquashfs to create the SquashFS image.
    • Copy the SquashFS image to the USB stick into layers/ directory (create it if not exists).
  3. Insert the USB stick and boot.

The system will boot, mount the USB in read-only mode, and overlay your custom layer to provide the additional functionality.

Conclusion

This example demonstrates how to extend Enapter Industrial Linux using custom layers. By leveraging the robustness of read-only filesystems and the flexibility of overlayfs, you can easily add new functionalities, such as systemd services and Docker containers, without modifying the core system files.

Support

For any questions, feel free to reach out to us at [email protected] or join our community on Discord.

cloudflared-remote-access-layer's People

Contributors

dimonzozo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

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.