Hey all.
I wanted to toss around some thoughts and concerns that I've been losing some sleep over lately. Any insight would be very much appreciated. WARNING: LONG
In the past three years, I have created a lot of FreeBSD boxes, and we now have around 40 of them (mostly 8.4, some 9.2) which is only rising. There is also some Ubuntu here and there, which feels sorta-FreeBSD-ish to me. All run misc applications.
I think we are doing a fair job at keeping the FreeBSD boxes in the air. I use a 'template' FreeBSD image with all our commonly used ports and configuration for quick installs. The FreeBSD base is easy to keep up-to-date. Applications are all installed through ports. I have machines send their
It runs okay. For now. But with the number of servers growing, I see trouble rising at the horizon, and I wonder if some of you can give me some insights and experiences.
Some of the problems I see in the future are the following:
1) Keeping packages updated consistently.
Custom compiling ports at their bleeding edge used to be my main reason to become interested in FreeBSD, when operating systems based on binary packages were often lagging updates and having dependency issues. Many years later, I'm afraid this choice turns out not to scale that well. Building ports simply takes so long, and the process involves some manual fixing from time to time. The result is that I find it hard to keep all ports recent all the time. I focus on security vulnerabilities, and the rest is lagging. I really would like to increase consistency by keeping all machines on the same versions, but with ports on 40 machines it could be a full-time job.
Comments: I think going forward, I must simply stop building ports from source. That implies getting rid of nonstandard make options. At this point, being consistent and stable is better than having super tweaked ports. But I'm not experienced in running FreeBSD without ports. People say that pkg is going to make it better. Is it viable to live completely on binary packages from the project repository, in the way that is common on Debian/Ubuntu for instance? Or is it best to create package building infrastructure? (How much time is generally spent on setting that up and keeping it working?) What would be a good way to coordinate pushing updates to servers? I wonder how large installations handle updating their packages consistently and safely? Do they build packages themselves, test and then during a maintenance window push them out?
2) Major version upgrades.
In 2015, we will see the end of extended support for FreeBSD 8.x. While minor updates with freebsd-update are completely trouble-free, I dread doing the suggested
Comments: I have tried this procedure on a few boxes and don't see it as really desirable. Currently I just do a clean install, have people test it, and migrate data. This can mostly be done during business hours. But that is still an enormous amount of work. I guess it partly reduces to my ports problem: if we could quickly reinstall all packages, a lot of the time and risk of major upgrades would go away. At the other hand, there is Ubuntu which has 5-year LTS versions, and that looks appealing, as at first sight it seems to lower the frequency of disruptive upgrades and it may be easier to outsource. So, I wonder what kinds of things people have considered in order to maintain larger numbers of servers over a long lifespan. Is FreeBSD the best choice in that scenario?
3) Managing configuration.
As I mentioned, I clone a template image to create a new machine. However this makes every box sorta-custom, having sorta-different versions of packages, with developers adding configuration fixes which aren't always retroactively applied to old machines (especially if they are low-priority but potentially dangerous). It's not that bad for production, but it's suboptimal for management. Some port specific parts of /usr/local/etc that change often I keep updated in git.
Comments: I wondered for a long time what people were doing to solve this problem, but now I've been looking at Puppet for some weeks, and I think such a system is the way to go. It seems not a lot of people are using Puppet with FreeBSD, but it probably can be done, and we can start it in a simple way and then expand it as more custom configuration is needed. I think also I need to ditch my template FreeBSD image with all its customizations over the years. It's monolithic and a big unknown. It's also not compatible with many public clouds which don't offer loading custom templates. It's better to start off each machine from a published FreeBSD iso. Then through Puppet I should install the minimum of packages and configuration which are needed, and at known versions. Does that sound reasonable?
Concluding
So, these are some of my thoughts and concerns. To sum it up, I think basically my current way of working is not future-proof, and I am preparing for a big operation to completely overhaul it before FreeBSD 8.4 goes EOL. There are really many unknowns, but there is still time. I hope some of you can share your experiences, and if my thinking is off, PLEASE let me know
Cheers!
semafoor
I wanted to toss around some thoughts and concerns that I've been losing some sleep over lately. Any insight would be very much appreciated. WARNING: LONG
In the past three years, I have created a lot of FreeBSD boxes, and we now have around 40 of them (mostly 8.4, some 9.2) which is only rising. There is also some Ubuntu here and there, which feels sorta-FreeBSD-ish to me. All run misc applications.
I think we are doing a fair job at keeping the FreeBSD boxes in the air. I use a 'template' FreeBSD image with all our commonly used ports and configuration for quick installs. The FreeBSD base is easy to keep up-to-date. Applications are all installed through ports. I have machines send their
pkg_info output to a central host so I know what versions are running.It runs okay. For now. But with the number of servers growing, I see trouble rising at the horizon, and I wonder if some of you can give me some insights and experiences.
Some of the problems I see in the future are the following:
1) Keeping packages updated consistently.
Custom compiling ports at their bleeding edge used to be my main reason to become interested in FreeBSD, when operating systems based on binary packages were often lagging updates and having dependency issues. Many years later, I'm afraid this choice turns out not to scale that well. Building ports simply takes so long, and the process involves some manual fixing from time to time. The result is that I find it hard to keep all ports recent all the time. I focus on security vulnerabilities, and the rest is lagging. I really would like to increase consistency by keeping all machines on the same versions, but with ports on 40 machines it could be a full-time job.
Comments: I think going forward, I must simply stop building ports from source. That implies getting rid of nonstandard make options. At this point, being consistent and stable is better than having super tweaked ports. But I'm not experienced in running FreeBSD without ports. People say that pkg is going to make it better. Is it viable to live completely on binary packages from the project repository, in the way that is common on Debian/Ubuntu for instance? Or is it best to create package building infrastructure? (How much time is generally spent on setting that up and keeping it working?) What would be a good way to coordinate pushing updates to servers? I wonder how large installations handle updating their packages consistently and safely? Do they build packages themselves, test and then during a maintenance window push them out?
2) Major version upgrades.
In 2015, we will see the end of extended support for FreeBSD 8.x. While minor updates with freebsd-update are completely trouble-free, I dread doing the suggested
portupgrade -f on every box. Rebuilding all ports generally takes around 4-6 hours, takes some manual attention, and feels somewhat experimental on every different box. Most important is the long maintenance time though.Comments: I have tried this procedure on a few boxes and don't see it as really desirable. Currently I just do a clean install, have people test it, and migrate data. This can mostly be done during business hours. But that is still an enormous amount of work. I guess it partly reduces to my ports problem: if we could quickly reinstall all packages, a lot of the time and risk of major upgrades would go away. At the other hand, there is Ubuntu which has 5-year LTS versions, and that looks appealing, as at first sight it seems to lower the frequency of disruptive upgrades and it may be easier to outsource. So, I wonder what kinds of things people have considered in order to maintain larger numbers of servers over a long lifespan. Is FreeBSD the best choice in that scenario?
3) Managing configuration.
As I mentioned, I clone a template image to create a new machine. However this makes every box sorta-custom, having sorta-different versions of packages, with developers adding configuration fixes which aren't always retroactively applied to old machines (especially if they are low-priority but potentially dangerous). It's not that bad for production, but it's suboptimal for management. Some port specific parts of /usr/local/etc that change often I keep updated in git.
Comments: I wondered for a long time what people were doing to solve this problem, but now I've been looking at Puppet for some weeks, and I think such a system is the way to go. It seems not a lot of people are using Puppet with FreeBSD, but it probably can be done, and we can start it in a simple way and then expand it as more custom configuration is needed. I think also I need to ditch my template FreeBSD image with all its customizations over the years. It's monolithic and a big unknown. It's also not compatible with many public clouds which don't offer loading custom templates. It's better to start off each machine from a published FreeBSD iso. Then through Puppet I should install the minimum of packages and configuration which are needed, and at known versions. Does that sound reasonable?
Concluding
So, these are some of my thoughts and concerns. To sum it up, I think basically my current way of working is not future-proof, and I am preparing for a big operation to completely overhaul it before FreeBSD 8.4 goes EOL. There are really many unknowns, but there is still time. I hope some of you can share your experiences, and if my thinking is off, PLEASE let me know
Cheers!
semafoor