This repository contains a set of PowerShell scripts to automatically create a clusterless SQL Server Availability Group with three nodes hosted in Docker containers.
The scripts are designed to quickly build and tear down SQL Server Docker containers on a personal desktop for testing various SQL Server features and database deployments.
- Quick Setup: Quickly create a multi-node SQL Server Availability Group in Docker.
- Self-Cleaning: Easily tear down containers and data folders when not in use.
- Sample Database: The
AdventureWorkssample database is automatically added to the Availability Group.
-
Cleans up the environment by removing all Docker containers and associated local data folders.
-
- Installs required PowerShell modules.
- Builds a custom SQL Server Docker image.
- Creates SQL Server containers using Docker Compose.
- Configures a clusterless Always On Availability Group.
- Downloads and places the
AdventureWorkssample database into the Availability Group.
- Docker Desktop installed and running.
- PowerShell 7+ installed.
- Optional: AdventureWorks database files (downloaded automatically).
- Clone this repository:
git clone <repository-url>
- Run the setup script:
./go.ps1 - To cleanup the environment
./cleanup.ps1
- The environment is built for testing and development purposes on a local desktop.
- Modify the scripts as needed for your specific testing scenarios.