Get ostree based image with with embedded container going. Container doesn't start. Need to build qcow and then can update with repo, can't use kickstart.

This commit is contained in:
James Pace 2022-08-20 08:43:30 -04:00
parent 5b22a10316
commit 06b42edbb1
10 changed files with 69 additions and 169 deletions

View File

@ -1,2 +1,4 @@
*.json
!*.mpp.json
*.qcow2
repo/

View File

@ -25,3 +25,6 @@ mpp-vars:
- id: autosd-debug
baseurl: https://buildlogs.centos.org/9-stream/autosd/$arch/packages-main/debug/
distro_module_id: platform:el9
ostree_repo_url: http://192.168.1.107:8080/repo
ostree_ref: c9s/x86_64/edge
ostree_remote_name: edge

View File

@ -1,14 +0,0 @@
[Unit]
Description=Demo engine service container
Requires=routingmanagerd.socket
[Container]
Image=localhost/auto-apps
Volume=/run/vsomeip:/run/vsomeip
Exec=/usr/bin/engine-service
[Service]
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -1,15 +0,0 @@
[Unit]
Description=Demo radio service container
Requires=routingmanagerd.socket
Wants=engine.service
[Container]
Image=localhost/auto-apps
Volume=/run/vsomeip:/run/vsomeip
Exec=/usr/bin/radio-service
[Service]
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,15 @@
[Unit]
Description=ros core container
Wants=network-online.target
After=network-online.target
[Container]
Image=localhost/ros:noetic
Volume=/run/vsomeip:/run/vsomeip
Exec=roscore
[Service]
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,11 @@
FROM quay.io/fedora/fedora:latest
RUN dnf -y install nginx && dnf clean all
COPY ./hosting/nginx.conf /etc/nginx.conf
COPY ./hosting/edge.ks /usr/share/nginx/html/
ARG commit
ADD ${commit} /usr/share/nginx/html/repo
EXPOSE 8080
CMD ["/usr/sbin/nginx", "-c", "/etc/nginx.conf"]

View File

@ -0,0 +1,18 @@
lang en_US.UTF-8
keyboard us
timezone Etc/UTC --utc
text
ostreesetup --nogpg --osname=centos --remote=edge --url=http://192.168.1.107:8080/repo/ --ref=c9s/x86_64/edge
rootpw --lock
user --name=jimmy --groups=wheel --plaintext --password="password"
sshkey --username=jimmy "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHatbSn47a1Amv06Oap6Tfk7oWv4GLm2KJuz1uV41Egt jimmy@jimmy-7490"
%post --log=/root/ks-post.log
passwd -e jimmy
mkdir -p /etc/issue.d
echo "IP Address: \4" > /etc/issue.d/current-ip.issue
%end

View File

@ -0,0 +1,13 @@
events {
}
http {
server{
listen 8080;
root /usr/share/nginx/html;
}
}
pid /run/nginx.pid;
daemon off;

View File

@ -35,8 +35,6 @@ pipelines:
- mpp-eval: extra_repos
- - id: copr-quadlet
baseurl: https://download.copr.fedorainfracloud.org/results/alexl/quadlet/centos-stream-9-$arch/
- - id: copr-sample-apps
baseurl: https://download.copr.fedorainfracloud.org/results/alexl/cs9-sample-images/centos-stream-9-$arch/
packages:
mpp-join:
- mpp-eval: base_rpms
@ -45,8 +43,6 @@ pipelines:
- - podman
- quadlet
- curl
- vsomeip3-routingmanager
- auto-apps
excludes:
- dracut-config-rescue
- type: org.osbuild.copy
@ -69,9 +65,9 @@ pipelines:
origin: org.osbuild.source
mpp-resolve-images:
images:
- source: registry.gitlab.com/centos/automotive/sample-images/demo/auto-apps
tag: latest
name: localhost/auto-apps
- source: docker.io/library/ros
tag: noetic-ros-core
name: localhost/ros:noetic-ros-core
options:
destination:
type: containers-storage
@ -87,31 +83,16 @@ pipelines:
type: org.osbuild.files
origin: org.osbuild.source
mpp-embed:
id: radio.container
path: ../files/radio.container
inlinefile2:
type: org.osbuild.files
origin: org.osbuild.source
mpp-embed:
id: engine.container
path: ../files/engine.container
id: ros-core.container
path: ../files/ros-core.container
options:
paths:
- from:
mpp-format-string: input://inlinefile/{embedded['radio.container']}
to: tree:///etc/containers/systemd/radio.container
- from:
mpp-format-string: input://inlinefile2/{embedded['engine.container']}
to: tree:///etc/containers/systemd/engine.container
mpp-format-string: input://inlinefile/{embedded['ros-core.container']}
to: tree:///etc/containers/systemd/ros-core.container
- type: org.osbuild.locale
options:
language: en_US.UTF-8
- type: org.osbuild.users
options:
users:
guest:
password:
mpp-eval: guest_password
- type: org.osbuild.systemd
options:
enabled_services:

View File

@ -1,114 +0,0 @@
version: '2'
mpp-vars:
name: developer
pipelines:
- mpp-import-pipelines:
path: include/build.ipp.yml
- name: rootfs
build: name:build
stages:
- type: org.osbuild.kernel-cmdline
options:
root_fs_uuid:
mpp-eval: rootfs_uuid
kernel_opts:
mpp-eval: ''' '' .join(kernel_opts)'
- type: org.osbuild.rpm
options:
gpgkeys:
- mpp-eval: centos_gpg_key
- mpp-eval: redhat_gpg_key
disable_dracut: true
exclude:
docs: true
inputs:
packages:
type: org.osbuild.files
origin: org.osbuild.source
mpp-depsolve:
architecture: $arch
ignore-weak-deps: true
module-platform-id: $distro_module_id
baseurl: $distro_baseurl/BaseOS/$arch/os/
repos:
mpp-join:
- mpp-eval: distro_repos
- mpp-eval: distro_devel_repos
- mpp-eval: target_repos
- mpp-eval: extra_repos
- - id: osbuild
baseurl: https://download.copr.fedorainfracloud.org/results/@osbuild/osbuild/centos-stream-9-$arch
packages:
mpp-join:
- mpp-eval: base_rpms
- mpp-eval: image_rpms
- mpp-eval: extra_rpms
- - "@Development Tools"
# Some convenience packages
- bash-completion
- dnf
- emacs-nox
- less
- strace
- sudo
- vim
- git
- wget
- make
# Dependencies to build RPMs and images
- rpm-build
- hostname
- openssl-devel
- bc
- binutils-devel
- bpftool
- clang
- dwarves
- gcc-plugin-devel
- libcap-devel
- libcap-ng-devel
- libmnl-devel
- llvm
- net-tools
- numactl-devel
- osbuild-ostree
- osbuild-tools
- openssh-clients
- openssh-server
- perl-devel
- python3-devel
- python3-docutils
- rsync
- iputils
- iproute
- qemu-kvm
- fuse-devel
- kernel-rpm-macros
# Container tools
- podman
- buildah
- skopeo
excludes:
- dracut-config-rescue
- type: org.osbuild.locale
options:
language: en_US.UTF-8
- type: org.osbuild.users
options:
users:
guest:
password:
mpp-eval: guest_password
- type: org.osbuild.sshd.config
options:
config:
PermitRootLogin:
mpp-eval: ssh_permit_root_login
- type: org.osbuild.systemd
options:
enabled_services:
- NetworkManager.service
- rngd.service
- sshd.service
- mpp-import-pipelines:
path: include/image.ipp.yml