Packaging and Delivering Software With the Image Packaging System in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Tools for Software Self-Assembly

The following IPS features and characteristics facilitate software self-assembly.

Atomic Software Objects

An action is the atomic unit of software delivery in IPS. Each action delivers a single software object. That software object can be a file system object such as a file, directory, or link, or a more complex software construct such as a user, group, or device driver. In the SVR4 packaging system, these more complex action types are handled by using class action scripts. In IPS, no scripting is required.

Actions, grouped together into packages, can be installed, updated, and removed from both live images and offline images. A live image is the image mounted at / of the active, running boot environment of the current zone.

Actions are discussed in more detail in Package Content: Actions.

Configuration Composition

Rather than using scripting to update configuration files during packaging operations, IPS encourages delivering fragments of configuration files. The fragments can be used in the following ways:

  • The packaged application can be written to be aware of the file fragments. The application can access the configuration file fragments directly when reading its configuration, or the application can assemble the fragments into the complete configuration file before reading the file.

  • An SMF service can reassemble the configuration file whenever fragments of the configuration are installed, removed, or updated.

See Assembling a Custom File from Fragment Files for an example of creating a package that delivers a service that assembles configuration files.

Actuators and SMF Services

An actuator is a tag applied to any action delivered by the packaging system that causes a system change when that action is installed, removed, or updated. These changes are typically implemented as SMF services. See Chapter 7, Automating System Change as Part of Package Installation for more information about actuators.

SMF services can configure software directly, or SMF services can construct configuration files using data delivered in the SMF manifest or in files installed on the system.

SMF services have a rich syntax to express dependencies. Each service runs only when all of its required dependencies have been satisfied. See Managing System Services in Oracle Solaris 11.2 for more information about SMF services.

Any service can add itself as a dependency on the svc:/milestone/self-assembly-complete:default SMF milestone. Once the booting operating system has reached this milestone, all self-assembly operations should be completed.

A special type of zone called an Immutable Zone is a zone that can be configured to have restricted write access to portions of its file system. See the discussion of file-mac-profile in the zonecfg (1M) man page. To complete self-assembly in this type of zone, boot the zone read/write, as described in Options for Booting a Read-Only Zone With a Writable Root File System in Creating and Using Oracle Solaris Zones . After the self-assembly-complete SMF milestone is online, the zone is automatically booted to the required file-mac-profile setting.