Poudriere newbie question

Hi All,

This should be a very basic question I think...

Well, I just started learning Poudriere and have managed to set it up the first time. Now I am a bit confused considering my use case. Basically, I have few amd64 servers with more or less the same ports installed but with different make config options set for some of them. For eg nginx with a different set of make config options enabled.

Now my question is:
Do I need to create two separate Poudriere jails to compile these two "versions" (as in different configs) of nginx or is there a way out to do it using only one Poudriere jail?

Please let me know how I can do it the most optimal way using Poudriere.

Thanks in advance :)

- Nitin
 
I would be intrigued to know the reasoning behind requiring two differently configured version of www/nginx on your servers? I'm not saying there isn't a valid use case - I just don't know one and would like to be enlightened here - especially given that they are of the same architecture.

I tend to configure packages in a way that match my systems - but they are pretty much universal.
If I'd come across a situation where a particular machine would need a differently configured package I'd most likely just document that and build it locally on that machine.
 
Well just to avoid installing unnecessary nginx modules for each instance depending on what that server is meant to do. Some may have 3rd party modules installed, some don't.
 
Wouldn't it be easier for you to just have one repository/poudriere jail where nginx is built with dynamic module support (DSO option) and all the modules they all need to then only load what each machine really needs?

Sadly, it seems nginx port doesn't have options to mix both (static and dynamic) modules as Apache had in the past to embed (static) core/common modules.

Also, it wouldn't fit if third party modules have some heavy dependencies that you don't want to install on the machines that don't require it.

PS: these unwanted modules would still be installed but inactive

Else, the solution could be to have one jail/repository for common ports (everything except nginx) and one just for each possible nginx configuration? Each machine would come with 2 custom repositories: the common/shared one and the appropriate/specific nginx.
 
Wouldn't it be easier for you to just have one repository/poudriere jail where nginx is built with dynamic module support (DSO option) and all the modules they all need to then only load what each machine really needs?
Yes that is what I would have preferred. Lesser maintenance headaches, but automation should do the trick. Internal policies require us to only install what is needed per instance.
Else, the solution could be to have one jail/repository for common ports (everything except nginx) and one just for each possible nginx configuration? Each machine would come with 2 custom repositories: the common/shared one and the appropriate/specific nginx.
Yes that might just be what I will do. I thought I'll just ask before going ahead with it.

Thank you julp ??
 
I'm doing my own Poudriere studies these days, and I can tell you, poudriere-bulk(8) allows you to re-use the same jail to compile the same port with different option sets. Just be careful to name your options properly. Normally, your makefile options come just from /var/db/ports. poudriere(8), esp. CUSTOMIZATION section will tell you that you can either use that, or copy the 'option set' to /usr/local/etc/poudriere.d/ directory. That's what you need to be careful with when you name your sets. I got burned by that, and will be re-doing the whole thing from scratch in January.


(My use case is distilling all Plasma 5 and Frameworks ports into a list, use that list to compile only the relevant ports with ALL possible enabled options, and then keep ugrading just that). I got burned on several items in the setup, including null-mounting. Poudriere has many pitfalls, so it's important to keep up the 'It's gotta work!' attitude. ;)
 
The important part is not even the jail, but the repository in which your poudriere-built packages land. In the end, this is where you'll be pointing your # pkg to. :)
 
Back
Top