Tool to Cleanup Horizon 7 Pod in VMware Cloud

Version 11

    Background:

    From Mar. 21, 2019, customer can deploy a Horizon pod in a VMware Cloud™ on AWS SDDC using the Horizon Cloud Administration Console's automated deployment wizard. This is a new type of automated pod deployment which is called "VMware Horizon 7 pod deployed by Horizon Cloud into your VMware Cloud SDDC". It provides a quick and easy Horizon 7 deployment process on your SDDC. In some cases, you may need cleanup or deletion operation for this kind of pod as mentioned https://docs-staging.vmware.com/en/VMware-Horizon-Cloud-Service/services/hzncloudmsazure.getstarted15/GUID-4276335C-495F-4F65-A615-74F9753F6E48.html, we prepared an easy tool to facilitate the customer to complete this task.

    Who are the users of this tool?

    This is a tool using for deleting Horizon 7 Pod in VMware Cloud. And only for, if you are a user of VMware Horizon Cloud Service, and your VMware Horizon 7 pod deployed by Horizon Cloud into your VMware Cloud SDDC. Once you have done your deployment or your deployment failed, and you want to totally cleanup all of automated resources which created by Horizon Cloud service, this tool is helpful for you. We provided 3 versions of it: Mac OS, Windows, Linux. please download correct version from attachments.

    How do I use run this tool?

    • Download a version of this tool from attachment.
    • Download the demonstrated version of config.js file from attachment, and change it to your specific information.
    • Run it with your configuration file:
      • For windows,  open a CMD and run it:
        yourDownloadPath\hlcm_cleanup_vmc-win.exe cleanup yourconfigurationFilePath\config.js
      • For Mac, open a terminal and run it:
        yourDownloadPath/hlcm_cleanup_vmc-macos cleanup yourconfigurationFilePath/config.js
      • For Linux, open a terminal and run it:
        yourDownloadPath/hlcm_cleanup_vmc-linux cleanup yourconfigurationFilePath/config.js

    How do I change the config.js file?

    Below is the demonstrated config.js file content, normally you need to change all of values of the hlcm, pod, auth parts to your specific. If you are behind a corporate firewall, which mean you have to go through proxy to access public internet, then the proxy part also need to be changed. The deploymentId, network and resourceLocation should keep these default values if you are external users. Only for VMware internal users, in special cases, these 3 parts need to be changed.

     

     

    module.exports = {

     

        proxy:{

            enabled: false,

            host: 'proxy.yourcompany.com',

            port: 3128

        },

        hlcm: {

            url: 'https://cloud.horizon.vmware.com:443',

            user: 'test@example.com',

            password: '******',

            console: {

                user: 'admin@example.com',

                password: '******'

            }

        },

        deploymentId: 10,

        pod: {

            name: 'podName'

        },

        auth: {

            vmc: {

                token: 'VMCToken',

                orgName: 'OrgName',

                sddcName: 'SDDCName'

            },

            vc: {

                user: 'cloudadmin@vmc.local',

                password: '******'

            }

        },

        network: {

            backend: {

                name: 'HzE-${deploymentId}-backend',

            },

            internalDMZ: {

                name: 'HzE-${deploymentId}-internal-DMZ',

            },

            externalDMZ: {

                name: 'HzE-${deploymentId}-external-DMZ',

            }

        },

        resourceLocation:{

            datacenter: 'SDDC-Datacenter',

            datastore: 'WorkloadDatastore',

            cluster: 'Cluster-1',

            folder: 'Workloads/HzE-${deploymentId}-backend',

            deployerVM: 'HzE-deployer-${deploymentId}',

            resourcePool: 'Compute-ResourcePool/HzE-${deploymentId}-backend'

        }

    }

     

    Configuration Settings

    Group
    Key
    Values
    Description
    proxyenabletrue/false

    Enable proxy, if you are not behind a corporate firewall, please change it to true. And changing host and port information accordingly.

    In Mac, Linux environment, please don't set proxy with system environment, if you already exported HTTP_PROXY and HTTPS_PROXY, please reset them as below:

    export https_proxy=

    export http_proxy=

    hosthostname/IP addresshostname or IP address of your proxy server
    port1~ 65535port of your proxy server
    HLCMurl

    a. https://cloud.horizon.vmware.com:443/

    b. https://cloud-eu-central-1.horizon.vmware.com:443/

    c. https://cloud-ap-southeast-2.horizon.vmware.com:443/

    This url is VMware Horizon Cloud Service's access endpoint, for external user, there are only these 3 values, you should choose one of #a/#b/#c according your horizon cloud information. please don't remove the default port:443, if you are using proxy.
    userStringHorizon Cloud Service username which you were using to deploy the Horizon 7 pod.
    passwordStringHorizon Cloud Service password.
    console.userStringHorizon Cloud Administration Console username
    console.passwordStringHorizon Cloud Administration Console password
    podnameStringThe Horizon 7 pod which you want to delete
    authvmc.tokenStringVMware Cloud API Token of the user who deployed the Horizon 7 pod.
    vmc.orgNameStringThe organization name of Horizon 7 pod deployed into.
    vmc.sddcNameStringThe SDDC name the Horizon 7 pod used.
    vc.userStringSDDC vCenter administrator user of the Horizon 7 pod deployed into.
    vc.passwordStringSDDC vCenter administrator password