Go to main content

Customizing Automated Installations With Manifests and Profiles

Exit Print View

Updated: November 2020
 
 

Using System Configuration Profile Templates

Instead of creating multiple profiles for each client, use system configuration profile templates that offer more flexibility. These templates contain variables for property settings. During installation, the variables are replaced with actual values that are applied to the client. Variables enable you to reuse the profile templates for various install operations. For a list of available templates, see Templates for System Configuration Profiles.

To use system configuration profile templates, follow these steps:

  1. Create a profile template where property values are set to variables.

    Oracle Solaris has pre-defined templates on which you can base your own templates.

  2. Associate the profile with an install service.

  3. Run the installation.

Variables for System Configuration Profiles

The following table lists valid variables to be used in a system configuration profile template.

Variable
Description
AI_ARCH
Kernel architecture from uname –m
AI_CPU
Processor type from uname –p
AI_HOSTNAME
AI 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

Configuring Kerberos

A system configuration profile that includes Kerberos configuration information for an AI client should be created by the kclient command. Although the profile can be viewed, editing the file by hand is not suggested. For more information, see How to Configure Kerberos Clients Using AI in Automatically Installing Oracle Solaris 11.4 Systems.

Using a Configuration Template: An Example

In this example, the /export/hostandIP.xml is copied from the /usr/share/auto_install/sc_profiles/static_network.xml template and customized with values shown in bold:

  • nodename, group name, and ipv4-address have variable values.

  • prefixlen and gateway are assigned actual values.

    These values will be applied to all AI clients that use the profile.

<?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 name="network/ip-interface-management" version="1" type="service">
    <instance name="default" enabled="true">
      <property_group name="interfaces" type="application">
        <!-- interface configuration -->
        <property_group name="{{AI_NETLINK_VANITY}}" type="interface-ip">
          <property name="address-family" type="astring">
            <astring_list>
              <value_node value="ipv4"/>
              <value_node value="ipv6"/>
            </astring_list>
          </property>

          <!-- IPv4 static address -->
          <property_group name="v4" type="address-static">
            <propval name="ipv4-address" type="astring" value="{{AI_IPV4}}"/>
            <propval name="prefixlen" type="count" value="24"/>
            <propval name="up" type="astring" value="yes"/>
          </property_group>

          <!-- IPv6 addrconf address -->
          <property_group name="v6" type="address-addrconf">
            <propval name="interface-id" type="astring" value="::"/>
            <propval name="prefixlen" type="count" value="0"/>
            <propval name="stateful" type="astring" value="yes"/>
            <propval name="stateless" type="astring" value="yes"/>
          </property_group>

          <!-- default static route through interface -->
          <property_group name="route-1" type="static-route">
            <propval name="destination" type="astring" value="default"/>
            <propval name="family" type="astring" value="inet"/>
            <propval name="gateway" type="astring" value="203.0.113.1"/>
          </property_group>
        </property_group>
      </property_group>
    </instance>
  </service>
</service_bundle>

After saving the template file, you associate the profile with an install service.

$ installadm create-profile -n solaris11_4-i386 -f /export/hostandIP.xml

Suppose that you want to implement the hostandIP's configuration to the following client:

  • Node name: server1

  • IP address: 203.0.113.2

  • Datalink name: net0

  • Install service to use: solaris11_4-i386

During installation, the client's configuration is read and actual values replace the variables in the profile. In the case of server1, the following variable replacements occur in hostandIP.xml:

  • Value of nodename becomes server1 to replace AI_HOSTNAME.

  • Value of name for the IP interface type becomes net0 to replace AI_NETLINK_VANITY.

  • Value of ipv4-address is 203.0.113.2 to replace AI_IPV4.