Corrections and cleanup

This commit is contained in:
Robert Nesius
2016-08-29 22:39:01 -07:00
parent 320ba144cb
commit ae1cb3b607
+20 -13
View File
@@ -7,7 +7,7 @@ In the data center new machines are often landed in large groups. When dealing w
This bulk provisioning scenario is a variation on the Network Booting and installation scenario with some alterations to facillitate installing and configuring many hosts. The Clear Linux installer (Ister) was augmented to detect and find cloud-init configuration data during the install. If this data is found a cloud-init file is fetched and the host, after being rebooted by ister, uses micro config drive (ucf) to configure the host as directed by the cloud-init configuration file.
In our pilot of this workflow we used ucf to install the trust relationships for the host to be further managed by Ansible. The cloud-init configuration file was served by a simple little web-application that Ister knows how to query for host configuration data. This allowed us to power on one hundered machines, each of which picked up the Clear Linux installer via PXE, installed Clear Linux, rebooted, and came up ready to be managed through Ansible.
In our pilot of this workflow we used clear-cloud-init (which in the future will become ucf - micro config drive) to install the trust relationships for the host to be further managed by Ansible. The cloud-init configuration file was served by a simple little web-application that Ister knows how to query for host configuration data. This allowed us to power on one hundered machines, each of which picked up the Clear Linux installer via PXE, installed Clear Linux, rebooted, and came up ready to be managed through Ansible.
The web application that serves cloud-init configurations to Ister is uninspiringly named "Ister Cloud Init Service" (ICIS), and is available at github - https://github.com/clearlinux/ister-cloud-init-svc
@@ -22,9 +22,9 @@ The following diagrams illustrate the system architecture.
:align: center
:alt: pxe-server-overview
As can be seen, ICIS is a web application (specifically a Flask application, hence managed by uwsgi under nginx) that can really run anywhere visible to hosts booting from PXE, though in our example we simply hosted it on the same system serving the pxe content.
As can be seen, ICIS is a web application (specifically a Flask application, hence managed by uwsgi under nginx) that can really run anywhere visible to hosts booting from PXE. In our example we simply hosted it on the same system serving the pxe content.
The following diagram illustrates the flow of information between the pxe server and a host booting into the installer via pxe.
The following diagram illustrates the flow of information between the pxe server and a host booting into the installer via pxe. This diagram is intended to show the logical flow of information, and is not a literal depiction of the protocol-level exchanges.
.. image:: _static/images/icis_installer_workflow.png
:align: center
@@ -41,7 +41,9 @@ Here is a high-level overview describing setting up and configuring a bulk provi
* Generate the installer that will load and boot over PXE. Copy the relevant files into the appropriate location on the iPXE server.
Use the `create_pxe.sh <https://github.com/bryteise/ister/blob/master/create_pxe.sh>`_ script to make this easy. Note this creates the pxe-installer from the "provision" installer in Clear Linux which is a touchless installer that takes all installation information from a config file. You can get this image from a given Clear Linux release by looking in https://download.clearlinux.org/releases/XXXX/clear/ where XXXX is a Clear Linux release number. Just download the image alongside the create_pxe.sh script and name it provision.img.
A pxe installer is generated for every release of Clear Linux OS. It can be found alongside the published images in https://download.clearlinux.org/releases/XXXXX/clear/clear-XXXXX-pxe.tar.xz
Alternatively use the `create_pxe.sh <https://github.com/bryteise/ister/blob/master/create_pxe.sh>`_ script to roll your own. Note this creates the pxe-installer from the "provision" installer in Clear Linux which is a touchless installer that takes all installation information from a config file. You can get this image from a given Clear Linux release by looking in https://download.clearlinux.org/releases/XXXX/clear/ where XXXX is a Clear Linux release number. Just download the image alongside the create_pxe.sh script and name it provision.img.
* Stage config files for ister that will govern Ister's behavior. This includes modifying the ipxe boot script to pass an additional parameter to the kernel.
@@ -67,20 +69,25 @@ Here is a high-level overview describing setting up and configuring a bulk provi
.. code-block:: console
{
"DestinationType" : "virtual",
"PartitionLayout" : [ { "disk" : "installer.img", "partition" : 1, "size" : "64M", "type" : "EFI" },
{ "disk" : "installer.img", "partition" : 2, "size" : "2G", "type" : "linux" } ],
"FilesystemTypes" : [ { "disk" : "installer.img", "partition" : 1, "type" : "vfat" },
{ "disk" : "installer.img", "partition" : 2, "type" : "ext4" } ],
"PartitionMountPoints" : [ { "disk" : "installer.img", "partition" : 1, "mount" : "/boot" },
{ "disk" : "installer.img", "partition" : 2, "mount" : "/" } ],
"DestinationType" : "phyiscal",
"PartitionLayout" : [ { "disk" : "/dev/sda", "partition" : 1,
"size" : "64M", "type" : "EFI" },
{ "disk" : "/dev/sda", "partition" : 2,
"size" : "2G", "type" : "linux" } ],
"FilesystemTypes" : [ { "disk" : "/dev/sda", "partition" : 1, "type" : "vfat" },
{ "disk" : "/dev/sda", "partition" : 2, "type" : "ext4" } ],
"PartitionMountPoints" : [ { "disk" : "/dev/sda", "partition" : 1,
"mount" : "/boot" },
{ "disk" : "/dev/sda", "partition" : 2,
"mount" : "/" } ],
"Version": 6580,
"Bundles": ["kernel-native", "os-installer", "os-core-update", "os-core", "os-core-dev", "bootloader"],
"Bundles": ["kernel-native", "os-core-update", "os-core",
"bootloader", "sysadmin-hostmgmt", "openssh-server"],
"PostNonChroot": ["./installation-image-post-update-version.py"],
"IsterCloudInitSvc": ["http://192.168.1.1/"]
}
* Configure ICIS to map MAC addresses to role files appropriately. Note, it is possible to simply specify a "default" role for any unmatched MAC address, which is handy if all install targets are to be configured identically. Then create the role files, which are cloud-init configuration files.
* Configure ICIS to map MAC addresses to role files appropriately. Then create the role files, which are cloud-init configuration files. Note, it is possible to simply specify a "default" role for any unmatched MAC address, which is handy if all install targets are to be configured identically.
* Final pre-flight check. Assuming your iPXE server is at 192.168.1.1, all of the following urls need to be working.