The following procedures describe how to perform deployment tasks by using the Change Manager command-line interface. You can use the command-line interface to perform tasks such as importing Solaris Flash archives and performing updates.
To learn how to create folders and perform management tasks in the Change Manager repository, see Chapter 8, Maintaining the Change Manager Repository (Tasks). None of the procedures described in Chapter 8, Maintaining the Change Manager Repository (Tasks) are required to perform deployment tasks, though you might want to create a hierarchy of folders in the repository.
To learn how to create host groups and perform management tasks on the Change Manager topology, see Chapter 9, Maintaining the Change Manager Topology (Tasks). None of the procedures described in Chapter 9, Maintaining the Change Manager Topology (Tasks) are required to perform deployment tasks, though you might want to create a hierarchy of host groups in the topology.
The Solaris boot image is used to deploy software stacks to managed hosts.
The time required to import a file to the Change Manager repository depends on the size of the file and the speed of the network.
For an initial installation, the managed host boots and mounts a small Solaris root. The root is contained in the boot image. Then, the managed host runs the installation program. For an update, the managed host runs the installation program, which is stored on the boot image.
Determine where the boot image exists and where to store it.
For example, copy the boot image from /net/test1/home/suzi/s9fcs to the / folder.
The path to the boot image must point to the top directory of the Solaris installation media. The installation media can be on a CD or on another system on the network. The top directory of the Solaris installation media contains the Copyright and installer files, and either the Solaris_8 or Solaris_9 directory. These directories contain the Solaris packages and the Solaris boot image.
If you import the boot image from a CD, point to the directory named something like /cdrom/Solaris version/s0. For example, the directory for a Solaris 9 boot image would be /cdrom/sol_9_sparc/s0.
Import a Solaris boot image to the Change Manager repository by using one of these changemgr import commands.
The following command line imports one file at a time. You can also use this command line to rename the file.
$ changemgr import [ -u username ] [ -p file ] filepath[.type] \ relfilepath.type |
The following command line imports several files to a folder simultaneously.
$ changemgr import [ -u username ] [ -p file ] filepath.type ... \ reldirpath |
Specify the user name to authenticate. If this option is not specified, the user is the current UNIX user.
file consists of a single line, which contains the password. If file is -, then the user can supply the password as standard input.
If the -p option is not supplied, then the changemgr command prompts the user for his password.
Specifies an absolute or relative path to a file. This file path is not within the Change Manager repository.
Specifies the path to a file, not including a folder, that is relative to the top of the Change Manager repository.
Specifies the path to a folder that is relative to the top of the Change Manager repository.
Specifies the file name suffix that represents the file type. A Solaris boot image uses the .miniroot suffix.
Choose a file name that indicates the versions of the Solaris operating environment the boot image supports. For example, create a boot image named Solaris9.miniroot.
Suzi copies the boot image from the /net/test1/home/suzi/Solaris_9 directory to the / folder. She calls the boot image Solaris_9.miniroot.
$ changemgr import /net/test1/home/suzi/Solaris_9 \ /Solaris_9.miniroot |
Suzi copies the boot images from the /net/test1/home/suzi/Solaris_9 and /net/test1/home/suzi/Solaris_8.202 directories to the /BootImages folder.
$ changemgr import /net/test1/home/suzi/Solaris_9 \ /net/test1/home/suzi/Solaris_8.202 /BootImages |
Import a Solaris Flash archive from another system, typically the master system on which it was created, on the network. This archive contains a software stack that can be deployed to managed hosts.
The time required to import a file to the Change Manager repository depends on the size of the file and the speed of the network.
Determine where the archive exists and where to store it.
For example, copy the archive from /net/test1/home/suzi/apache.flar to the web-server folder.
Import a Solaris Flash archive to the Change Manager repository by using one of these changemgr import commands.
The following command line imports one file at a time. You can use the command line to rename the file.
$ changemgr import [ -u username ] [ -p file ] filepath[.type] \ relfilepath.type |
The following command line imports several files to a folder simultaneously.
$ changemgr import [ -u username ] [ -p file ] filepath.type ... \ reldirpath |
Specifies the file name suffix that represents the file type. A shared profile uses the .flar suffix.
For descriptions of the other options, see How to Import Solaris Boot Images to the Change Manager Repository (Command Line).
Choose a meaningful name that indicates the type of archive. For example, create an archive named apache.flar.
Suzi copies the archive called /net/test1/home/suzi/apache.flar to the web-server folder. She renames the file to be Apache.flar.
$ changemgr import /net/test1/home/suzi/apache.flar \ /web-server/Apache.flar |
Suzi copies the archives called /net/test1/home/suzi/apache.flar and /net/test1/home/suzi/oracle.flar to the / folder.
$ changemgr import /net/test1/home/suzi/apache.flar \ /net/test1/home/suzi/oracle.flar / |
The shared profile describes how the managed hosts should be configured at deployment time. For a description of the shared profile's format, see Shared Profile.
If the shared profile contains a property with an invalid value, for example the value of base_config_flar_archive does not refer to an existing archive, then the import fails. Check the job queue (see How to View the Job Queue (Web Browser)) to determine whether the import failed. If the import failed, correct the property value and reinitiate the import operation.
The time required to import a file to the Change Manager repository depends on the size of the file and the speed of the network.
Determine where the shared profile exists and where to store it.
For example, copy the shared profile from /net/test1/home/suzi/apache.cmsp to the web-server folder.
Import a shared profile to the Change Manager repository by using one of these changemgr import commands.
The following command line imports one file at a time. You can also use this command line to rename the file.
$ changemgr import [ -u username ] [ -p file ] filepath[.type] \ relfilepath.type |
The following command line imports several files to a folder simultaneously.
$ changemgr import [ -u username ] [ -p file ] filepath.type ... \ reldirpath |
Specifies the file name suffix that represents the file type. A shared profile uses the .cmsp suffix.
For descriptions of the other options, see How to Import Solaris Boot Images to the Change Manager Repository (Command Line).
Choose a file name that indicates the unique features specified by the shared profile. For example, create a shared profile named apache.cmsp to configure the managed hosts that run the Apache web server.
Suzi copies the shared profile called /net/test1/home/suzi/apache.cmsp to the web-server folder at the top of the repository. She renames the file to be Apache.cmsp.
$ changemgr import /net/test1/home/suzi/apache.cmsp \ /web-server/Apache.cmsp |
Suzi copies the shared profiles called /net/test1/home/suzi/apache.cmsp and /net/test1/home/suzi/oracle.cmsp to the /MyProfiles folder.
$ changemgr import /net/test1/home/suzi/apache.cmsp \ /net/test1/home/suzi/oracle.cmsp MyProfiles |
To simplify naming of managed hosts, you can make each name match the name of the actual machine.
If you change the value of the AgentPort property after installing a managed host, the Change Manager server will no longer be able to communicate with it. To reestablish communication with the server by using the new agent port, you must re-initialize the managed host by performing an initial installation on it.
A managed host can be a client of only one Change Manager server. To change control of a managed host to another Change Manager server, see Internal error: unable to establish probe connection Appears When Running Jobs on Managed Hosts.
Determine where to create the managed host.
For example, create a managed host in the web-server host group.
Use one of these changemgr add commands to add the managed host.
The following command adds a managed host to be controlled by the Change Manager. A managed host can be created in a host group that is part of the Change Manager topology. hostpath is the full path name or relative path name to the managed host, which includes the host group hierarchy.
$ changemgr add [ -u username ] [ -p file ] [ -d domain ] \ hostname hostpath |
The following command adds the specified hosts to the specified host group. The topology names are the same as the host names.
$ changemgr add [ -u username ] [ -p file ] [ -d domain ] \ hostname ... grouppath |
Specify the user name to authenticate. If this option is not specified, the user is the current UNIX user.
file consists of a single line, which contains the password. If file is -, then the user can supply the password as standard input.
If the -p option is not supplied, then the changemgr command prompts the user for his password.
Specify the administrative domain on which to operate. In the context of a session, the default is the domain specified for the session. If no domain is specified, domain is the user's home domain. By default, domain is the user's home domain.
Specifies the network name of a host, for example, host1.yourcompany.com.
Specifies the path to a managed host that is relative to the top of the selected administrative domain.
Specifies the path to a host group that is relative to the top of the selected administrative domain.
Chris creates the host1 managed host in the web-server/apache host group.
$ changemgr add host1 /web-server/apache |
Chris adds the host1 managed host to the web-server/apache host group and changes the host name to Host1.
$ changemgr add host1 /web-server/apache/Host1 |
Chris adds the host1 and host2 managed hosts to the web-server/apache host group.
$ changemgr add host1 host2 /web-server/apache |
The initial installation must be initiated from each managed host to be installed.
Ensure that the managed hosts you want to install have been added to the Change Manager server.
Determine which managed hosts you want to install.
For example, install the /web-server/host1 and /web-server/host2 managed hosts.
Modify the shared profiles and host properties to reflect the configuration of the managed hosts.
To configure the managed hosts for reinstallation operations, configure one boot environment.
To configure the managed hosts for updates, configure two boot environments.
Set up the files for installation.
$ changemgr setup [ -u username ] [ -p file ] [ -d domain ] \ topopath ... |
Specifies the path to a managed host or host group. The managed host or host group is relative to the top of the specified administrative domain.
For descriptions of the other options, see How to Add Managed Hosts (Command Line).
If you modify the associated shared profile or host properties again before you perform the initial installation, you must recreate the JumpStart profiles. To recreate the JumpStart profiles, rerun changemgr setup before performing boot net - install.
Go to the console of each of the managed hosts to be installed and do the following:
Bring each managed host to the ok> prompt.
If the managed host is running, press Stop-A.
On each console, type boot net - install and press Return.
Be sure to include the space between the - and install.
Make sure that the managed host is only a network boot client of the Change Manager server.
The network boot of your managed host might fail with an error message such as Panic: unable to mount file systems. If such a message appears, then your managed host is probably being served by more than one network boot server. See Panic: unable to mount file systems Message Appears While Booting From the Network.
First use the Change Manager to perform an initial installation that creates a single boot environment before performing a reinstallation of a managed host.
Determine which managed hosts you want to reinstall.
For example, reinstall the /web-server/host1 and /web-server/host2 managed hosts.
Modify the shared profiles and host properties to reflect the configuration of the managed hosts to reinstall.
Reinstall the specified managed hosts.
$ changemgr reinstall [ -u username ] [ -p file ] [ -d domain ] \ topopath ... |
Specifies the path to a managed host or host group. The managed host or host group is relative to the top of the specified administrative domain.
For descriptions of the other options, see How to Add Managed Hosts (Command Line).
Suzi reinstalls the /web-server/host1 and /web-server/host2 managed hosts.
$ changemgr reinstall /web-server/host1 /web-server/host2 |
First use the Change Manager to perform an initial installation before using the Solaris Live Upgrade feature on a managed host. The initial installation creates two boot environments .
Determine which managed hosts you want to update.
For example, update the /web-server/host1 and /web-server/host2 managed hosts.
Modify the shared profiles and host properties to reflect the configuration of the managed hosts to update.
Update the specified managed hosts.
$ changemgr update [ -u username ] [ -p file ] [ -d domain ] \ [ -x operation ] topopath ... |
Specify the action to take after the update completes. If operation is reboot, then activate the newly installed software stack and reboot. If operation is halt, then activate the newly installed software stack and halt. The default operation is to reboot.
Specifies the path to a managed host or host group. The managed host or host group is relative to the top of the specified administrative domain.
For descriptions of the other options, see How to Add Managed Hosts (Command Line).
Suzi updates the /web-server/host1 and /web-server/host2 managed hosts. When the update completes, the managed hosts are rebooted to run the newly updated boot environment.
$ changemgr update /web-server/host1 /web-server/host2 |
Suzi updates the /web-server/host1 and /web-server/host2 managed hosts. When the update completes, the managed hosts are set up to run the newly updated boot environment. Then, the managed hosts are halted.
$ changemgr update -x halt /web-server/host1 \ /web-server/host2 |
The fallback operation "undoes" the last update attempt of a managed host, whether it finished or did not start.
For example, three managed hosts are updated one at a time. The update completes on the first managed host. Then, the update begins on the second managed host. When the first managed host boots the updated boot environment, you notice that there are problems with the system. You cancel the running update.
Each of the three managed hosts are in a different state. The first managed host completed the update. The second managed host started the update, but did not complete it. The third managed host did not start the update.
The fallback operation ensures that each of these managed hosts reverts to the boot environment running prior to the update attempt.
The fallback feature fails if the system cannot boot. In such cases, see " Solaris Live Upgrade (Overview)" in Solaris 9 Installation Guide.
Determine which managed hosts you want to fall back to the previous active boot environment.
For example, perform the fallback operation on the /web-server/host1 and /web-server/host2 managed hosts.
Fall back to the previous version of the software stack.
$ changemgr fallback [ -u username ] [ -p file ] [ -d domain ] \ topopath ... |
Specifies the path to a managed host or host group. The managed host or host group is relative to the top of the specified administrative domain.
For descriptions of the other options, see How to Add Managed Hosts (Command Line).
Suzi wants the /web-server/host1 and /web-server/host2 managed hosts to fall back to the previous active boot environment.
$ changemgr fallback /web-server/host1 /web-server/host2 |
Determine the managed hosts that you want to reboot.
For example, you can reboot the /web-server/host1 and /web-server/host2 managed hosts.
Reboot the managed hosts.
$ changemgr reboot [ -u username ] [ -p file ] [ -d domain ] \ topopath ... |
Specifies the path to a managed host or host group. The managed host or host group is relative to the top of the specified administrative domain.
For descriptions of the other options, see How to Add Managed Hosts (Command Line).
Suzi wants to reboot the /web-server/host1 and /web-server/host2 managed hosts.
$ changemgr reboot /web-server/host1 /web-server/host2 |
Determine the managed hosts that you want to halt.
For example, you can halt the /web-server/host1 and /web-server/host2 managed hosts.
Halt the managed hosts.
$ changemgr halt [ -u username ] [ -p file ] [ -d domain ] \ topopath ... |
Specifies the path to a managed host or host group. The managed host or host group is relative to the top of the specified administrative domain.
For descriptions of the other options, see How to Add Managed Hosts (Command Line).
Suzi wants to halt the /web-server/host1 and /web-server/host2 managed hosts.
$ changemgr halt /web-server/host1 /web-server/host2 |