Nutanix Technology Champion - Nutanix Solution Architect

Julien DUMUR
Infrastructure in a Nutshell
Nutanix AsBuilt Generator

In this article, I introduce Ultimate As-Built Generator, my application that generates your Nutanix as-built document in Word format from Prism Central, in about 35 seconds on my lab, not counting typing time.

What is a Nutanix as-built document?

The as-built is the document that describes the infrastructure as it was actually delivered, and the one the operations team will be very glad to find six months later.

I have deployed dozens of clusters, so I have produced dozens of as-builts, and every single time I had to add the missing information by hand, which meant 2 to 4 hours per document at the very least, for a result less exhaustive than what my tool produces. For the hardware part alone, I had already detailed an inventory from the command line.

Download Ultimate As-Built Generator

The application has its own official web page, where you can download it for Windows, macOS and Linux, and its code is published under the GPL-3.0 license on GitHub. It is a single executable, with nothing else to install and no administrator rights required, and Windows 11 even gets an app version that updates itself.

On the Nutanix side, you will need nothing more than a read-only account with the “Viewer” role, since the tool only reads. Everything goes through the Prism APIs, which fits rather nicely with the announced end of SSH.

So far, I have only tested it on my Community Edition lab, a single-node cluster running AOS 7.6.0.6 with Prism Central pc.7.6. The compatibility matrix supports PC 2024.1 and AOS 6.8 as a minimum, but I have not been able to test those versions yet, as I have no cluster running them.

The binaries are not signed for now. Windows SmartScreen displays a warning on first launch, which you get past with “More info” then “Run anyway”. Unfortunately, if Smart App Control is enabled on your Windows 11, neither the application nor the portable executable will start, and the only solution is to turn it off, which on some Windows builds cannot be undone without resetting the system…

On macOS, a right-click then “Open” is enough, or you can use the following command (adjust it to the name of the binary you downloaded):

xattr -d com.apple.quarantine ultimate-asbuilt-macos-arm64

On Linux, make the binary executable then launch it from a terminal (pick ultimate-asbuilt-linux-arm64 on an ARM64 machine). The address of the interface is printed there, and you keep this terminal open as long as you use the tool, Ctrl+C to quit:

chmod +x ultimate-asbuilt-linux-x64
./ultimate-asbuilt-linux-x64

Connecting to Prism Central and collecting

At launch, the interface opens in your browser, or in its own window with the Windows application. Enter your Prism Central address, the username and the password, tick “Accept self-signed certificates” if that is your case, then click “Detect clusters”:

Ultimate As-Built Generator, Prism Central connection form

The Prism Element step is optional. It adds high availability, storage pool names and ILM thresholds (ILM being the automatic movement of data between tiers) to the document, as well as legacy protection domains. Enter the credentials of each cluster then click “Collect Prism Elements”, or click “Skip: document from Prism Central only”:

Optional Prism Element credentials before the as-built collection

On my lab, the full collection takes between 22 and 33 seconds, Prism Central then Prism Element, with 54 collectors out of 54 on one side and 22 out of 22 on the other. With Prism Central alone, it fits in 12 to 21 seconds. No password is stored or written to the document.

Two surprises along the way

During development, a wrong password locked my cluster account: each parallel collector was authenticating on its own, which made 29 rejected requests. The tool now checks authentication only once before starting the collection. The other surprise, on AOS 7.6 on my lab, was the cluster_v2.encrypted API field returning true on a cluster with no encryption at all, so the tool no longer relies on it once the v4 API has answered.

Generating the Word as-built document

All that is left is to fill in what Prism cannot know (customer, project, integrator, site, switches) and to choose the sections: 64 of the 79 sections are ticked by default. The document can be produced in English or in French. Then click “Generate the .docx”, which takes about a second:

Nutanix as-built document in Word, logical design diagram and configuration tables

With the default sections, I get 36 tables and 6 diagrams (34 tables without Prism Element). With everything ticked, it goes up to 46 tables and 23 pages, 5 of which are taken by the list of failed STIG controls alone (the hardening guides of the US administration), which is unticked by default.

The diagrams are drawn from the collected configuration, and the cabling one relies on what the hosts see of their switches through the LLDP or CDP discovery protocols, and failing that it falls back to the number of switches you entered, saying so in its caption:

Automatically generated network cabling diagram of a Nutanix cluster

The layout comes from a Word template that you can download from the interface, restyle with your own colors and upload again when generating. It only has to keep the {{corps}} placeholder and the “AsBuiltTable” table style.

Comparing two collections

The “Export the collection” button produces a .json file without any credentials. Export one at delivery and another a few months later, then under “Compare two collections” load both files and click “Generate the change report”, without Prism being queried.

The report lists the rows added, removed and the values changed, section by section. Diagrams and annexes are not compared, and values that move on their own, such as used capacity, show up like any other change.

I still have to put it up against our customers’ production environments, with several clusters and several nodes, which my small lab does not allow me to check. If you try it on your side, tell me in the comments or in the GitHub issues what your document is missing…

0 comments

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>