Creating a Runbook for Patching
Create a runbook to apply patches to the Apache Tomcat product in Fleet Application Management.
Sample JSON for Patching
Here's a sample JSON for applying software patches to Apache Tomcat.
{
"compartmentId": "<your_root_compartment_ocid>",
"displayName": "Apache Tomcat Patching",
"description": Runbook to patch Apache Tomcat Product Homes on an instance,
"operation": "PATCH",
"runbookRelevance": "PRODUCT",
"platform": "Apache Tomcat",
"isDefault": false,
"osType": "LINUX",
"estimatedTime": "1",
"associations": {
"groups": [
{
"name": "Parallel_resource_container",
"type": "PARALLEL_RESOURCE_GROUP",
"properties": {
"actionOnFailure": "ABORT",
"condition": null
}
}
],
"tasks": [
{
"stepName": "Apache_Tomcat_patching_task",
"associationType": "TASK",
"taskRecordDetails": {
"scope": "LOCAL",
"executionDetails": {
"executionType": "SCRIPT",
"variables": null,
"content": {
"sourceType": "OBJECT_STORAGE_BUCKET",
"namespaceName": "mytenancynamespace",
"bucketName": "demo_bucket",
"objectName": "apache_tomcat_scripts.zip",
"checksum": "PTCQgxnWZ7Oh/VVTbIrGdudMA=="
},
"command": "unzip -q -o apache_tomcat_scripts.zip; chmod +x apache_tomcat_patching.sh ; sh apache_tomcat_patching.sh",
"credentials": []
},
"description": "Apache_Tomcat_patching_task",
"platform": "Apache Tomcat",
"isCopyToLibraryEnabled": false,
"osType": "LINUX",
"properties": {
"numRetries": 0,
"timeoutInSeconds": 3000
},
"isDiscoveryOutputTask": false,
"isApplySubjectTask": true,
"name": "Apache_Tomcat_patching_task"
},
"stepProperties": {
"actionOnFailure": "ABORT",
"condition": null
},
"outputVariableMappings": []
}
],
"executionWorkflowDetails": {
"workflow": [
{
"groupName": "Parallel_resource_container",
"type": "PARALLEL_RESOURCE_GROUP",
"steps": [
{
"type": "TASK",
"stepName": "Apache_Tomcat_patching_task"
}
]
}
]
}
}
}
Sample YAML for Patching
Here's a sample YAML for applying patches to Apache Tomcat.
compartmentId: <your_root_compartment_ocid>
displayName: Apache Tomcat Patching
description: Runbook to patch Apache Tomcat Product Homes on an instance
operation: PATCH
runbookRelevance: PRODUCT
platform: Apache Tomcat
isDefault: false
osType: LINUX
estimatedTime: "1"
associations:
groups:
- name: Parallel_resource_container
type: PARALLEL_RESOURCE_GROUP
properties:
actionOnFailure: ABORT
condition: null
tasks:
- stepName: Apache_Tomcat_patching_task
associationType: TASK
taskRecordDetails:
scope: LOCAL
executionDetails:
executionType: SCRIPT
variables: null
content:
sourceType: OBJECT_STORAGE_BUCKET
namespaceName: mytenancynamespace
bucketName: demo_bucket
objectName: apache_tomcat_scripts.zip
checksum: PTCQgxnWZ7Oh/VVTbIrGdudMA==
command: unzip -q -o apache_tomcat_scripts.zip; chmod +x
apache_tomcat_patching.sh ; sh apache_tomcat_patching.sh
credentials: []
description: Apache_Tomcat_patching_task
platform: Apache Tomcat
isCopyToLibraryEnabled: false
osType: LINUX
properties:
numRetries: 0
timeoutInSeconds: 3000
isDiscoveryOutputTask: false
isApplySubjectTask: true
name: Apache_Tomcat_patching_task
stepProperties:
actionOnFailure: ABORT
condition: null
outputVariableMappings: []
executionWorkflowDetails:
workflow:
- groupName: Parallel_resource_container
type: PARALLEL_RESOURCE_GROUP
steps:
- type: TASK
stepName: Apache_Tomcat_patching_task