Triggers Atomic ostree composes when Fedora updates/rawhide/branched repositories are updated.
You can also trigger composes via a command-line tool or Python API.
- Simple JSON configuration
- Compose trees in a lightweight systemd-nspawn container
- Dynamic atomic treefile generation
- Dynamic yum repo & mock configuration generation
- Seperate logfiles for each compose
- Python API
- A fedmsg consumer that can trigger composes when new repos are available
- A simple fedmsg-atomic-composer-cli command-line interface
- Ability to rsync trees locally and remotely
sudo yum -y install git rpmdevtools python-{devel,mock} rpmdev-setuptree
All of the configuration lives in the config.py in JSON format. You can define all of your releases like so:
config = {
'releases': {
'f21-updates': {
'name': 'f21-updates',
'repo': 'updates',
'version': '21',
'arch': 'x86_64',
# Here you define your OSTree treefile configuration
'tree': 'docker-host',
'treefile': {
'include': 'fedora-atomic-docker-host.json',
'ref': 'fedora-atomic/f21/x86_64/updates/docker-host',
'repos': ['fedora-21', 'updates'],
},
# The name of the mock container to build and maintain
'mock': 'fedora-21-updates-x86_64',
# The git branch to use in the `git_repo` for the parent
# treefile & repo configurations
'git_branch': 'f21',
# Add or overwrite yum repository name:urls. This lets you
# compose trees against your own repositories.
'repos': {},
}, …
./build.sh
$ fedmsg-atomic-composer-cli compose f21-updates
$ fedmsg-atomic-composer-cli releases
f21-updates
f21-updates-testing
rawhide
$ fedmsg-atomic-composer-cli releases --json
{'f21-updates': {'arch': 'x86_64',
'canonical_dir': '/var/lib/fedora-atomic/21',
'git_branch': 'f21',
'git_cache': '/var/lib/fedora-atomic/work/fedora-atomic.git',
'git_repo': 'https://git.fedorahosted.org/git/fedora-atomic.git',
…
To compose a tree via the Python API, all you need to do is pass the compose method a release dictionary from the config.py.
from fedmsg_atomic_composer.composer import AtomicComposer
from fedmsg_atomic_composer.config import config
release = config['releases']['f21-updates']
composer = AtomicComposer()
result = composer.compose(release)
systemctl enable fedmsg-atomic-composer
systemctl start fedmsg-atomic-composer
journalctl -f -u fedmsg-atomic-composer
note: | This requires having the fedmsg-relay package installed and the service running. |
---|
fedmsg-logger --modname 'bodhi' --topic 'updates.fedora.sync' --message='{"release": "21", "repo": "updates"}' --json-input
fedmsg-logger --modname 'compose' --topic 'rawhide.rsync.complete' --message='{"arch":"x86_64"}' --json-input
fedmsg-logger --modname 'compose' --topic 'branched.rsync.complete' --message='{"arch":"x86_64"}' --json-input