VMware Aria Automation Tools

 View Only
  • 1.  Use custom name for deployment name

    Posted Mar 08, 2023 07:46 PM

    Does anyone have an easy way to not require a deployment name, but instead to use the custom name as the deployment name? 



  • 2.  RE: Use custom name for deployment name

    Broadcom Employee
    Posted Mar 09, 2023 08:11 AM

     
    If you are taking VM name as input , You can use same variable to copy the name of the deployment as well using Custom form .



  • 3.  RE: Use custom name for deployment name

    Posted Mar 16, 2023 02:34 PM

    I am using the Custom Name template to generate standardized VM and hostnames. 

    2 questions.

    1. I have a ShortOS variable I would like to be mapped in with the Image code.  So I need to figure out how to reference a variable created there.  Do you have documentation reference for this?

    2. What ends up being the Custom Name variable I can assign to the deployment name on the Custom form?

    Thank you for your help. 



  • 4.  RE: Use custom name for deployment name

    Broadcom Employee
    Posted Mar 16, 2023 03:19 PM

     good stuff Please mark this thread as resolved , It would help to keep track of unresolved queries



  • 5.  RE: Use custom name for deployment name

    Posted Mar 16, 2023 03:48 PM

    But I just asked two questions and don't feel resolved. 



  • 6.  RE: Use custom name for deployment name

    Broadcom Employee
    Posted Mar 16, 2023 04:16 PM

    Here are high level steps 
    create a input variable name vmname:
    map that name to custom property in cloud template
    release the version
    go to service broker content and policy => content , edit and then map

    formatVersion: 1
    inputs:
      vmname:
        type: string
        title: 'Enter VM Name'
        default: ''
    resources:
      Cloud_vSphere_Machine_1:
        type: Cloud.vSphere.Machine
        properties:
          image: Linux
          vmname: ${input.vmname}
          cpuCount: 1
          totalMemoryMB: 1024

     

    Here is the sample of cloud template which name is community , release this , Once release go to service broker
    content source , validate then look for cloud template and configure form

    Ankush11s_0-1678983075125.png

    Here for click deployment name field and click values and choose bind value and then choose from canvas

    Ankush11s_2-1678983266071.png

     

    Ankush11s_1-1678983188095.png

     

    that is how you use custom form and custom name variable 




  • 7.  RE: Use custom name for deployment name

    Broadcom Employee
    Posted Mar 20, 2023 06:22 PM

     did above steps helped 



  • 8.  RE: Use custom name for deployment name

    Posted Apr 10, 2023 11:22 PM

    No, the above steps did not help.  Again, I am using the Custom Names (Cloud Assembly > Infrastructure > Custom Names) which we have an established standard for our organization.

    In the custom form I can reference as a conditional value if the Custom Name value is not empty, but there appears to be no way to populate or "bind" to the Custom Name.



  • 9.  RE: Use custom name for deployment name

    Posted Apr 14, 2023 10:39 PM

    So regarding the short OS, I found https://vtam.nl/2022/05/01/vra-8-8-custom-names/

    Which sets the name property in

    resources:

      Cloud_vSphere_Machine_1:

        type: Cloud.vSphere.Machine

        properties:

          name:   “Cloud_vSphere_Machine_1” ; was this

    I set it to

          name: W

    and updated the Custom Naming machine template to

      ${project.name}${resource.name}${ISPOCN.APP}${ISPOCN.FUNC}${ISPOCN.ENVT}${##}

    So this works for now, I just hope name isn’t needed in the future.

    Still not sure about updating env.deploymentName

    Next question is which property should be converted to_lower for Linux naming standards?



  • 10.  RE: Use custom name for deployment name

    Posted Mar 09, 2023 08:47 PM

    I found this online and it works for me:

    - user catalog item name plus timestamp for automated Deployment naming. I also hid this field on the custom form so users don't need to see it at all.

    var itemName = catalogItemName || "";
    var deploymentName = "";

    if (itemName != "" && itemName != null) {
        var date = new Date();
        deploymentName = itemName + "- (" + date.toISOString() + ")";
        System.debug("Returning deploymentName: " + deploymentName);
    }

    return deploymentName;
     
     
    Enter123_0-1678394757115.png

     



  • 11.  RE: Use custom name for deployment name

    Posted 18 days ago

    Great solution. Thanks!