Project Configuration¶
Overview¶
To initialize the config files and start a new project.
mkdir ~/iso_test
cd ~/iso_test
ryo-iso init
Note
By default, ryo-iso
will load iso.yml
from the current directory.
This can be overridden by setting RYO_ISO_CONF
to location of the
config file.
Project Configuration File¶
# ryo-iso config file
################################
# ISO Volume ID
name: RYO-ISO Example
# Base ISO image to rebuild
image: ubuntu/jammy
# Hardware Architecture
arch: amd64
# Base ISO Variant
# ['desktop', 'live-server']
variant: desktop
# APT subtasks
apt:
# add-apt-repository
repository:
- universe
# apt-get install
install:
- git
- python3-pip
# PIP subtasks
pip:
# pip3 install
install:
- doit
# QEMU Settings
qemu:
# VM disk size
disk_size: 10G
# Additional QEMU arguments
args: "-device usb-host,vendorid=0x20a0,productid=0x4108"
Parameters¶
Parameter | Description |
---|---|
image | The distro/version of the upstream ISO image The version can be specified as the codename, or in yy.mm or yy.mm.patch for Ubuntu |
arch | Target CPU architecture [‘amd64’,’i386’] |
variant | Upstream ISO variant [‘desktop’, ‘live-server’] |
name | Volume name of the generated ISO |
apt[‘repository’] | List of apt repositories to add. Internally [1] this
calls add-apt-repository within the chroot and
supports PPAs and custom repositories. |
apt[‘purge’] | List of packages to apt-get purge |
apt[‘install’] | List of packages to install via apt |
dpkg[‘install’] | List of packages install via dpkg -i |
pip[‘install’] | List of packages installed via pip |
pip[‘local’] | List of Python Wheels to install via pip
RYO_BUILD_DIR /python-wheels/ |
patch | Script to be run for final local customizations |
qemu[‘disk_size’] | Disk size for VM testing |
qemu[‘usb-host’] | USB pass-through for VM testing |
Examples¶
Image¶
# Image by codename
image: ubuntu/jammy
# Image yy.mm
image: ubuntu/22.04
# Image yy.mm.patch
image: ubuntu/22.04.1
apt[‘repository’]¶
apt:
repository:
# Copy sources.list from ${RYO_BUILD_DIR} into chrooted
# /etc/apt/sourced.list
# NOTE: This file is restored to the upstream version before building the ISO
- sources.list
# Copy ${RYO_BUILD_DIR}/sources.list.d/ros-latest.list into
# /etc/apt/sources.list.d
- sources.list.d/ros-latest.list
# Install PPA and repository key
- ppa:hxr-io/turtlebot
apt:
repository:
- universe
- multiverse
apt:
repository:
- deb [arch=amd64 signed-by=/usr/share/keyrings/repo-keyring.gpg] http://repo.example.org/ubuntu jammy main
- deb-src [arch=amd64 signed-by=/usr/share/keyrings/repo-keyring.gpg] http://example.org/ubuntu jammy main
patch¶
patch: setup_lang.bash
#!/bin/bash
cat << EOF | sudo chroot squashfs-root
check-language-support
apt install $(check-language-support)
EOF
Server Configuration File¶
# ryo-iso config file
################################
# Base ISO image to rebuild
image: ubuntu/jammy
# Hardware Architecture
arch: amd64
# Base ISO Variant
# ['desktop', 'server']
# variant: desktop
variant: live-server
# ISO Label
name: RYO Server Installer
# APT subtasks
apt:
# add-apt-repository
repository:
- universe
- deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
- deb [arch=amd64 signed-by=/usr/share/keyrings/repo-keyring.gpg] http://repo.example.org/ubuntu jammy main
# apt-get install
install:
- git
- python3-pip
# PIP subtasks
pip:
# pip3 install
install:
- doit
- ansible
patch: ./post.sh
Footnotes¶
[1] | See ryo_iso.tasks.main.task__squashfs_apt_repo() |