Automated Deployment System
Creation of an Automated Deployment System
I designed the Elliot Labs Automated Deployment System (ELADS) to be a portable OS reinstallation tool with Ubuntu Server as the base system running off a Raspberry Pi 2. The goal was to create a system that would deploy a Windows installation with various applications and configurations automatically.
The task flow proceeds as follows:
- Boot to Windows PE via PXE
- Format the target computer’s disk(s)
- Install the OS
- Update the OS
- Configure Settings
- Install Applications
- Update the OS (post apps)
I created a system in the past that was completely Windows-based. The framework from which I originally built was the Microsoft Deployment Toolkit 2012 with WDS from my cloud server. This only worked from inside my computer lab and I wanted to use this technology when going to a client’s house. Unfortunately I did not have the budget to purchase a mobile server platform so I dropped the project.
After a relative gave me a Raspberry Pi 2 as a gift, I had some fun with it and realized, while building some web server infrastructure, that I would be able to build the MDT (2013 U2) setup on it. The first step that I took was to build a VM for configuring and the creation of the MDT tools. I used my previous MDT project as inspiration for the current version, keeping the good and throwing out the unneeded. Eventually the Deployment Share, the MDT output, was ready for initial testing.
Next came the hard part, how would I boot a WIM file directly from a Linux machine? I did some research and found a module for iPXE that was compatible with Syslinux: Wimboot. Wimboot allows the network booting of WIM images directly over PXE. This removed the need to boot ISOs over the network, streamlined the boot process and allowed machines with lower RAM allotments to network boot. Another nifty feature of Wimboot is that it is able to boot from any image index inside of a WIM file, meaning one can have multiple bootable images inside a single WIM file to save space.
After the PXE system was initially set up, I test booted the system on a computer but the boot times were absolutely atrocious. I did some research and it turned out that TFTP was a really slow protocol. Surprisingly, the PXELINUX project knew this and had added HTTP and FTP support to a special version of PXELINUX. After discovering this I created an Apache server with all the files that could be loaded after PXELINUX was initialized (The WIM images, ISOs, PNGs, etc…). After the PXELINUX executable loaded it streamed the larger files from the apache server. This dramatically decreased the boot times for all the devices that the PXE booted from the automated deployment server.
However MDT is not completely contained in the WIM image, it also lives on a file share. So after setting up the WIM booting system, next came the task of the file share. The file share was the easy part or so I thought. I was already familiar with a system called Samba. Samba happens to be a SMB/CIFS system for Linux, essentially Windows file sharing for Linux. I set up the deployment share folder and shared it using Samba. The only sticky part was getting MDT to apply the OS image because it kept failing. It turned out that I needed to “chmod g+s” the entire deployment share folder for it to play nicely with MDT. After that, the share worked admirably!
In conclusion the automated deployment system will allow me to reimage, reinstall the OS, on computers exponentially quicker than I have been able to in the past. Also as an added bonus, the system can reimage multiple computers at the same time with the possibility for hundreds of computers concurrently using multicasting. The system can also be used for application deployment, image capture as well as domain operations.
Syslinux – http://www.syslinux.org/
Samba – http://samba.org/
Raspberry Pi – https://www.raspberrypi.org/
Apache HTTPd – http://httpd.apache.org/
WIMBoot – http://ipxe.org/wimboot