Skip to content

Docker Apertis Build setup #83

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .devcontainer/post-attach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ function azure-mount() {
# Second arg: Name of Azure container
azure-mount "azure-sstate-cache" "yocto-sstate-cache"
azure-mount "azure-downloads-cache" "downloads"
azure-mount "azure-debian" "debian"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ poky/
# Remote sstate-cache on Azure Storage
azure-sstate-cache/
azure-downloads-cache/
azure-*/
bitbake/

# BitBake Hash Equivalence Server database
Expand Down Expand Up @@ -82,3 +83,5 @@ resources/docker-snapshot/dockerfiles/leda-tests/log.html
resources/docker-snapshot/dockerfiles/leda-tests/output.xml
resources/docker-snapshot/dockerfiles/leda-tests/report.html

resources/debian/repo-root
resources/debian/private.pgp
121 changes: 121 additions & 0 deletions desiredstate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"name": "mike_test3",
"specification": {
"baselines": [],
"domains": [
{
"id": "containers",
"components": [
{
"id": "wiper-app",
"version": "edge",
"config": [
{
"key": "image",
"value": "ghcr.io/softwaredefinedvehicle/wiperpoc/wiperpoc:latest"
},
{
"key": "env",
"value": "SDV_MIDDLEWARE_TYPE=native"
},
{
"key": "env",
"value": "SDV_VEHICLEDATABROKER_ADDRESS=127.0.0.1:55555"
},
{
"key": "env",
"value": "SDV_MQTT_ADDRESS=mqtt://127.0.0.1:1883"
},
{
"key": "env",
"value": "SDV_SEATSERVICE_ADDRESS=127.0.0.1:30051"
},
{
"key": "network",
"value": "host"
}
]
},
{
"id": "ota-client",
"version": "v0.0.2",
"config": [
{
"key": "image",
"value": "ghcr.io/softwaredefinedvehicle/sdv-ota-client/ota-client:v0.0.2"
},
{
"key": "mount",
"value": "/etc/ota-client:/app/config"
},
{
"key": "mount",
"value": "/data/var/certificates:/app/config/certs"
},
{
"key": "mount",
"value": "/etc/ssl/certs:/app/config/ca-certs/"
},
{
"key": "mount",
"value": "/tmp:/tmp"
},
{
"key": "host",
"value": "mosquitto:host_ip"
}
]
},
{
"id": "vehicledatabroker",
"version": "v0.0.2",
"config": [
{
"key": "image",
"value": "ghcr.io/boschglobal/kuksa.val/databroker:0.0.2"
},
{
"key": "port",
"value": "55555:55555"
}
]
},
{
"id": "someip-feeder",
"version": "sha-3c4811b",
"config": [
{
"key": "image",
"value": "ghcr.io/softwaredefinedvehicle/kuksa.val.feeders.fork/someip-feeder:sha-3c4811b"
},
{
"key": "network",
"value": "host"
},
{
"key": "env",
"value": "BROKER_ADDR=127.0.0.1:55555"
}
]
}
],
"config": []
},
{
"id": "safetyApp",
"components": [],
"config": []
},
{
"id": "safetyEcu",
"components": [],
"config": []
},
{
"id": "selfUpdate",
"components": [],
"config": []
}
]
}
}
1 change: 1 addition & 0 deletions kas/common-kirkstone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ target: sdv-image-all
local_conf_header:
meta-leda: |
INHERIT += "rm_work"
PACKAGE_CLASSES += " package_deb"
INHERIT:remove = " archiver"
INHERIT:remove = " cve-check"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
Expand Down
2 changes: 2 additions & 0 deletions resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This folder containers additional resources for building and running Leda quickstart images using QEMU and Docker.

- `apertis`- For Leda develoeprs: Documentation how to install Leda stack onto an Apertis IoT Fixed Function image
- `debian`- For Leda develoeprs: Experiment to install Yocto-built Debian packages of Leda components into plain Debian docker images.
- `docker`- For users: Documentation explains how to start the Leda Quickstart Docker container
- `docker-compose` - For users: Documentation and docker compose setup, which starts multiple Leda containers including an update bundle webserver
- `docker-release` - For Leda developers: Building Leda docker container based on the latest public release of Leda (requires public release)
Expand Down
84 changes: 84 additions & 0 deletions resources/apertis/Dockerfile.apertis
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# syntax=docker/dockerfile:1
#
# /********************************************************************************
# * Copyright (c) 2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License 2.0 which is available at
# * https://www.apache.org/licenses/LICENSE-2.0
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
#

FROM debian:bullseye AS build

ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=Etc/UTC

LABEL name="leda-apertis-x86"

RUN echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/debian-bullseye-backports.list
RUN apt-get update
RUN apt-get install -y --no-install-recommends ca-certificates curl
RUN apt-get install -y -t bullseye-backports qemu-system-x86

RUN curl -o apertis.img.gz https://images.apertis.org/release/v2023/v2023.0/amd64/iot/apertis_v2023-iot-amd64-uefi_v2023.0.img.gz
RUN gunzip apertis.img.gz
RUN ls -al
RUN qemu-img convert -f raw -O qcow2 apertis.img apertis.qcow2

FROM debian:bullseye AS runtime

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
bind9-utils \
ca-certificates \
curl \
dnsmasq \
dnsutils \
iproute2 \
iptables \
iputils-ping \
isc-dhcp-server \
net-tools \
ssh \
sudo \
uml-utilities \
xz-utils \
sshpass

# Debian Bullseye contains QEMU 5.2
# RUN apt-get install -y --no-install-recommends qemu-system-x86

# Debian Bullseye-Backports contains QEMU 7.2
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/debian-bullseye-backports.list
RUN apt-get update
RUN apt-get install -y -t bullseye-backports qemu-system-x86

WORKDIR /root

COPY --from=build apertis.qcow2 /root/apertis.qcow2
COPY build/tmp/deploy/images/qemux86-64/ovmf.qcow2 /root/ovmf.qcow2

# Original runner and a temporary modified one ("...-x86.sh")
RUN mkdir -p /docker
COPY resources/apertis/dockerfiles/leda-apertis-docker-entrypoint-x86.sh /docker/
COPY resources/apertis/dockerfiles/leda-apertis-bootstrapper.sh /docker/
COPY resources/apertis/dockerfiles/leda-apertis-install-sdv.sh /docker/
RUN chmod a+x /docker/leda-apertis-docker-entrypoint-x86.sh
RUN chmod a+x /docker/leda-apertis-bootstrapper.sh
RUN chmod a+x /docker/leda-apertis-install-sdv.sh
ENTRYPOINT [ "/docker/leda-apertis-docker-entrypoint-x86.sh" ]

# Expose SSH access
EXPOSE 2222

# Expose MQTT broker: Eclipse Mosquitto
EXPOSE 1883

# Expose Eclipse Kuksa Databroker
EXPOSE 30555
Loading