Most organizations have compliance requirements for IT asset management. For example, system vulnerabilities must be fixed at the earliest opportunity to prevent attacks, and software packages must be up to date. To meet the compliance requirements, patch management is particularly important. CloudOps Orchestration Service (OOS) provides the Patch Management feature for Elastic Compute Service (ECS). The Patch Management feature allows you to scan for patches, install patches based on the default patch baseline, or specify a custom patch baseline.
Background information
The Patch Management feature can automatically update patches by using various types of updates such as security-related updates. Patch Management can manage patches in operating systems and applications. The Patch Management feature scans for or installs patches based on the default patch baseline of the operating system running on an instance that you select. For information about Patch Management and patch baselines, see How a patch manager works and Patch baseline.
Patch Management supports the Immediate Fix and Scheduled Fix modes in the scenarios that are described in the following table.
Patch management mode | Scenario |
Immediate Fix |
|
Scheduled Fix |
|
Prerequisites
The ECS instances for which you want to update patches must run operating systems that support the Patch Management feature. For more information, see the Supported operating systems section of the "Overview" topic.
The account that is used to update patches must have the following permissions. For more information, see Use RAM to grant permissions to OOS.
{ "Policy": { "Version": "1", "Statement": [ { "Action": [ "ecs:RebootInstance", "ecs:DescribeInvocationResults", "ecs:DescribeCloudAssistantStatus", "ecs:DescribeInstances", "ecs:DescribeInvocations", "ecs:RunCommand" ], "Resource": "*", "Effect": "Allow" }, { "Action": [ "oos:ListInstancePatchStates" ], "Resource": "*", "Effect": "Allow" } ] } }
Procedure
In this example, the Scheduled Fix mode is used to describe how to update patches. You can also update patches in Immediate Fix mode. For more information, see Immediate fix.
Log on to the CloudOps Orchestration Service (OOS) console.
In the left-side navigation pane, choose
. On the Patch Management page, click Scheduled Fix.In the Basic Information section, configure the parameters.
Take note of the following parameters. For information about other parameters, see the parameter descriptions displayed on the Scheduled Fix page.
Scheduled Task Type: The mode in which OOS updates patches on a schedule. For example, a patch update task is executed at 0:00:00 every day.
Fix Operations:
Scan: scans each specified instance and generates a list of missing patches for review.
Scan and Install: scans each specified instance and compares the existing patches on the instance with the patches that match the rule specified by the patch baseline. Then, the system downloads and installs the missing approved patches on each involved instance.
Whether to Create Snapshot for System Disk: Select Yes and specify a snapshot retention period.
Allow Restart: specifies whether to restart instances on which patches are installed based on your business requirements.
Yes: restarts the instances when instance restart is required to allow patches to take effect.
No: does not restart the instances. In this case, if the instance restart is required to allow patches to take effect, the patches do not take effect and remain in the Pending state after being installed.
Permissions: Select Default Service-linked Role.
Click Select Instances, set Resource Type to ECS Instances, and then select the instances for which you want to update patches.
Retain the default values in the Advanced section and click Execute Now.
In the Parameter Confirmation message, confirm the parameters and click OK.
View the details of a patch update task.
On the Patch Management page, view the Task Status column of the patch update task. If Success is displayed, the patch update task is complete.
Click Execution ID or Details in the Actions column to view the details of the updated patches.
References
OOS is a comprehensive, automated O&M service provided by Alibaba Cloud free of charge to help you manage and execute O&M tasks in the cloud. You can use OOS to manage repetitive, event-driven, scheduled, and cross-region O&M tasks. OOS helps you easily batch handle O&M tasks and manage approval requests. OOS also serves as a standardization platform for O&M tasks and allows you to create templates from O&M manuals, operation guides, and maintenance manuals based on best practices of Operations as Code. For more information, see What is OOS?