How to Set Up Automated Installation Services for Oracle Solaris 11

by Isaac Rozenfeld

How to get started creating, customizing, and configuring systems using Automated Installer in Oracle Solaris 11.


Published May 2012

Overview of the Process
   Getting Started with Oracle Solaris 11
   What You Will Need
   What We Will Do
Implementing the Automated Install Server Environment
   Creating an Automated Install Server Using the Text-Based Installer
   Using Automated Installer to Create an Install Service
   Installing the Client Using the Default Manifest and Default Configuration
   Customizing the Default Manifest
Summary
See Also
About the Author

OTN is all about helping you become familiar enough with Oracle technologies to make an informed decision. Articles, software downloads, documentation, and more. Join up and get the technical resources you need to do your job.

This article illustrates how to create an initial system to host Oracle Solaris 11 installation services (known as an Automated Installer server), how to configure those installation services, and how to provision client systems with them.

Note: This article applies to Oracle Solaris 11 prior to release 11.1. An updated article, "How to Get Started Customizing and Configuring Systems Using the Automated Installer in Oracle Solaris 11.1," describes how to perform similar tasks on Oracle Solaris 11.1.

The Automated Installer is part of the new software deployment architecture introduced in Oracle Solaris 11. It simplifies installation, provides greater provisioning flexibility, and automatically ensures package dependencies. For more information about the features and benefits of this software deployment architecture, see Simplified Installation and Cloud Provisioning with Oracle Solaris 11.

Overview of the Process

Using the Oracle Solaris Automated Installer (AI) you can create and manage services to install the Oracle Solaris 11 operating system over the network in a hands-off manner.

Three significant steps are performed by various services during the installation process:

  • Assigning a network identity for the system being installed
  • Contacting the automated installation service to download over the network a small boot image and a description of how to provision a system
  • Provisioning the system over the network, including software and system configuration

Each of the steps can be performed by various services residing on the same physical or virtual system, or the services can be on separate systems. In this article, the following services reside on the same system:

  • DHCP service
  • Automated Installer service
  • Image Packaging System (IPS) repository service

Note: In environments in which DHCP is not permitted, there are alternate methods for getting the network identity to the system manually, such as through the use of network configuration arguments at the OpenBoot PROM (OBP) prompt on SPARC systems. It is possible to accomplish the installation by replacing the DHCP server with a step that otherwise provides a network identity to the client system. If your software is spread over multiple IPS repositories, it is also possible to install a system with software that is spread across multiple IPS repositories.

In this article, we will set up two Oracle Solaris 11 systems:

  • One system to host an Automated Installer environment for the purpose of installing other systems automatically
  • Another system to host a client system being installed

Installation of the first system will be performed interactively, while the subsequent installation of the second system will be automated.

Figure 1

Figure 1. Client System Installed by the Automated Install Server

Our first system, depicted on the left in Figure 1, will be used to install our installation environment, that is, the environment where we run our Automated Installer, IPS, and DHCP services. The second system, shown on the right in Figure 1, will be created and installed for the purpose of demonstrating automated installation.

After following the procedure in this article, you will have two systems configured as shown in Figure 1. The client system will be provisioned with a chosen installation profile, including the selected software and the system configuration.

Getting Started with Oracle Solaris 11

When you begin evaluating Oracle Solaris 11, you will probably start by installing a small number of systems interactively in order to familiarize yourself with new features and begin testing applications and administrative procedures on the operating system.

Oracle Solaris 11 offers two interactive installation options to choose from:

  • A desktop-oriented "LiveMedia" installation
  • A server-oriented text-based installation

Note: After the initial installation, you can add additional software components from network package repositories by using the Package Manager GUI or the pkg command.

In this article, we'll use the text-based installer to install the server system. The text-based installer already contains the Automated Installer package, so no additional steps for downloading and installing the Automated Installer package are necessary.

What You Will Need

Perform the following prerequisite steps:

  1. Choose two systems (physical or virtual) with at least 20 GB storage space for the server. If you're using a hypervisor technology, such as Oracle VM VirtualBox, to create a virtual machine, it is assumed that you are comfortable creating virtual machines.
  2. Chose an architecture (SPARC or x86) that corresponds to one of the two systems and download the following components for the Oracle Solaris 11 11/11 release:
    • The text-based installer's ISO image for the chosen architecture (x86 is used in this example)
    • The IPS repository (which is called the Oracle Solaris 11 11/11 Repository Image on the download page)

