Create profiles to record the requirements of your enterprise and deploy the profiles to automatically create servers and workstations. Creation and deployment of profiles takes minutes, handles dependencies, and ensures consistency.
For example, you create a profile called Web Servers which defines that your web servers are required to have the httpd client and server, and must not have anonFtp. You deploy the profile. Sun Update Connection – Enterprise installs the necessary components, uninstalls those you do not want, and automatically handles dependent components.
You can schedule a job to deploy the profile on a routine basis, such as once a month. It will make sure that everything that you want (httpd) is still installed and does not have dependency conflicts. It will make sure that anonFtp is not installed.
Sun Update Connection – Enterprise profiles focus on the component level. You select a component from the knowledge base inventory and then apply a setting to it. The component settings are described in the following table.
Table 9–1 Profile Component Settings
Setting |
Setting on Package |
Setting on Category/Package Group |
---|---|---|
Required |
If package is not installed, DR finds solution to install it. If installed, nothing is done. |
If at least one package is installed, nothing is done. If no package in category/group is installed, the one that is most cost-effective is installed. |
Not Allowed |
If package is installed, DR finds solution to uninstall it. If not installed, nothing is done. |
All packages within category/group are uninstalled. |
Upgrade |
If there is a newer version for an installed package, the package is upgraded. If the package is not installed, nothing is done. If there is more than one newer version, the most cost-effective is chosen. |
All packages within category/group are upgraded if newer versions exist. |
A profile is used as a single job. Its settings (Required, Not Allowed, Upgrade) affect a managed host only during the actual deployment of the profile. After you deploy a profile, you could run another job that contradicts the settings of the profile.
If you build a profile that has multiple Required and Not Allowed components, the Dependency Resolver (DR) may find a solution for the Required components that demands that a Not Allowed component be installed. If this happens, the DR rejects the solution and looks for another, one that will conform to both the Required and the Not Allowed settings.
In this procedure, you will create and save a new profile, to be used later in a job. Users of all levels can perform this procedure in the console. Other users see your profiles as read-only. They can deploy or copy your profiles; they cannot delete or edit them. This restriction applies to users of all levels.
Do one of the following:
Do one of the following:
From the drop-down list on the tool bar, select a distribution-architecture.
The Components list shows the components of the selected distribution.
Type a name for the profile and an optional free-text description.
In the Components list, select a component.
Assign a profile action to the selected component.
Do one of the following:
From the tool bar, click the Required, Not Allowed, or Upgrade button.
Right-click the selected component and choose Required, Not Allowed, or Upgrade.
The component setting appears in the Actions list of the Profile Editor.
To make the profile applicable to hosts of different distributions:
To select specific components from different distributions, change the selection of the drop-down list of distributions in the tool bar. Find the relevant components and add the action settings to the Actions list.
To let Sun Update Connection – Enterprise find components from other distributions that are comparable to the ones you have in the Actions list, click the Multi Distribution button. See To Align Component Settings for Multiple Distributions.
Click OK.
The Profile Editor window closes. The profile is created and appears in the Profiles window.
The CLI command to create a profile allows for only one component and its setting. See Add Profile Attribute (-apa) Command.
#! /bin/bash echo -n “Enter your user name:” read user echo -n “Enter your password:” read password echo -n “Enter a string to search for exact component name:” read comp2find uce_cli -fc -T $comp2find -u $user -p $password echo -n “Copy the exact component name that you want to add to a profile:” read comp2use echo -n “Enter the name of a profile or create a new one:” read profileName echo “What do you want to do with the component?” echo “Make it Required, Not Allowed,” echo “or Upgraded when possible?” echo -n “Enter the setting (-R | -N | -U) (case-sensitive):” read setting uce_cli -apa -P “$profileName” -T “$comp2use” $setting -u “$user” -p “$password” |
In this procedure you will edit an existing profile that you created. Users of all levels can perform this procedure in the console.
You cannot edit a profile in the following circumstances:
The profile was created by another user.
The profile is currently in an active job.
The profile is a Predefined System Test Profile (see Chapter 7, System Management Profiles).
If you edit a profile that is scheduled for later deployment, the users who deploy that profile decide whether to use the original profile or the edited one.
Do one of the following:
Select a profile from the list.
Do one of the following:
From the drop-down list on the tool bar of the Profile Editor, select a distribution-architecture.
The Components list changes to display components of the selected distribution.
Change as many component settings as you want.
See Table 9–1.
To add a component setting, select the component and do one of the following:
From the tool bar of the Profile Editor, click the Required, Not Allowed, or Upgrade button.
Right-click the selected component and choose Required, Not Allowed, or Upgrade.
To delete a component setting, select an action in the Actions list and do one of the following:
From the tool bar of the Profile Editor, click the Delete button.
Right-click the selected action and choose Delete.
To change a component setting, delete the action from the Actions list and then add a new action for the component setting you want.
Add as many component settings as you want.
To make the profile applicable to hosts of different distributions:
To select specific components from different distributions, change the selection of the drop-down list of distributions in the Profile Editor tool bar. Find the relevant components and add the action settings to the Actions list.
To let Sun Update Connection – Enterprise find components from other distributions that are comparable to the ones you have in the Actions list, click the Multi Distribution button. See To Align Component Settings for Multiple Distributions.
Click OK.
The Profile Editor window closes. The profile is edited.
The CLI command to edit a profile is the same as to create a profile. See To Create a Profile.
You can edit a profile that you created, even if you deleted it from the profiles list, so that future deployments or simulations of the profile will be different from the original profile. Use this procedure to change scheduled jobs.
You can edit scheduled profiles only when the following are all true:
The job that deploys/simulates the profile is scheduled for future runs.
The options of the job are set to automatically accept changes.
You are the owner of the profile.
The profile is not in a currently active job.
The profile is not a Predefined System Test Profile.
Make sure the Jobs panel is open in the main window by choosing Jobs from the View menu.
Select a job name in the Jobs list and then select one of the tasks that appear in the Tasks list.
Do one of the following:
Edit the profile as needed.
Click OK.
The Profile Editor window closes. The profile is edited for the next run of the job.
In this procedure you will copy an existing profile. Use this procedure when another user has created a profile that is useful to your own deployment and management jobs, but you want to be able to edit it. You could also use this procedure on your own profiles, to create a new profile based on a prior one. You cannot copy a Predefined System Test Profile (see Chapter 7, System Management Profiles). Users of all levels can perform this procedure in the console.
Do one of the following:
Select a profile from the list.
Do one of the following:
Edit the profile as needed, or simply change the name.
Click OK.
The Profile Editor window closes. A copy of the profile with the new name appears in the Profiles window.
The copy profile command in the CLI allows you only to save a profile under a new name, without making changes to the settings. See Copy Profile (-cp) Command.
#! /bin/bash echo -n “Enter your user name:” read user echo -n “Enter your password:” read password echo -n “Enter a string to search for exact component name:” read comp2find uce_cli -fc -T $comp2find -u $user -p $password echo -n “Copy the exact component name that you want to add to a profile:” read comp2use echo -n “Enter the name of a profile or create a new one:” read profileName echo “What do you want to do with the component?” echo “Make it Required, Not Allowed,” echo “or Upgraded when possible?” echo -n “Enter the setting (-R | -N | -U) (case-sensitive):” read setting uce_cli -apa -P “$profileName” -T “$comp2use” $setting -u “$user” -p “$password” |
You can copy any profile (except a Predefined System Test Profile), even if the owner deleted it from the profiles list or it is in a currently active job. Use this procedure to create new profiles from those used in jobs.
Make sure the Jobs panel is open in the main window by choosing Jobs from the View menu.
Select a job name in the Jobs list and then select one of the tasks that appears in the Tasks list.
Do one of the following:
Edit the profile as needed, or simply change the name.
Click OK.
The Profile Editor window closes. The profile with the new name is added to the Profiles window.
In this procedure, you delete a profile that you created. Users of all levels can perform this procedure in the console.
You cannot delete profiles in the following circumstances:
The profile was created by another user.
The profile is currently being deployed in an active job.
The profile is scheduled to be deployed, and the owner of the job selected that the job not be updated with profile changes.
Do one of the following:
Select a profile from the list.
Do one of the following:
In the confirmation dialog box, click Delete again.
The previous procedures explained how to create, edit, copy, and delete profiles, in general. This procedure is a specific example of a profile for a mail server.
To open the Sun Update Connection – Enterprise Console, type uce_console in a terminal shell and log in with a valid user name and password.
From the Tools menu, choose Profiles.
The Profiles window opens.
Right-click in the Profiles window and choose New.
The Profile Editor window opens.
From the drop-down list in the tool bar of the Profile Editor, select a distribution.
Give the profile a name.
For example, you might name the profile PostfixMailServer.
Type a description of the profile.
In the components list, find postfix, right-click it and choose Required.
See To Find Components for details on searching the Components list.
Required postfix appears in the Actions list.
Find sendmail, right-click it and choose Not Allowed.
Not Allowed sendmail appears in the Actions list.
Right-click in the Actions list and choose Multi-Distribution.
The Multi Distributions window opens. Your locally active distributions are listed. Those that are listed in green have a component match.
Click OK.
The Multi Distributions window closes. The Actions list in the Profile Editor now includes more actions for the additional distributions.
In the Profile Editor, click OK.
The Profile Editor closes. PostfixMailServer appears in the Profiles list.
To deploy the Mail Server Profile, see Chapter 11, Complex Jobs.