edannenberg / kubler

A generic, extendable build orchestrator.
BSD 2-Clause "Simplified" License
158 stars 40 forks source link

Namespaces - Intended Git Repository for Management/Sharing #75

Closed berney closed 5 years ago

berney commented 7 years ago

I'm curious what the author(s) and other users of gentoo-bb would like to see for git management of namespaces.

I see that .gitignore has dock/* in it. When I went to add my namespace and images git complained and said I could override if I really wanted to. Is the idea that people will create a separate repository that's just for the name spaces? E.g.

cd dock/namespace
git init
cat > .gitignore <'END'
Dockerfile
rootfs.tar
builder/PACKAGES.md
END
git add .
git commit

So that the namespace is kept separate from (a fork of) gentoo-bb?

Or should we add an exception for our namespace to the root .gitignore: !dock/namespace or force with git add -f dock/namespace?

I'm thinking pros/cons of the two approaches...

Adding namespaces to forked gentoo-bb repo

Separate Repo for Personal Namespaces


I'm thinking that it might have just been convenient way for the main author to not share his private namespace whilst sharing his tool. But then that begs the question - your private repo is surely managed in a git repo...

Keeping the namespace in a fork rather than private stand-alone repo seems the best to me, unless I want to keep it private...

edannenberg commented 7 years ago

Is the idea that people will create a separate repository that's just for the name spaces?

Yep, that's how I handle internal images. With #61 this should be much clearer and less error prone as sane defaults are provided, including a proper .gitignore etc.

pro fork

build framework and repos all in one spot, if custom tweaks diverging from upstream are made specific to your use case to support your images, it's all together in one repo, clone it somewhere and away you go, you have everything you need.

A counter point would be using forks from other people on a regular basis or having to maintain a public and private repository, much cleaner with separate git repos that just contain the namespace.

on GitHub other users of gentoo-bb can easily find your fork and checkout your namespace/images for inspiration.

Yes and no, I feel a lot of active forks will add confusion and would rather encourage people to make PR's instead of maintaining there own fork. For major changes I would suggest creating your own "engine" implementation, with some clever sourcing you could probably sort of extend docker.sh for example, if you don't want to start from scratch. Or well, maintain your own fork, as always it depends. :stuck_out_tongue:

A prominent section in the docs showcasing other namespace repos with a short mission statement is def. planned, much nicer then sifting through a branch/fork tree. @azimut's arm adventures or your "ricer" project would be a nice testament to the flexibility of this project.

If upstream makes breaking / non-backwards compatible changes, you've saved your point in time at a known-good state where you have been working/testing, you can then pull and fix your stuff to work with latest version

Hmm don't really see a difference there. You can easily revert either way to last known working state? :thinking:

con fork

You need two repos before you're good to go, maybe gentoo-bb changes and your namespace repo becomes incompatible and then you need to either fix all your namespace to work on the latest version of gentoo-bb or you need to workout at what commit/date of gentoo-bb did your stuff namespace work.

That is the only downside yea, but you only clone gentoo-bb once, much like installing an application, and then just clone a bunch of namespace repos, so I think it's a small price. An alternative would be making the main build script available in the system path, which would of course require some sort of installation first. It's not much of gain IMO and a major downside to this is that you lose cross namespace interaction for builds, i.e. extending from an image in gentoo-bb from your own namespace. Well at least with the current implementation.


I'm thinking that it might have just been convenient way for the main author to not share his private namespace whilst sharing his tool. But then that begs the question - your private repo is surely managed in a git repo...

One of the main goals for this project was to have a central place where you can rebuild all images with a single build instruction, having all namespaces from different git remotes in a single umbrella project is much simpler and cleaner for this purpose then having to maintain x forks. And yes our internal namespace repos are indeed managed via git. :)

Keeping the namespace in a fork rather than private stand-alone repo seems the best to me, unless I want to keep it private...

I can see the convenience when you only have to manage one git remote, past that forks are not very appealing to me.

berney commented 7 years ago

Great thanks for that. I had put my namespace in my fork. At the moment I've only committed the figlet ones, as the others are not working yet. After reading your comments, I think I'll make a new repo just for my namespace.

edit: I made https://github.com/berney/gentoo-bb-images

Yes and no, I feel a lot of active forks will add confusion and would rather encourage people to make PR's instead of maintaining there own fork.

This is true, I've been exploring the forks, seeing what people did and haven't managed to review/grok it all yet.

A prominent section in the docs showcasing other namespace repos with a short mission statement is def. planned, much nicer then sifting through a branch/fork tree. @azimut's arm adventures or your "ricer" project would be a nice testament to the flexibility of this project.

Great. Feel free to link it from docs and/or wiki if you start to make one. Or even upstream any you like.

I'm glad I asked this question now.

edannenberg commented 7 years ago

edit: I made https://github.com/berney/gentoo-bb-images

Haha, you know I was thinking about referencing that infamous "Gentoo is for ricers" post in the other issue but wasn't sure how well you would take it. :joy: Keep in mind that the project name will change in the near future. A not overly serious namespace name for your stuff that came immediately to mind is rrb, which obviously stands for rice rice baby. You are welcome. :stuck_out_tongue_closed_eyes:

Great. Feel free to link it from docs and/or wiki if you start to make one. Or even upstream any you like.

Will certainly do, I'm sure @jbergstroem will also keep a close eye on your repo.

I'm glad I asked this question now.

Anytime, a lot of the early discussions happened on IRC only.

berney commented 7 years ago

Haha, you know I was thinking about referencing that infamous "Gentoo is for ricers" post in the other issue but wasn't sure how well you would take it. πŸ˜‚

I love that post. I felt optimising figlet, that I'll likely never use, fitted into that theme and I was referencing it myself, so no offense lol.

Keep in mind that the project name will change in the near future.

Yeah, I noticed that, I figured when the name changes, I'll change my repos name to follow suit.

A not overly serious namespace name for your stuff that came immediately to mind is rrb, which obviously stands for rice rice baby. You are welcome. 😝

Good one.

edannenberg commented 5 years ago

Hopefully clearer now with the new documentation.