Configuring networking¶
Configure and test a local static network for your operating system (OS) image that enables the following wired network connection capabilities for your system on a chip (SoC):
- In-vehicle connectivity between electronic control units (ECUs)
- Wired vehicle-to-cloud (V2C) connectivity
- Connectivity for applications in the quality-managed (QM) partition
Images built with Automotive Image Builder have two network options:
- Dynamic Host Configuration Protocol (DHCP), which uses NetworkManager to dynamically assign IP addresses and is useful for development and testing
- A preconfigured static IP network setup, which uses the “nmstatectl –kernel” feature for efficient, daemon-less configuration
Prerequisites
- A custom OS image manifest that includes a containerized application in the QM partition
Procedure
-
Configure the static network for the entire operating system (OS):
-
In the
content:
portion of your manifest, configure the ports for your containerized QM applications by adding a drop-in file to/etc/containers/systemd/qm.container.d/
: -
In the
content:
portion of theqm:
section of your manifest, set publish ports for your containerized QM applications and add a subnet to prevent IP address conflicts and routing issues:Subnet, port, and static network configurations for an example NGINX QM containerqm: memory_limit: max: 10% high: 5% content: rpms: [] container_images: - source: docker.io/library/nginx tag: latest name: localhost/nginx add_files: - path: /etc/containers/systemd/nginx.container text: | [Container] Image=localhost/nginx PublishPort=8080:80 [Install] WantedBy=multi-user.target network: static: {}
-
To be able test the image after you build it, add ssh packages, and then enable the SSH service through
systemd
, and enableSSHroot
access:-
Add SSH packages to your manifest:
-
Enable the SSH service through
systemd
: -
Enable SSH
root
access:
-
Next steps¶
- Configure interprocess communications (IPCs) between your containers in the root partition and containers in the QM partition and across partitions.
- Encrypt your filesystem.
- Enable BlueChi orchestration.
- Build your automotive OS image with
kernel-automotive
or your custom kernel.