Ansible SDDC Deployment

Starting in late 2017, I began the journey to leverage Ansible as a means to deploy bare-metal VMware SDDC environments. As VMworld 2018 approached, the work I’d been doing on my own and as part of an Infrastructure-as-Code project internally for VMware, came to fruition with a series of blog posts and code published on GitHub.

The following Ansible SDDC roles were published back in August 2018 and can be leveraged for deploying various components of the VMware SDDC stack and combined to deploy an entire environment.

  • esxi-adv-settings – Configure advanced ESXi settings on an ESXi node
  • esxi-host-config – Configure DNS, hostname and NTP settings on an ESXi node
  • esxi-services – Configure ESXi services on an ESXi node
  • esxi-vmk-interfaces – Create/delete VMkernel interfaces on an ESXi node
  • nsxv-cluster-prep – Prepare vCenter cluster for NSX-v
  • nsxv-controllers – Create/delete NSX-v controllers
  • nsxv-license – Assign NSX-v license
  • nsxv-logical-switch – Create/delete NSX-v logical switch
  • nsxv-manager-config – Configure NSX-v Manager
  • nsxv-manager-deploy – Deploy NSX-v Manager OVA to vCenter Server
  • nsxv-manager-roles – Configure NSX-v Manager user roles
  • nsxv-transport-zone – Create/delete NSX-v transport zone
  • vcenter-add-hosts – Add or remove ESXi nodes to vCenter Server
  • vcenter-cluster – Create/delete/modify vCenter cluster
  • vcenter-datacenter – Create/delete vCenter datacenter object
  • vcenter-maintenance-mode – Manage the maintenance mode state of an ESXi node
  • vcenter-networking – Create/delete DVS
  • vcenter-portgroups – Create/delete port groups

Wherever possible, each role has been written to allow the creation, deletion or modification of said objects within the SDDC environment.

In addition to the roles themselves, there are published playbooks that execute the roles in a specific order, based on dependencies, to perform the actual deployment of the SDDC environment.

  • esxi_sddc_configure.yml – Configure ESXi nodes
  • nsxv_sddc_deploy – Deploy and configure NSX-v Manager and controllers

All of the Ansible SDDC roles and playbooks are kept within my GitHub repositories, and can be leveraged independently.

https://github.com/virtualelephant/vsphere-sddc

If you want to see the above roles and playbooks being leveraged, here is a recording of several of the roles being leveraged to deploy and configure a set of ESXi nodes (advanced settings, DVS and VMkernel configuration) within a vCenter cluster, deploy an NSX-v Manager through ovftool and the deployment of the NSX-v Controllers.

To avoid any copyright issues, there is no sound or music playing in the background. The video was recorded and then time-lapsed to make it a quick-view of the deployment. Deploying the NSX-v Manager and Controllers were the longest-running tasks, but in it’s raw form the demo video was just under 30 minutes to perform all of the tasks you see in the video.

If you are looking to start leveraging Ansible to deploy and manage your VMware SDDC environments, these roles are a great starting point.