Sun Update Connection - Enterprise 1.0 User's Guide

Creating Complex Jobs

ProcedureTo Create a Simple Complex Job

This procedure is a specific example of executing Complex Jobs. This example is of a very simple job. You could follow it even if you have not yet created profiles, policies, and groups.

  1. Make sure the Jobs panel of the main window is open by choosing Jobs from the View menu.

  2. From the tool bar, click the New Job button.

    The New Job window opens.

  3. Name the job CheckAllHosts. In the description, type This job checks all hosts for missing dependencies.

  4. Select Simulate.

    This job will find any missing dependencies on any of the hosts and give you an idea of how long the actual job would take.

  5. In the Tasks tab, click Add Task and a task with:

    • Name: SingleCheck

    • Profile: Check System

    • Policy: Always ask me

    • Hosts: All Hosts

  6. Click OK in the Tasks tab.

    The SingleCheck task is added to the job.

  7. Click OK in the New Job window.

    The job is sent to all managed hosts. Each host will be checked to see whether it has any missing or conflicting dependencies.

  8. Check the progress of the hosts as they run the job, and the job log of each host when it is done.

    See To Monitor a Current Job.

    If the results of the simulation are satisfactory, rerun the job in Deploy mode. See To Rerun a Job.

    The DR finds a solution to fix any missing or conflicting dependencies. You will be asked to confirm the fixes before they are deployed. See To Confirm Tasks). On confirmation, the actions are carried out and all dependencies are fixed on all hosts.

ProcedureTo Create a Feature-Rich Complex Job

This procedure is a specific example of using the Complex Job feature. This example is of a more feature-rich job.

This example assumes the following:

  1. Make sure the Jobs panel of the main window is open by choosing Jobs from the View menu.

  2. Click the New Job button.

    The New Job window opens.

  3. Name the job: NFS Environment.

    In the description, type This job provisions NFS servers and NFS clients.

  4. Select Deploy.

    As the profiles are your own or the predefined profiles for system management, you have a good idea of what will be done on the hosts; you do not need to simulate the job before deploying it.

    Before anything is changed on any host, Sun Update Connection – Enterprise saves its inventory. If you do not like the results of the job, you can easily restore it to its previous inventory. See Restoring Managed Hosts.

  5. In the Tasks tab, click Add Task and a task with:

    • Name: IntegrityCheck

    • Profile: Check System

    • Policy: AutoFix

    • Hosts: nfs servers and nfs clients groups

  6. Click OK.

    The IntegrityCheck task is added to the job.

  7. Add another task:

    • Name: ProvisionNfsServer

    • Profile: NfsServer

    • Policy: Always ask me

    • Hosts: nfs servers groups

  8. Click OK.

    The ProvisionNfsServer task is added to the job.

  9. Add another task:

    • Name: NfsClient

    • Profile: NfsClient

    • Policy: Always ask me

    • Hosts: nfs clients groups

  10. Click OK.

    The ProvisionNfsClients task is added to the job.

    Now you have a job with three tasks: check hosts for missing dependencies, provision the NFS server profile on the nfs servers group, and then provision the NFS client on the nfs clients group.

    Let’s set a schedule for this job. If the job is run on a recurring basis, it will make sure that the hosts in the web servers group always comply with the web server profile. If they do comply, nothing is changed and the job finishes on success. If there has been an error in change management, the recurring run will find it.

  11. Open the Schedule tab.

  12. Select Recurring.

  13. Select Every Month.

  14. Select Day in week, and then select Monday.

  15. Set Earliest to 7:00.

    The job will now run every Monday, early in the morning. Let’s look at the job options now.

  16. Open the Options tab.

  17. Select Use secure components only.

  18. If you are the owner of the profiles and of the AutoFix policy, you can leave the Notify of changes option deselected. They cannot be changed by any other user.

  19. Select Accept changes before next run.

    If the requirements of an NFS server change, you need only change the profile once. This option ensures that the job will automatically use any changes you make to the profile.

    You now have a re-usable job, with multiple tasks to be run on multiple hosts in a specific order, according to what is relevant to the inventory, distribution, and hardware architecture of each managed host. The job has a schedule. You will be notified by email if there are any tasks to do or if a host goes down. The job options have been set to optimize this specific set of tasks. To execute the job, click OK in the New Job window.