Skip to content
wizzense edited this page Sep 1, 2024 · 5 revisions

Tanium-Deployed Homelab Automation

This project automates the deployment and management of a home lab using Tanium Cloud, focusing on repeatability, thorough documentation, and ease of use. The setup includes deploying and managing VMs across multiple Hyper-V hosts with extensive automation.

Table of Contents

  1. Project Overview
  2. Project Objectives
  3. Setup Guide
  4. Automation Scripts
  5. Deployment Process
  6. Maintenance and Updates
  7. Troubleshooting
  8. Future Enhancements
  9. Contributing
  10. License

Project Overview

This project aims to automate the setup and management of a home lab using Tanium Cloud. The setup involves deploying and clustering VMs on multiple physical hosts running Hyper-V, with a control node used for further automation and management via Tanium.

Project Objectives

  • Automate the installation of development tools (Git, VSCode, etc.).
  • Create/manage GitHub repositories to store and track all scripts and documentation.
  • Deploy and cluster Hyper-V on multiple physical machines.
  • Automate the creation of a control node VM using Tanium Cloud.
  • Ensure high availability and redundancy by setting up a clustered environment.
  • Integrate Tanium Cloud for the automation of lab deployment and management.

Setup Guide

Environment Preparation

Ensure the following components are prepared:

  1. Primary PC (Home PC): Main hypervisor.
  2. Work PC: Secondary hypervisor for redundancy.
  3. GitHub Account: For repository management.
  4. Required Software:
    • Git
    • Visual Studio Code (VSCode)
    • Git CLI
    • PowerShell
    • Python (for future automation tasks)

Automation of Prerequisites

Automate the setup of development tools with the following steps:

  1. Git Installation:
    • Script to download and install Git.
  2. VSCode Installation:
    • Script to download and install VSCode.
  3. Git CLI Installation:
    • Script to download and install the Git CLI.
  4. Repository Setup:
    • Automate the creation or cloning of a GitHub repository.
    • Use configuration files for settings like username, email, and paths.

Hyper-V Configuration

  1. Install Hyper-V:
    • Script to install and configure Hyper-V on the Primary and Work PCs.
  2. Cluster Configuration:
    • Automate the clustering process between Primary and Work PCs.
  3. Control Node VM Creation:
    • Script to create and configure the control node VM on the Primary PC.

Tanium Integration

  1. Provisioning via Tanium:
    • Automate control node provisioning with Tanium Provision.
  2. Tanium Client Setup:
    • Script to install the Tanium Client on the control node.
  3. Tanium Satellite Setup:
    • Automate the setup of a Tanium Satellite for lab deployment management.

Automation Scripts

PowerShell Module

  • PowerShell Module: Simplify the setup with functions to install prerequisites, configure Hyper-V, set up clustering, and deploy VMs.

Python Scripts

  • Python Scripts: Mirror PowerShell scripts in Python for flexibility and future Proxmox integration.

Configuration Files

  • Config Files: Store settings (e.g., usernames, paths) to enable easy customization and reusability.

Deployment Process

Control Node Deployment

  1. Deploy Control Node VM:
    • Automate creation and configuration on the Primary PC.
  2. Install Tanium Client:
    • Automate the installation process.
  3. Network Setup:
    • Configure networking for Tanium Cloud and control node communication.

VM Provisioning

  1. Download OS ISOs:
    • Automate the downloading of common OS ISOs.
  2. Provision VMs:
    • Use scripts to automate VM deployment on Hyper-V.
  3. Configure Server Roles:
    • Automate the setup of roles like ADDS, DNS, DHCP on VMs.

Cluster Setup

  1. Cluster Hyper-V Hosts:
    • Automate the clustering process for high availability.
  2. Failover Configuration:
    • Ensure redundancy by automating failover setups.

Maintenance and Updates

  • Regularly update scripts and modules to keep up with new features and bug fixes.
  • Version control with GitHub for tracking changes and ensuring consistency.

Troubleshooting

  • Common Issues: Document common issues like Hyper-V setup failures and networking problems.
  • Logs: Provide instructions for accessing and interpreting logs to diagnose issues.

Future Enhancements

  • Proxmox Integration: Extend automation to support Proxmox as an alternative to Hyper-V.
  • Complete Python Automation: Transition to Python for broader automation capabilities.
  • Tanium API Integration: Further automate Tanium configuration using its API.
  • Redundant LDAP/DNS/DHCP: Automate deployment of redundant Linux-based infrastructure.