A comprehensive PowerShell-based automation framework for operational task management and deployment orchestration.
Plot Manager is a sophisticated automation framework that orchestrates complex operational tasks through a flexible plot/step architecture. Originally developed for SenseNet CMS deployments, it has evolved into a general-purpose automation platform capable of managing diverse operational workflows including containerized deployments, cloud automation, and enterprise application lifecycle management.
Plot Manager uses a simple but powerful paradigm:
- Plots: Predefined scenarios that execute a sequence of steps
- Steps: Individual PowerShell functions that perform specific tasks
- Settings: JSON-based configuration supporting multiple environments
- Modules: Auto-loaded PowerShell modules that extend functionality
This architecture enables complex automation workflows to be composed from reusable components, making it easy to create, maintain, and extend operational processes.
- IIS Management: Complete website and application pool lifecycle
- Database Operations: SQL Server database creation, backup, restore with authentication support
- Container Orchestration: Docker container management and networking
- Cloud Deployment: Azure Web App deployment automation
- SSL/TLS Management: Certificate creation and configuration
- Solution Building: Visual Studio solution compilation and artifact creation
- Package Management: NuGet package restoration and dependency resolution
- Source Control: TFS/Git integration for code retrieval
- .NET Core & Framework: Support for both modern .NET Core and traditional .NET Framework
- Content Management: Import/export of content and configurations
- Search Indexing: Lucene index population and management
- Site Provisioning: Complete SenseNet site setup and configuration
- Package Deployment: SnAdmin package installation and management
- Configuration: JSON-based settings with environment variable override
- Host Management: Local host file configuration for development
- Network Operations: Port management and firewall configuration
- Multi-Environment: Support for local, staging, and production deployments
-
PowerShell 5.1+: The automation engine requires PowerShell with script execution enabled
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Administrator Privileges: Many operations require elevated permissions for system configuration
-
SqlServer PowerShell Module: Required for database operations
Install-Module -Name SqlServer -Force -AllowClobber
- Visual Studio: Required for solution building and TFS integration
- Microsoft SQL Server: For database-related operations
- IIS: For web application deployment
- Docker: For containerized deployment scenarios
- 7-Zip: For archive extraction operations
- Azure CLI: For Azure deployment automation
The framework requires proper configuration through JSON settings files that define:
- Database connection strings and authentication
- File system paths for applications and tools
- Environment-specific deployment targets
- Network and security configurations
Execute a predefined plot with default settings:
.\Run.ps1 fullinstall
Specify custom settings and sections:
.\Run.ps1 -Plot fullinstall -Settings production -Verbose
List available plots:
.\Run.ps1 -Help plots
List available steps:
.\Run.ps1 -Help steps
Execute individual steps:
.\Run.ps1 -Step createdb:production
Run.ps1
: Main entry point and orchestration engineAutoExt/
: Auto-loaded PowerShell modules containing step definitionsSettings/
: JSON configuration files for different environmentsDeploy/
,Dev/
,Ops/
: Specialized script collectionsTools/
: External utilities and dependencies
- Initialization: Load configuration and modules from
AutoExt/
directory - Configuration Merge: Combine default and environment-specific settings
- Plot Resolution: Resolve plot name to sequence of steps
- Step Execution: Execute each step with appropriate error handling
- Result Reporting: Return execution status and optional JSON results
Add custom functionality by creating PowerShell modules in the AutoExt/
directory:
Function Step-CustomOperation {
[CmdletBinding(SupportsShouldProcess=$True)]
Param([Parameter(Mandatory=$false)][string]$Section="Project")
try {
# Your custom logic here
$script:Result = 0
}
catch {
$script:Result = 1
}
}
Complete SenseNet installation from scratch:
.\Run.ps1 fullinstall
Steps: Get templates → Restore packages → Build → Deploy → Create database → Install services → Configure → Start
Containerized application deployment:
.\Run.ps1 netcoredockertest
Steps: Container setup → Database creation → Build images → Deploy containers → Network configuration
Deploy to production environment:
.\Run.ps1 fulldeploy -Settings production
Steps: Stop services → Build → Deploy → Database update → Restart services
Database backup with site management:
.\Run.ps1 backup
Steps: Stop site → Backup database → Restart site
project-default.json
: Base configuration and common plotsproject-local.json
: Local development overridesproject-production.json
: Production environment settings- Custom settings: Create environment-specific configurations as needed
Override any setting using environment variables with PLOTMANAGER_
prefix:
$env:PLOTMANAGER_DataSource = "production-sql-server"
$env:PLOTMANAGER_InitialCatalog = "ProductionDB"
{
"Plots": {
"myplot": ["step1", "step2:section", "step3"]
},
"Project": {
"DataSource": "localhost",
"InitialCatalog": "mydb",
"WebAppName": "myapp"
},
"CustomSection": {
"DataSource": "remote-server"
}
}
- How to Execute Plots - Comprehensive guide to running automation scenarios
- Step Execution - Running individual automation steps
- Configuration Guide - Setting up environments and configurations
- Custom Steps - Creating custom automation steps
- Build Server Integration - CI/CD integration patterns
- Step functions follow the naming convention
Step-{Name}
- All steps accept optional
Section
parameter for configuration targeting - Return codes: 0 (success), 1 (failure)
- JSON results available through
$Global:JsonResult
variable
- Create PowerShell function in
AutoExt/
directory - Follow naming convention:
Step-{YourStepName}
- Include proper error handling and result codes
- Add synopsis for help system
- Test with multiple environment configurations
- Use
[CmdletBinding(SupportsShouldProcess=$True)]
for all steps - Implement try/catch with proper
$script:Result
setting - Use
Write-Verbose
for detailed logging - Follow existing parameter patterns for consistency
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or contributions, please refer to the project's issue tracking system or contact the development team.
Note: This framework has evolved from SenseNet-specific tooling into a general-purpose operational automation platform. While SenseNet CMS deployment remains a core use case, the framework now supports diverse automation scenarios across different platforms and technologies.