

Using CA AppLogicĀ® › Appliance Developer Guide › Appliance Kit › Appliance Cookbook › Blank Appliance
Blank Appliance
OS Install
The first step of this recipe is to prepare a vanilla OS installation. This can be done outside of CA AppLogic®, if desired, however in the example given here the iso2class utility command available in CA AppLogic® will be used to have the OS installed directly into a virtual machine.
- Prepare the install media for the new OS: Have it available either through http or through ftp (for example, could be a Linux distro directly from one of the public mirrors that hosts the ISO image), or copy the ISO image to the grid using sftp. In the latter case, store it in the /_impex directory on the grid controller.
- Access the grid shell in the GUI and enter the following command (modified as needed) at the grid shell prompt:
util iso2class app_name=my_new_os install_size=1G console_type=graphic iso_volume1=url-or-filename mem=512M
Note: Use help util iso2class to see all the options for the command. For example, if more than one install media image is needed or if login is required to access the image on the web.
The iso2class utility command creates and starts a new application, containing a single virtual appliance, which boots from the given install media image.
- Open a graphical VNC console to it from the Applications tab in the GUI.
Note: Even though the console is an emulated VGA with graphical capabilities, it is advisable to choose text-based install, if the OS provides one, especially if know that the GUI install is overly dependent on mouse usage. The mouse doesn't work very well over VNC.
- Do the OS install according to taste, taking care not to install more than could fit on the small volumes that were prepared for it. Keep the following in mind:
Important: Verify this after the OS install!) SSH server must be installed and set up to start on boot. It should have public key authentication enabled and root logins allowed. A version of the SSH server that is compatible with the OpenSSH format of authentication keys is necessary. See the appropriate APK Distribution Installation topics for any OS-specific notes regarding SSH setup. Note that to keep your OS safe, APK will automatically disable password-based SSH logins for root (applies to OpenSSH server only, if you have a different kind, it is recommended to disable password-based logins by ssh manually). Also, note the following:
- Do not set up more than one partition.
- Use of swap partitions is not recommended for appliances, but if desired, leave that step for later (when the image is ready and proven to run under CA AppLogic®). Do not set up swap partitions during install.
- The virtual appliance will start with two network adapters. Always leave the second one to be configured automatically by DHCP. If Internet access is needed, use the first of the network adapters and set it up with the bare minimum configuration necessary. If there is no need to access the Internet during installation, just leave the OS installer to configure the network automatically through DHCP. Note that any manual network setup done during install will not be kept beyond the install phase - once the image is ready, its network will be configured by APK.
- Do not install graphical tools / GUI, if at all possible. This will be a headless appliance, not a desktop
- Once the install is done, let the installer shut down the VM and reset it. It should reboot and start up with at least one of the network interfaces up and configured.
Note: The graphical console window may need to be closed and restarted.
APK Installation
Once the new OS is up and running, APK can be installed.
- Use the OS-provided tools to find out the IP address of the DHCP server that configured the second network interface; it should be in the form 10.x.255.254. This will be the IP address of the grid controller, from which APK can be downloaded into your new OS and installed.
- Use the OS-provided browser (at worst, you should have lynx), or if even that is not available, use wget. The list of downloadable files provided with CA AppLogic® can be found by opening this url from the newly-installed OS (use the IP address found above): http://10.x.255.254:8080/download/.
- Refer to the OS-specific APK installation guide to see which file(s) should be downloaded and installed. Follow any other instructions there on how to configure the OS for use as a virtual appliance and how to set up APK.
- When the setup is completed, shut down the OS and follow the prompts of the iso2class command - it will be waiting for confirmation that the OS install is done and then prompt for some additional information to complete the process.
Important: For Linux installs with the iso2class utility command:
The Linux versions of APK support only the para-virtual kernel. However iso2class creates an HVM class. If APK is installed during the OS setup while iso2class is still running, the application will fail to restart.
In addition, the boot volume of the application will be configured as a complete disk image, with a master boot record (MBR). While the volume is valid for booting the OS, the CA AppLogic® volume management commands cannot operate on it at the file level - commands, such as resize, fsck and others will not work.
To run the new OS running under CA AppLogic®, it must be converted to PV mode. You can then make the boot volume manageable.
Follow these steps:
- Open the application in the infrastructure editor and change it to Paravirtualized mode (Modify Boundary, General, Options).
- Set the boot device name to be /dev/hda. Use the ADL Class Descriptor item in the Appliance menu to edit the descriptor manually; find the line 'volume os_install' and change the value of dev to read 'dev = /dev/hda').
The new application can now be started and should work normally
To make the application boot volume manageable with the vol management commands, it should be converted to a plain partition image, without a master boot record.
Follow these steps:
- In the infrastructure editor, create a blank data volume in the new appliance, make it large enough to hold the OS.
- Adjust the size chosen in the initial install, if needed.
- Edit the appliance boundary and add a new placeholder volume, with a device name /dev/hdb1, set the mount path to /mnt.
- Attach the new blank volume to the new placeholder, configure the placeholder volume (Appliance, User Volumes).
- Start the application and log into the appliance.
- Copy the entire OS boot volume to the new blank volume, For example:
cd / ; find . -xdev | cpio -p /mnt
- Stop the application.
- Remove the boot volume from the grid shell and put the newly-created blank volume in its place:
vol destroy myapp:iso2class.os_install
vol rename myapp:blankvol iso2class.os_install
- Open the Modify Boundary dialog again in the infrastructure editor, remove the placeholder volume, and change the boot volume's device name to /dev/hda1.
Copyright © 2012 CA.
All rights reserved.
 
|
|