Skip to content

Commit 4110a30

Browse files
committed
Added sections on Patch management to tutorial
1 parent 3c2c61e commit 4110a30

File tree

1 file changed

+57
-13
lines changed

1 file changed

+57
-13
lines changed

OnCommand-Insight-Tutorial.md

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,38 @@ Check that the values have been deleted
209209
$Annotation | Get-OciAnnotationValues
210210
```
211211

212+
### Manage Applications and Business Entities
213+
214+
You can create a Business Entity with
215+
```powershell
216+
$BusinessUnity = Add-OciBusinessEntity -Tenant "tenant" -LineOfBusiness "lof" -BusinessUnit "bu" -Project "project"
217+
```
218+
219+
You can get all Business Entities with
220+
```powershell
221+
Get-OciBusinessEntities
222+
```
223+
224+
You can remove all Business Entities with
225+
```powershell
226+
Get-OciBusinessEntities | Remove-OciBusinessEntities
227+
```
228+
229+
You can create a Application with
230+
```powershell
231+
$Application = Add-OciApplication -name "application" -priority Critical -businessEntity $BusinessEntity.id -ignoreShareViolations
232+
```
233+
234+
You can update an application with
235+
```powershell
236+
$Application | Update-OciApplication -priority Low
237+
```
238+
239+
Remove all applications
240+
```powershell
241+
Get-OciApplications | Remove-OciApplication
242+
```
243+
212244
### Retrieve OCI Server health status
213245

214246
```powershell
@@ -494,36 +526,48 @@ The latest Backup available on the OCI Server can be restored with
494526
Get-OciBackups | Sort -Property Date -Descending | select -first 1 | Restore-OciBackup
495527
```
496528

497-
## Manage Applications and Business Entities
529+
### Patch Management
498530

499-
You can create a Business Entity with
531+
#### Add a new patch
532+
533+
You can add new OCI Patches (and service packs) via the following commands (replace path to the patchfile you want to add):
500534
```powershell
501-
$BusinessUnity = Add-OciBusinessEntity -Tenant "tenant" -LineOfBusiness "lof" -BusinessUnit "bu" -Project "project"
535+
$patchFile = "$HOME\Downloads\7.2_SP5_Patches\7.2_SP5_Patches\netapp_7mode\7.2_ici-4588_netap_api.patch"
536+
Add-OciPatch -patchFile $patchFile
502537
```
503538

504-
You can get all Business Entities with
539+
#### Check patch status
540+
541+
A new patch will be evaluated by OCI and if all datasources are either working as before, or improve from FAILED to SUCCESS, OCI will give a recommendation for approval of the patch
505542
```powershell
506-
Get-OciBusinessEntities
543+
Get-OciPatches
507544
```
508545

509-
You can remove all Business Entities with
546+
You can get individual patches with the conclusion OCI reached for each datasource with
510547
```powershell
511-
Get-OciBusinessEntities | Remove-OciBusinessEntities
548+
Get-OciPatches | Get-OciPatch -datasourceConclusion
512549
```
513550

514-
You can create a Application with
551+
#### Rollback patches
552+
553+
If the patch caused new issues, then a rollback may be neccessary. This can be done with
515554
```powershell
516-
$Application = Add-OciApplication -name "application" -priority Critical -businessEntity $BusinessEntity.id -ignoreShareViolations
555+
$PatchesToBeRolledBack = Get-OciPatches | where { $_.Recommendation -eq "Rollback" }
556+
$PatchesToBeRolledBack | Rollback-OciPatch
517557
```
518558

519-
You can update an application with
559+
#### Approve patches
560+
561+
If the patch was successfull, it can be approved with
520562
```powershell
521-
$Application | Update-OciApplication -priority Low
563+
$PatchesToBeApproved = Get-OciPatches | where { $_.Recommendation -eq "Approve" }
522564
```
523565

524-
Remove all applications
566+
#### Add patch notes
567+
568+
You can add a comment to a patch with the following command:
525569
```powershell
526-
Get-OciApplications | Remove-OciApplication
570+
Get-OciPatches | Update-OciPatchNote -value "test"
527571
```
528572

529573
## Troubleshooting

0 commit comments

Comments
 (0)