Automagical vCenter Documentation with MkDocs

 Automagical vCenter Documentation with MkDocs

❓ Why ❓

Everything as Code has been a very popular topic over the last 5 years or so. Mostly, as IT continues to move faster and automation is needed to meet business timelines and guaranteed quality. This past week, I have been helping a customer set standards for Engineering Documentation. One of the standards my employer uses is MkDocs for Documentation as Code.

πŸ—’️ What πŸ—’️

  1. Python

  2. Python-PIP 

  3. PowerShell (Windows) or PowerShell Core (Linux, MacOS)

  4. PowerCLI

  5. MkDocs

πŸ”§ How πŸ”§

Install All the Software Components

  • Install python and python-pip for your OS using the links above. I'm using Linux, so the install was:
$ sudo apt install python
$ sudo apt install python-pip
  • Install Powershell for your OS using the link above. I'm using Linux, so the install was:
$ curl https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --yes --dearmor --output /usr/share/keyrings/microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list'
$ sudo apt update && sudo apt install -y powershell 
  • Install PowerCLI in PowerShell
$ pwsh
> Install-Module VMware.PowerCLI -Scope CurrentUser
  • Install mkdocs (and the optional mkdocs material theme)
$ pip install mkdocs
$ pip install mkdocs-material

Automate Your Documentation

Start a New MkDocs Project

$ mkdir mkdocs-project
$ cd mkdocs-project
$ mkdocs new .
INFO    -  Writing config file: ./mkdocs.yml
INFO    -  Writing initial docs: ./docs/index.md

πŸ™ Thank You πŸ™ 

Thanks for taking the time to read this post. I hope you found the post helpful and maybe saved you some time. I love feedback, so please add comments if you have any.

Comments