Go to main content

Installing Oracle® Solaris 11.3 Systems

Exit Print View

Updated: April 2019
 
 

Using System Configuration Profile Templates

Profiles can contain variables that are replaced with values from the AI client's installation environment during the installation process. In this way, a single profile file can set different configuration parameters on different AI clients. See Figure 17, Table 17, Variables for System Configuration Template Profiles for a list of variables you can use.

In the following example profile named hostIPnet.xml, AI_HOSTNAME is a placeholder for the AI clients host name, and AI_IPV4 is a placeholder for the AI clients IP address.

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="profile" name="sysconfig">
  <service name="system/identity" version="1" type="service">
    <instance name="node" enabled="true">
      <property_group name="config" type="application">
        <propval name="nodename" value="{{AI_HOSTNAME}}"/>
      </property_group>
    </instance>
  </service>
  <service version="1" type="service" name="network/install">
    <instance enabled="true" name="default">
      <property_group name="install_ipv4_interface" type="application">
        <propval name="name" value="net0/v4"/>
        <propval name="address_type" value="static"/>
        <propval name="static_address" type="net_address_v4" value="{{AI_IPV4}}/8"/>
        <propval name="default_route" type="net_address_v4" value="203.0.113.1"/>
      </property_group>
    </instance>
  </service>
</service_bundle>

The following command creates a system configuration profile in the install service that will be customized for each installation AI client without changing the input hostandIP.xml file.

# installadm create-profile -n solaris11_3-i386 -f /export/hostIPnet.xml

While the hostandIP.xml file remains unchanged, the profiles that are applied to an AI client are customized. For example, the hostandIP.xml profile might have the following content when a AI client with host name server1 is installed:

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="profile" name="sysconfig">
  <service name="system/identity" version="1" type="service">
    <instance name="node" enabled="true">
      <property_group name="config" type="application">
        <propval name="nodename" value="server1"/>
      </property_group>
    </instance>
  </service>
  <service version="1" type="service" name="network/install">
    <instance enabled="true" name="default">
      <property_group name="install_ipv4_interface" type="application">
        <propval name="name" value="net0/v4"/>
        <propval name="address_type" value="static"/>
        <propval name="static_address" type="net_address_v4" value="203.0.113.2/27"/>
        <propval name="default_route" type="net_address_v4" value="203.0.113.1"/>
      </property_group>
    </instance>
  </service>
</service_bundle>

The following table shows the variables that can be used as placeholders in template profiles.


Note -  Profile template variables are not supported in zones profiles.
Table 17  Variables for System Configuration Template Profiles
Variable Name
Description
AI_ARCH
Kernel architecture from uname –m
AI_CPU
Processor type from uname –p
AI_HOSTNAME
I client DNS name
AI_IPV4
IP version 4 network address
AI_IPV4_PREFIXLEN
Prefix length of the IPv4 network address
AI_MAC
Hexadecimal MAC address with colon (:) separators
AI_MEM
Memory size in megabytes returned by prtconf
AI_NETLINK_DEVICE
Name of network interface physical device
AI_NETLINK_VANITY
Default vanity name of network interface
AI_NETWORK
IP version 4 network identifier
AI_ROUTER
IP version 4 network address of the AI client's default router
AI_ZONENAME
AI client zone name