What We Will Do

In the remainder of this article, we will perform the following tasks:

  • Manual, interactive installation using the text-based installer and configuration of an Oracle Solaris 11 system—including the necessary services—to act as an Automated Install server
  • Creation of an installation service for a client system to be installed automatically
  • Actual installation of a client system, using defaults
  • Actual installation of a client after customizing some default parameters to reflect changes of interest

Note: This article concentrates on a subset of the tasks required to get the installation services up and running quickly. For a full discussion on all the steps involved in creating an Oracle Solaris Automated Install server and how you can configure all the attributes, see Part III, "Installing Using an Install Server," in Installing Oracle Solaris 11 Systems in the Oracle Solaris documentation library.

Implementing the Automated Install Server Environment

Now that we understand what we are trying to do, in this section, we will go through the steps shown in Figure 2, including command-line examples, to achieve our goal. While performing this procedure, refer to Figure 2 for a reminder of the "big picture" we are after. The client depicted in the middle uses all of the services shown.

The IPS repository and the DHCP server could be, and in our case are, on the install server. This simplifies things and requires us to configure less infrastructure.

Figure 2

Figure 2. Automated Installation Services

Creating an Automated Install Server Using the Text-Based Installer

We begin by installing the server using the text-based installation method.

During the installation process, you will answer basic questions pertaining to language preference, time zone, and disk partition information (we will opt to use the whole disk for our example). Then you will specify a root password, your name, a user name, and a user password, and you will choose to use automatic network discovery.

Perform the following steps to start the installation process:

  1. First, using the text-based installer's ISO image that you downloaded, either burn the contents to media (a DVD or a USB flash drive) or mount the image through hypervisor software such as Oracle VM VirtualBox (which is the case in our example).
  2. Boot from the text-based installer's image, and press the Esc key to display the menu. Highlight the first entry and press Enter to continue.

    Note: If you want to simply boot into the default menu selection (the first entry), pressing Esc is not necessary.

    Figure 3

    Figure 3. Choosing Which OS Image to Boot

  3. Choose the keyboard layout and language you would like to use during the installation, and wait for the system to boot.

    Figure 4

    Figure 4. Choosing a Keyboard Layout

  4. Select Install Oracle Solaris.

    Figure 5

    Figure 5. Choosing to Install Oracle Solaris

  5. From the Welcome screen, press F2 to continue.

    Figure 6

    Figure 6. Welcome Screen

  6. Make a disk selection and press F2 to continue. Usually, using the default will suffice.
  7. On the next screen, select use whole disk and press F2 to continue.

    Figure 7

    Figure 7. Selecting a Disk

Using the System Configuration Tool to Configure the System Interactively

Because no pre-provisioned system configuration files are available when we use the text-based installer, the System Configuration Tool starts up and prompts us for information.

Perform the following steps:

  1. Enter aiserver as the computer name and highlight Manually to manually configure the network. Then press F2 to continue.

    Note: We do not select it in this example, but if you were to select Automatically, you would not have to enter any network information. The configuration would be done for you.

    Figure 8

    Figure 8. Choosing to Configure the Network Manually

  2. Enter the network settings appropriate for your network and then press F2.

    Figure 9

    Figure 9. Specifying Network Settings

  3. We will not configure DNS at this time, so select Do not configure DNS and press F2.

    Figure 10

    Figure 10. Choosing Not to Configure DNS

  4. We will not set up a name service at this time, so press F2.

    Figure 11

    Figure 11. Choosing Not to Set Up a Name Service

  5. Select the time zone region appropriate for your location, and then press F2.

    Figure 12

    Figure 12. Choosing a Time Zone Region

  6. Select the appropriate date and time, and then press F2.

    Figure 13

    Figure 13. Specifying the Date and Time

  7. Complete your configuration by entering a root password, your name, a user name, and a user password. Then press F2.

    Figure 14

    Figure 14. Completing the Configuration

  8. Verify that the configuration you have chosen is correct and apply the settings by pressing F2.

    On the next screen, you'll see a progress bar indicating that the installation is proceeding. When the installation is complete, you will see a screen that summarizes the activity, and you will be prompted to reboot the system.

  9. Reboot the system.
  10. After the system reboots, log in using the user name credentials you created during the configuration process.
Verifying That the Network Has a Static IP Address

