Due to architecture and design changes in VCF Automation 9.0, the option to add machines to Active Directory no longer exists out of box. This functionality can be replicated using the instructions here.
VCF Automation 9.0
This is caused due to the deprecation of ABX functionality with VCF Automation 9.0
The Variable can be named anything but be descriptive and make the Type set to AD:OrganizationalUnit. The Value will be set to the actual OU that we wish to create machines into. If we want to add more OUs to create machines, repeat these steps to create more variables. (as seen below). Note: the Name field below will be the OU_VARIABLE_NAME_FROM_CONFIGURATION used in the setup script:
In order to get PROJECT_ID needed for the setup script we will need to go to the Manage & Govern tab.
Click on Projects from the left panel.
Select a project and you will see the Project ID listed in part of the URL prior to /summary:
Download the attached package of the Action Scripts as well as the Workflows that will be used by the event in the next step. In order to import the above package, navigate to Orchestrate → Assets → Packages → Import as seen below:
Once the workflows have been setup and created as above, we can now create a subscription based on the deployment event which will get triggered on a specific event, that in turn will run the workflow provided. Here are the overall steps to create a Subscription:
Below is the screenshot of how the subscription will look for the CreateDelete Event:
We can also check on the Subscription Runs once the Deployment has finished. This will show us if the subscription ran and also if the workflow associated with the subscription was run successfully or failed. This can be found under Build & Deploy → Event Subscriptions → Events
For the blueprint we will need to make note of the metadata.name property. That is the field that will be used when creating the name of the computer objects in the AD server (Note: it will be limited to 15 characters because of limitations on Active Directory). Replace the hashtags with appropriate names for your environment:
formatVersion: 1resources: CCI_Supervisor_Namespace_1: type: CCI.Supervisor.Namespace properties: name: ###-#####-######### existing: true ad_vm_123: # AD Resource Name to provide for inputs when deploying type: CCI.Supervisor.Resource properties: context: ${resource.CCI_Supervisor_Namespace_1.id} manifest: apiVersion: vmoperator.vmware.com/v1alpha3 kind: VirtualMachine metadata: name: test-vm-${env.shortDeploymentId} spec: className: best-effort-xsmall imageName: vmi-################# powerState: PoweredOn storageClass: development wait: conditions: - type: VirtualMachineCreated status: 'True'If we have a scenario where there are multiple OUs or Multiple AD Servers. Here are the steps we need to do:
These steps above will allow for multiple Project to AD_OU associations to exist. The workflow will run against all projects; however, because of the project_associations JSON, we will only create machines on the projects specified.