Designing solutions that last
The first eight chapters taught the parts of Orchestrator. This one is about putting them together so that the result still makes sense a year later, to you and to whoever inherits it. It follows VMware’s vRealize Orchestrator Coding Design Guide (2016), brought up to date for Orchestrator 9.x and VCF Automation.
Recipe 9.1 designs and builds a real solution, decommissioning a VM, from the bottom up: five questions first, then actions you can test on their own, one library workflow for the use case, and thin entry workflows for each way it’s started. Recipe 9.2 looks at the systems around it and decides, for each, who starts the conversation. Recipe 9.3 gives every object in the solution a name that says what it does and who owns it. The last three recipes get it ready to leave your lab: a setup workflow that fills in its settings on each Orchestrator (9.4), packages cut by use case (9.5), and tests that check the logic and the wiring (9.6).
The examples
Section titled “The examples”| Object | Name |
|---|---|
| Owner code and module root | VCFG, com.vcfguide; shared content CORE, com.vcfguide.core |
| Workflow folders | VCF Orchestrator Guide/Chapter 9, with 01 Catalog, 02 Subscriptions, 03 Day2, 04 Library, 05 Utilities and 99 Test (recipe 9.3) |
| Action modules | com.vcfguide.core.vc with waitForTask; com.vcfguide.vm with powerOffVm, markVmRetired, moveVmToFolder, deleteVm and getRetiredInfo |
| Workflows | VCFG - VM - Decommission VM, VCFG - VM - Delete Retired VMs, VCFG - VM - Configure Decommissioning, VCFG - LIB - Retire VM, VCFG - LIB - Delete VM; tests VCFG - VM - Test getRetiredInfo [TEST] and VCFG - VM - Test Decommissioning Setup [TEST] |
| Packages | com.vcfguide.core, com.vcfguide.vm.decommission, com.vcfguide.vm.decommission.test |
| Configuration element | VCFG_Decommission in VCFG/VM |
| vCenter, test VM, VM folder | vc01.vmw.lab, vcfguide-test-01, vcfguide-retired |
Recipe 9.1 powers off, moves and finally deletes a test VM. Use one you can lose. JavaScript samples are plain ES5.1.