Before we proceed, verify that the network has a static IP address, as shown in Listing 1.

root@aiserver:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --

root@aiserver:~# ipadm show-addr
ADDROBJ     TYPE     STATE  ADDR
lo0/v4      static   ok     127.0.0.1/8
net0/v4     static   ok     192.168.1.222/24
lo0/v6      static   ok     ::1/128
net0/v6     addrconf ok     fe80::a00:27ff:fec0:3399/10

Listing 1. Verifying the Network Has a Static IP Address

Note: dladm and ipadm are new commands available in Oracle Solaris 11 for managing network configurations.

Creating a Local IPS Repository

By default, all Oracle Solaris 11 installations are configured to use a software package repository hosted at pkg.oracle.com. Administrators often choose to copy this repository locally due to network restrictions in their data centers or to improve the speed of client installations, or simply to give them better control over what software client systems have access to. In this article, we will construct a local IPS repository using the IPS repository image that you downloaded.

  1. First, take the IPS repository contents from the ISO file and place the contents into a location on the server's file system. To do this, create a ZFS file system named IPS to host the repository.

    Note the path under which the ISO image is mounted, as shown in the rsync command below. The rsync command will take some time to complete, because over 6 GB of data comprise the IPS repository image.

    root@aiserver:~# zfs create rpool/IPS
    root@aiserver:~# zfs set mountpoint=/IPS rpool/IPS
    root@aiserver:~# mkdir /IPS/Solaris11
    root@aiserver:~# rsync -a /media/SOL11REPO_175b_FULL/ /IPS/Solaris11/
    
  2. Now that the IPS repository has been created, instantiate it as a properly configured service. Since Service Management Facility is the Oracle Solaris facility for doing this, you can use the following commands to achieve this:

    root@aiserver:~# svccfg -s application/pkg/server setprop \  pkg/inst_root=/IPS/Solaris11/SOL11REP_175b_FULL/repo
    
    root@aiserver:~# svccfg -s application/pkg/server setprop pkg/readonly=true
    root@aiserver:~# svcadm refresh application/pkg/server
    root@aiserver:~# svcadm enable application/pkg/server
    
  3. Next, configure the system to use the locally configured IPS repository by using the pkg command to point the IPS client's solaris publisher to the same host (that is, itself, in our case):

    root@aiserver:~# pkg set-publisher -O http://192.168.1.222 solaris
    

Using Automated Installer to Create an Install Service

Now that you have a system that has an IPS package repository, let's create an instance of the Automated Installer services.

To complete this task, since we already created the Oracle Solaris 11 repository image locally and set it as the publisher to the Automated Install server itself, we can create the install service from the pkg://install-image/solaris-auto-install package, instead of having to download the .iso file separately. To do this, perform the following steps.

  1. Run the following command:

    root@aiserver:~# installadm create-service -n s11x86service -i 192.168.1.210 -c 1 
    

    Note: If you wanted to create a SPARC service, you would add the -a sparc argument to the previous command. Additionally, using the -n switch is optional, because the Automated Installer is intelligent enough to figure out the architecture of the service being created and to give it a name (if none is specified).

    This command will create a service named s11x86service and serve up DHCP clients starting with 192.168.1.210. The -c argument specifies that only one IP address should be allocated, and that's fine for our case, since we are interested in provisioning only one client system in this example.

  2. When prompted about using the default image path, answer y for yes.

    Creating the installation service causes the following to occur:

    • A local DHCP server instance is created on the Automated Install server.
    • A default installation service (named default-i386) is created.

    Note: In our example, we are working with the very first instance of a service, so we have to use the default service name when referencing modifications to the service later on. Keep this in mind, because there will always be a default installation service that is architecture-specific. When executing commands on services that were created first, the commands must reflect the name default-i386 instead of s11x86service.

  3. Check the install service's status by running the following command:

    root@aiserver:~# installadm list
    

Installing the Client Using the Default Manifest and Default Configuration

