Closed rasa closed 10 years ago
I'm not aware of any code duplication. Oddly in some cases it seems you need purge the package cache twice to get ubuntu to clean up everything when you use deborphan. Once before the deborphan and once after
I split cleanup.sh into two files because nearly all the core Ubuntu templates should be JEOS (just enough os) before you install a config management tool, not all of them currently are, like the desktop and docker templates. So you'll notice that the desktop & docker templates call cleanup.sh, but don't call minimize.sh. That's the reason why there are two scripts (and also cleanup.sh is getting a bit long, but that wasn't the primary drivery)
Ultimately the plan is to refactor all the templates to be JEOS and then move all the rest into scripts for all the various config management tools. I'm not taking a purist stance on templates, I'm still all for creating images with various things beyond JEOS baked in (like Docker or a Desktop). I just want to leverage the power of the config management tools rather than continuing to rely on fragile bash scripts, as that's were all the current config management tools draw the line - they handle everything from the base OS up and assume a JEOS.
I just want to wait to do this JEOS refactor once when we have a better sense of what a JEOS template for should be for EVERYTHING - a JEOS that has all the things in common between VMs, cloud, containers and metal. I don't want to start this process prematurely basing it just on VMs like it is now.
Next steps on this front will be to take one OS and extend it out in that fashion - like try to do a template for a couple of the cloud providers, containers and a metal install.
As a sidebar note, for metal I'm looking at Hanlon (the original Razor reborn) as a possible candidate tool to write things around - http://osclouds.wordpress.com/2014/05/22/announcing-hanlon-and-the-hanlon-microkernel/ Source links: https://github.com/csc/Hanlon https://github.com/csc/Hanlon-Microkernel
Gotcha, I just had noticed that
dpkg --get-selections | grep -v deinstall
and
apt-get -y autoremove --purge
apt-get -y clean
apt-get -y autoclean
were repeated, so I assumed this was not intended.
Yeah the purpose of repeating the "dpkg --get-selections | grep -v deinstall” is to dump the list of packages before and after the minimization. Also in the case of the platforms that don’t call minimize, to at least get a list of packages. Now that we have a Jenkins for the box builds, I can look through those logs to find more patterns in the list of packages ;-)
I can add some more comments to the code to explain that...
On May 23, 2014, at 9:04 AM, Ross Smith II notifications@github.com wrote:
Gotcha, I just had noticed that
dpkg --get-selections | grep -v deinstall and
apt-get -y autoremove --purge apt-get -y clean apt-get -y autoclean were repeated, so I assumed this not intended.
— Reply to this email directly or view it on GitHub.
Perhaps
cleanup.sh
should have the removal of files, andminimize.sh
should just have the zeroing logic?