Open kvaps opened 5 years ago
qbec really wasn't built for packaging libraries for use by others so this use-case needs additional thought to design and implement. What you propose is a good first start but I can see it become really problematic when multiple such libraries are involved etc.
Gut feeling says that there should be some level of support to bundle qbec apps as a jsonnet bundle that can be consumed by a user via jb. There are some problems with this approach:
to be able to use bundled components out of the box they need to be in the components directory, otherwise people will have to write a wrapper to include the component libraries they install. This can potentially be solved by supporting multiple component directories instead of just one.
since qbec doesn't deal with how params are created, we need to either formalize this or write best practices providing options.
By the way, I've decided that symlinks can solve partially this problem:
Eg user can do:
git submodule add https://github.com/kvaps/some-qbec-application pkg/some-qbec-application
(cd components/; ln -s ../pkg/some-qbec-application/components/* .)
To link all the components from the parent repository.
Otherwise there is an opportunity to use helm for packing an applications. Repository with helm chart can be connected same way using git submodule, and rendered via std.native('expandHelmTemplate') funtion.
Hi, I have few cool projects and I want to share them with the community. I want to use qbec to provide set of end components of my application.
The problem is that I don't know how to package my application to provide it for end users without depriving of flexibility. I want to allow them to use the same components set and override their default parameters. At the same time, I want to provide the ability to easily update my components.
At the moment, the best implementation I've seen is how working hugo and hugo themes. Eg each hugo theme is repeats the hierarchy of the main site but in own folder. So you can easily add theme using
git submoudule
and immediately start using itI want something like this but for qbec. Eg. User runs:
And now he can see all the components provided by package:
After this he can add new own components by usual way just placing them into components of his project. So this way he don't need to modify parent repository. And he have simplicity of upgrade and for override default parameters.
What do you thinking about this? Maybe is there more elegant way?