|
|||||||||||||
|
1. Getting Started With the Automated Installer 2. Using the Automated Installer |
Creating the Manifest FilesIn the automated installer application, three kinds of manifest files are provided in each service; AI manifest files, SC manifest files, and criteria manifest files. These manifest files are XML files that provide specifications for client installation.
Default manifest files are included when you create an OSInstall service by using the installadm create-service utility. You can create additional manifest files by copying, renaming, and customizing an existing manifest file. Use the following procedure to customize your manifest files.
The following sections provide specific examples for each step in this process. Creating AI Manifest FilesAfter you have created a service, you can edit the default AI manifest files associated with that service to customize the properties of an installed client. Include the parameters that you need and omit parameters that are not needed for your custom file. See the following examples. Example 2-1 AI Manifest With All Fields Defined<ai_manifest name="example_with_all_defined">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
<target_device_type>SCSI</target_device_type>
<target_device_vendor>toshiba</target_device_vendor>
<target_device_size>20480</target_device_size>
<target_device_use_solaris_partition>true</target_device_use_solaris_partition>
</ai_target_device>
<ai_device_partitioning>
<partition_action>create</partition_action>
<partition_number>1</partition_number>
<partition_start_sector>200</partition_start_sector>
<partition_size>20480</partition_size>
<partition_type>191</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices>
<slice_action>create</slice_action>
<slice_number>4</slice_number>
<slice_size>20480</slice_size>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
</ai_pkg_repo_default_authority>
<ai_packages>
<package_name>SUNWcsd</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWcs</package_name>
</ai_packages>
<ai_packages>
<package_name>slim_install</package_name>
</ai_packages>
</ai_manifest>In the example above, all available fields are defined. The following summary explains the field specifications that are used in this example. Table 2-1 AI Manifest Parameter Specifications
<ai_manifest name="example1">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
</ai_target_device>
<ai_pkg_repo_default_authority>
<main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
</ai_pkg_repo_default_authority>
<ai_packages>
</ai_packages>
</ai_manifest>For many users a simple configuration, like the example above, is sufficient. Only the target disk name and the IPS repository with authority is defined. The automated installer chooses the disk, c0t0d0, and performs the installation using the default set of packages from the pkg.opensolaris.org repository. If your diskname is different, edit this file, changing c0t0d0 to your disk name. The manifest file also accepts an MPXIO name such as c0t0000002037CD9F72d0. You can also edit the repository information. If your IPS repository is pkg.mycompany.com and the authorization is mycompany.com, change pkg.opensolaris.org to pkg.mycompany.com and opensolaris.org to mycompany.com. Example 2-3 AI Manifests Assigned to IP Addresses<ai_criteria_manifest>
<ai_criteria name="IPV4">
<range>
010006068000
010006068255
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>The example above assigns the manifest files, ai_manifest1 and sc_manifest1, to clients in the IP address range of 10.6.68.0 to 10.6.68.255. Example 2-4 AI Manifest With a Target Disk Defined in Terms of Other Parameters<ai_manifest name="example3">
<ai_target_device>
<target_device_type>SCSI</target_device_type>
<target_device_size>20GB</target_device_type>
<target_device_vendor>EMC</target_device_type>
</ai_target_device>
<ai_pkg_repo_default_authority>
<main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
<ai_packages>
<package_name>
SUNWj6rt
SUNWmercurial
</package_name>
</ai_packages>
</ai_manifest>The example above can be used by a client that has an EMC disk of type SCSI with a size of at least 20 Gbytes. Two specific packages from the opensolaris.org repository, SUNWj6rt and SUNWmercurial, will be added to the installed image. Example 2-5 AI Manifest With Typical Fields Defined<ai_manifest name="useful_example">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
</ai_target_device>
<ai_device_partitioning>
<partition_action>delete</partition_action>
<partition_number>2</partition_number>
<partition_start_sector>16065000</partition_start_sector>
<partition_size>41943040</partition_size>
<partition_type>130</partition_type>
</ai_device_partitioning>
<ai_device_partitioning>
<partition_action>create</partition_action>
<partition_number>2</partition_number>
<partition_start_sector>16065000</partition_start_sector>
<partition_size>41943040</partition_size>
<partition_type>191</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices>
<slice_action>preserve</slice_action>
<slice_number>4</slice_number>
<slice_size>20480</slice_size>
</ai_device_vtoc_slices>
<ai_device_vtoc_slices>
<slice_action>create</slice_action>
<slice_number>0</slice_number>
<slice_size>12288</slice_size>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
<ai_packages>
<package_name>SUNWdhcs</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWdhcm</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWapch22</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWsqlite3</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWpysqlite</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWpython-lxml</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWpython-cherrypy</package_name>
</ai_packages>
<ai_packages>
<package_name>SUNWinstalladm-tools</package_name>
</ai_packages>
</ai_manifest>The example above defines a set of parameters that would often be needed for an automated installation. The following settings are specified.
For a complete summary of the AI manifest fields, see AI Manifest Parameters. Creating SC Manifest FilesThe SC manifest file provides system configuration specifications for the installed image. You can customize the configuration settings by editing the variable after value= for each of the properties. In the following SC manifest example, you could change the user name from “jack” to “mike” in the username property. <?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='profile' name='name'>
<service name='ai_properties' version='1' type='service'>
<instance name='default' enabled='true'>
<property_group name='ai' type='application'>
<propval name='username' type='astring' value='jack' />
<propval name='description' type='astring' value='default_user' />
<propval name='userpass' type='astring' value='jack' />
<propval name='rootpass' type='astring' value='opensolaris' />
<propval name='timezone' type='astring' value='US/Pacific' />
</property_group>
</instance>
</service>
</service_bundle>
Creating Criteria Manifest FilesThe criteria manifest file is the bridge that connects the AI manifest file and the SC manifest file with a client. The administrator uses the criteria manifest file to add an AI manifest to a service. The client sends its hardware characteristics to the install service and gets a manifest file that was assigned by the administrator. See the following examples of criteria manifest files. Example 2-6 Criteria Based on the Client MAC AddressThe following example assigns ai_manifest1 and sc_manifest1 to the client with MAC address 0:14:4f:20:53:94. Note that all MAC address pairs are two digits without colons. Remove the colons from 00:14:4F:20:53:94, and use 00144F205394. <ai_criteria_manifest>
<ai_criteria name="MAC">
<range>
00144F205394
00144F205394
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>Example 2-7 Criteria Based on the Client IP AddressThe following example assigns ai_manifest1 and sc_manifest1 to the client with IP address, 10.6.68.127. For an IP address, each octet between the dots must be three digits. For the manifest file, take 010.006.068.127 and remove the dots to use 010006068127. <ai_criteria_manifest>
<ai_criteria name="IPV4">
<range>
010006068127
010006068127
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>Example 2-8 Criteria Based on the Client IP Address RangeThe following example assigns ai_manifest1 and sc_manifest1 to clients in the IP address range, 10.6.68.0 to 10.6.68.255. <ai_criteria_manifest>
<ai_criteria name="IPV4">
<range>
010006068000
010006068255
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>Example 2-9 Criteria Based on the Client Memory SizeThe following example assigns ai_manifest1 and sc_manifest1 to clients with memory of at least 2 Gbytes. The None keyword is used to express no bounding value. <ai_criteria_manifest>
<ai_criteria name="MEM">
<range>
2048
None
</range>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>Example 2-10 Criteria Based on the Client ArchitectureThe following example assigns ai_manifest1 and sc_manifest1 to clients with an architecture of i86pc. <ai_criteria_manifest>
<ai_criteria name="ARCH">
<value>i86pc</value>
</ai_criteria>
<ai_manifest_file URI="./ai_manifest1.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>Example 2-11 Criteria Manifest Using Default AI Manifest and Custom SC ManifestIn the following example, you have this AI manifest file, default.xml. <ai_manifest name="default">
<ai_target_device>
<target_device_name>c0t0d0</target_device_name>
</ai_target_device>
<ai_device_partitioning>
<partition_action>create</partition_action>
<partition_number>2</partition_number>
<partition_start_sector>16065000</partition_start_sector>
<partition_size>41943040</partition_size>
<partition_type>191</partition_type>
</ai_device_partitioning>
<ai_device_vtoc_slices>
<slice_action>create</slice_action>
<slice_number>0</slice_number>
<slice_size>12288</slice_size>
</ai_device_vtoc_slices>
<ai_pkg_repo_default_authority>
<main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
<mirror url=""/>
</ai_pkg_repo_default_authority>
</ai_manifest>Note that the AI manifest file must be named default, or default.xml, as above. Otherwise, you must add criteria to the manifest file. A nondefault AI manifest file requires criteria. In this example, you also have a custom SC manifest file, sc_manifest1.xml. <?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='profile' name='name'>
<service name='ai_properties' version='1' type='service'>
<instance name='default' enabled='true'>
<property_group name='ai' type='application'>
<propval name='username' type='astring' value='jack' />
<propval name='description' type='astring' value='default_user' />
<propval name='userpass' type='astring' value='jack' />
<propval name='rootpass' type='astring' value='opensolaris' />
<propval name='timezone' type='astring' value='US/Pacific' />
</property_group>
</instance>
</service>
</service_bundle>You can use the following criteria manifest file to specify the default.xml file and the custom sc_manifest1.xml file. <ai_criteria_manifest>
<ai_manifest_file URI="./default.xml"/>
<sc_manifest_file name="AI" URI="./sc_manifest1.xml"/>
</ai_criteria_manifest>
Associating a Criteria Manifest File With an Existing ServiceThe client installations can be customized by assigning different manifests to different clients. The installadm add command enables you to assign a specific manifest to a client. Add the criteria manifest to the install service by executing the command as follows: installadm add -m manifest -n svcname
See the following example. Example 2-12 Assign Manifest to a Client
If you want to remove this AI manifest file from the service, use the following command. # installadm remove -m ai_manifest1 -n service_102508 |
||||||||||||
|