The next step is to boot the client system off the network and provision it using the Automated Install service that we just set up.

  1. First, boot the client system. Figure 15 shows the network boot attempt (when done on an x86 system):

    Figure 15

    Figure 15. Network Boot

    Then you will be prompted by a GRUB menu, with a timer, as shown in Figure 16. The default selection (the "Text Installer and command line" option) is highlighted.

  2. Press the down arrow to highlight the second option (for doing an automated install), and then press Enter.

    The reason we need to make this selection is because we want to prevent a system from being automatically re-installed if it were to be booted from the network accidentally.

    Figure 16

    Figure 16. GRUB Menu

    What follows is the continuation of a networked boot from the Automated Install server, as shown in Figure 17. The client downloads a mini-root (a small set of files in which to successfully run the installer), identifies the location of the Automated Install manifest on the network, retrieves the manifest, and then processes it to identify the address of the IPS repository from which to obtain images.

    Figure 17

    Figure 17. Continuation of the Network Boot

    As you watch the screen, you'll see that pkg.oracle.com is the default address of the IPS repository. In our case, however, we previously created a local IPS repository (default-i386), so our local IPS repository should be used to install the client system, as shown in Figure 18.

    Figure 18

    Figure 18. Local Repository Is Used Instead of the Default

    Some of the valuable information on the screen includes the location of log files and the XML manifest being used for this installation, as shown in Figure 18.

    The default IPS repository that is hard-configured in the default Automated Install manifest is hosted by Oracle and the XML code <origin name=> points to pkg.oracle.com. If your system is able to reach the Internet, your screen will indicate a successful installation.

    However, if your system is not be able to reach the Internet, the DNS resolution being done in the mini-root will fail and the system will be unable to contact the default IPS repository located at pkg.oracle.com, causing a failure message, as shown in Figure 19.

    Figure 19

    Figure 19. Failure Message

    In reality, this situation is not a big deal because internal IPS repositories will be built for most enterprise installations (as we did above), and most install clients use those instead of stepping out to the Internet and getting packages from pkg.oracle.com for every system that is installed. This brings us to the next section, which shows how to alter the default manifest to point to the internal IPS repository.

Customizing the Default Manifest

In order to modify the default manifest used by installation clients, we leverage the installadm command. Since we already have a service called s11x86service, what we need to do is reflected in the following three tasks:

  • Examine the manifest that the install service uses.
  • Modify the manifest.
  • Add the newly modified manifest to the install service.

Accomplish these tasks using the following procedure:

  1. First, get a list of the installation services and the manifests associated with them:

    root@aiserver:~# installadm list -m
    
    Service Name    Manifest      Status
    ------------    --------      ------
    default-i386    orig_default  Default
    s11x86service   orig_default  Default
    
  2. Then probe the s11x86service and the default manifest associated with it using the following command. The -m switch reflects the name of the manifest associated with a service. Since we want to capture that output into a file, we redirect the output of the command.

    root@aiserver:~# installadm export -n s11x86service -m orig_default > /var/tmp/orig_default.xml
    

    Since we want to modify the location of the IPS repository, we can edit the file and input our changes.

  3. Create a backup copy of the file under a different name, for example, orig-default2.xml, and edit the copy.
  4. Find the line that reads as follows:

    <origin name="http://pkg.oracle.com/solaris/release"/>
    
  5. Replace that line with a line that reflects our local IPS repository, for example:

    <origin name="http://192.168.1.222/solaris"/>
    
  6. Now that we've modified the XML file, we need to put it into effect.

    Typically (but not in this case), when we begin working with many services concurrently, the command to do that would be as follows:

    root@aiserver:~# installadm update-manifest -n s11x86service -m orig_default \ -f 
    /var/tmp/orig_default2.xml
    

    However, in our example, we are working with the very first instance of a service, so we have to use the default service name when referencing modifications to the service. Therefore, the only thing that would change in the command above is the name of the service would need to be default-i386 instead of s11x86service.

    So execute the following command instead:

    root@aiserver:~# installadm update-manifest -n default-i386 -m orig_default \ -f  /var/tmp/orig_default2.xml
    
Booting the Client Using the Customized Manifest

Prior to rebooting, you might want to log in and explore the system, looking at log files, such as the installation log file (/system/volatile/install_log) or the Automated Install manifest that was used to install the system (/system/volatile/ai.xml).

If you plan to log in before rebooting the system, the default Automated Install image user name is root and the password is solaris.

When you are ready, boot the client. As it boots, you'll see a process similar to what you've previously seen, but now it will not stop with a DNS error. Instead, it will proceed to contact the local IPS repository for packages that the manifest lists. As the process begins to look like Figure 20, notice the address in the origin line:

Figure 20

Figure 20. Booting the Client Using the Customized Manifest

