With all the changes for the Strawberry April release mostly working now (I just need to generate the beta release now) and my PITA talk at the Go Open conference in Norway officially in the program, it's time again to try and make the next push on getting PITA running actual productive tests.
The good news is that I think I now have enough information together to generate live testing images. After some consulting with various sysadmin types, we've come up with the following.
To turn a system image into a PITA image, we'll be using a hook into SysV init.
This is in the form of an S98PITA that runs just before logins are enabled, but after networking and all services are running. And, more importantly, after the "injector" (payload) disk image has been mounted already.
The PITA init script will look for the image.conf config file in the root of the mount directory.
If the config file exists, the script assumes the system is running in testing mode, and will spawn the PITA::Image image manager object and run it, which will then do the testing or other task.
If the config file does NOT exist, the init script assumes that the image is being booted in "maintenance mode", and shortcut to null, allowing normal boot up of the system.
Obviously this only works with SysV Init, but that covers the scode of the initial OS we want to get running.
This solution does, however, allow a system image to be easily maintained and update, as you can just boot the image up as a regular VM and it should work completely normally.
Only if it discovers the payload does the system switch to fully automated mode, run the tests, then shut itself down.
You can see the current prototype of the init script here...
If you'd like to assist setting me up some images (since I'm not an amazing sysadmin) I'll try to hang out on irc.perl.org #pita as much as possible.
Any sysadmin one-off help to set up an OS image would be greatly appreciated.