Updating an Existing Install Service
The update-service
subcommand updates the image associated with a service alias. The subcommand creates a new service with the updated image. The existing alias is reassigned to the new service.
The -p
option specifies a different repository for the image with which the service is updated. If the option is not specified, the same repository as when the service was first created is used. If you specify a publisher, then as an option, you can also specify the key and cert that are needed to create or update that service. See Example 4-15.
If the -s
option is not specified, the newest available version of the install-image/solaris-auto-install
package is used from the publisher.
Example 4-14 Updating an Install Service
Suppose that the following services exist in the AI server.
$ installadm list
Service Name Base Service Status Arch Type Ali Cli Man Pro
------------ ------------ ------ ---- ---- --- --- --- ---
default-i386 solaris11-i386 on i386 pkg 0 1 1 0
solaris11-i386 - on i386 pkg 1 0 1 0
You update the service:
$ installadm update-service -n default-i386 $ installadm list Service Name Base Service Status Arch Type Ali Cli Man Pro ------------ ------------ ------ ---- ---- --- --- --- --- default-i386 solaris11-1-i386 on i386 pkg 0 1 1 0 solaris11-i386 - on i386 pkg 1 0 1 0 solaris11-1-i386 - on i386 pkg 1 0 1 0
The new service with the updated image is solaris11-i386-1
and becomes the base service of the default-i386
alias.
Example 4-15 Using a Different Repository When Updating an Install Service
This example shows how to identify the publisher associated with the solaris11_4-i386
service. First type installadm list -v
to determine the image path for the service. Then use the image path to identify the current publisher.
Note that the option to specify the key or cert can be used with either the installadm update-service
command or the installadm create-service
.
$ installadm list -v -n solaris11_4-i386 Service Name Status Arch Type Alias Aliases Clients Profiles Manifests ------------ ------ ---- ---- ----- ------- ------- -------- --------- solaris11_4-i386 on i386 iso no 1 0 1 1 Image Path ........ /export/auto_install/solaris11_4-i386 .... $ pkg -R /export/auto_install/solaris11_4-i386 publisher PUBLISHER TYPE STATUS URI solaris origin online http://pkg.oracle.com/solaris/release/
This example updates the default service's publisher to example.com/solaris/mybuild
.
$ installadm update-service -n default-i386 \ -p solaris=http://example.com/solaris/mybuild \ ...[--key path-to-pem-formatted-key \ --cert path to pem-formatted-certificate ]
Example 4-16 Using a Different Net Image Package When Updating an Install Service
This example specifies a specific net image package.
$ installadm update-service -n default-i386 -s FMRI