There are many additional types of customizations that can be done to the Automated Install manifest. The guiding principle in instituting these changes is to follow the process outlined in the Customizing the Default Manifest section and remember to reflect the appropriate installation service names.

Once the installation is underway, it completes with the output shown in Figure 21.

Figure 21

Figure 21. Final Output

Augmenting the Installation with a Configuration File

When the system is rebooted, it looks for pre-provisioned configuration files. If it finds none, it invokes the System Configuration Tool. Earlier in this article, we saw how the System Configuration Tool works.

In order to fully automate the installation process, we can provision a configuration file that will be made available as part of the installation service. To do that, we first need to create a system configuration profile that contains all the minimum configuration data. Then we add this profile to the installation service that will be used by the clients of the service.

  1. Create the system configuration profile using one of the following methods:
    1. Use the sysconfig(1M) tool. The syntax could look like the following:

      root@aiserver:~# sysconfig create-profile -o sc.xml 
      

      This command runs the System Configuration Tool and guides you through the process of populating the relevant entries by answering questions. Once done, you can validate the resulting output profile by running it against the install service and specifying the profile file name, for example:

      root@aiserver:~# installadm validate -n default-i386 -P sc.xml 
      

      Note: For more examples, see "How to Configure Oracle Solaris 11 Using the sysconfig Command".

    2. Alternatively, use a sample profile that is delivered as part of the installation service. In the /export/auto_install/s11x86service/auto_install/sc_profiles directory, there is a file named sc_sample.xml. By inspecting this text file, you can see that it defines a number of parameters, such as the user name and a password, a password for root role, keyboard mappings, the time zone, the DNS configuration, and the network configuration. If you want to make changes to this file, you could copy it to a different location and then associate it with an installation service. In our case, we we do not need to make any changes, so you can accept the default system configuration parameters and skip to the next step.
  2. The second step involves adding the system configuration profile to an install service. We have to give the profile a name, and we need to remember what the file name is. Since we want to copy the original file—for example, to /var/tmp, and work with the resulting copy—do this:

    root@aiserver:~# cp  /export/auto_install/s11x86service/auto_install/sc_profiles/sc_sample.xml \ /var/tmp/sc_client.xml 
  3. Next, instantiate a profile with the install service. In our case, use the following syntax for doing this:

    root@aiserver:~# installadm create-profile -n default-i386 -f /var/tmp/sc_client.xml \  -p  sc_client  
    
  4. Now verify that the install service contains a custom system configuration profile associated with it by running the following command:

    root@aiserver:~# installadm list -p
    

    When you reboot the client from the network, you will witness the complete hands-off process of installing and configuring the system. You can then log in with credentials configured in the system configuration profile, such as user name jack (password jack), and you can elevate privileges by assuming the root role (password solaris) as necessary.

Summary

In this article, you learned how to create, install, boot, and configure a system using Automated Installer. You learned how an Automated Install manifest can be modified and how modifications can be put into effect automatically for you. You also learned how to add a local IPS repository and host it for all internally built systems in your environment without needing externally routable connectivity to systems that must be protected.

One of the greatest benefits of Automated Installer is its level of integration with the rest of the infrastructure in Oracle Solaris, such as the Image Packaging System, the System Configuration Tool, and the ZFS file system. This integration provides the ability to automate most of the provisioning so that the installation service ultimately is capable of doing more to get the system closer to an "application-ready" state. This is done by installing the system with a specific system configuration profile and a well-defined set of software packages and services, which provides a very fast, consistent, and scalable provisioning experience.

Additionally, when it comes to deploying a system with Oracle Solaris Zones, Automated Installer is capable of creating multiple zones that can be automatically installed using the same mechanisms used to install Oracle Solaris. (For more information on the subject of provisioning zones through Automated Installer, see the Oracle Solaris 11 Technology Spotlights Web page.)

A follow-on article is planned that will explain how to extend this capability to provision Oracle Solaris Zones via the Automated Installation process.

See Also

For more information and next steps, please consult these resources:

And here are some additional resources:

About the Author

Isaac Rozenfeld is a Principal Product Manager for Oracle Solaris and focuses on adoption, installation, and lifecycle management technologies. Isaac joined Oracle in 2010 as part of the Sun Microsystems acquisition.

Revision 1.1, 04/08/2013

See sysadmin-related content for all Oracle technologies by following OTN Systems on Facebook and Twitter.