jack-broadway / vyos-modular

A build system for vyos that allows you to import local/external modules to customize the build
18 stars 5 forks source link

[RFC] A smattering of fixes and a few new features #5

Closed Ramblurr closed 11 months ago

Ramblurr commented 1 year ago

Hi @jack-broadway thanks for this great project!

I've got a few fixes and some new features. I would be happy to rebase this into smaller PRs if you are interested.

But I thought I would open this PR first to see if you are interested in my changes at all.

You can see me using my version in action over at my ramblurr/vyos-custom. Specifically check out the github action workflow for auto building images.

Fixes

I added a few fixes in order to get this working in a CI environment:

Features

There is one big feature and one smaller feature.

Small features: Only build vyos-core when necessary - this is handy as it speeds up the build quite a bit when vyos-core doesn't need to be patched.

Big feature:

I've formalized the module config yaml using the pydantic library and dataclasses. And also introduced a few more module config features: package_urls, vyos_build_script, and vyos_core_script.

All of these are documented in the README, and you can view samples of them in action at my two module repos:

Module Link
mellanox firmware tools https://github.com/Ramblurr/vyos-module-mft
gitops tools https://github.com/Ramblurr/vyos-module-gitops

Please give me your feedback!

jack-broadway commented 1 year ago

Thank you for this contribution! sorry i've been caught up with other work last week and will start working my way through this

jack-broadway commented 11 months ago

I've pushed out version 2 of the vyos-modular spec. This now uses Ansible to do the build customizations which should be able to accomplish what you were aiming for with this PR