Configuration in Plot Manager is handled through JSON settings files that define environment-specific parameters, plot definitions, and operational settings. The framework uses a layered configuration approach where project-specific settings override default configurations.
project-default.json: Contains base settings and common plot definitionsproject-local.json: Local development environment overrides- Environment-specific files: Custom configurations for different deployment targets
When executing plots, the framework merges configurations in this order:
- Load default settings from
project-default.json - Load environment-specific settings (e.g.,
project-local.json) - Project settings override default settings where conflicts exist
- Environment variables with
PLOTMANAGER_prefix override any setting
Defines automation scenarios as sequences of steps:
{
"Plots": {
"fullinstall": [
"stop",
"restorepckgs",
"prbuild",
"dropdb",
"snservices",
"createsite",
"start"
],
"backup": [
"stop",
"backupdb",
"start"
]
}
}Step Syntax: Steps can include section targeting using colon notation:
"index": Execute step with default section"index:TestSite": Execute step using "TestSite" configuration section
Defines resource locations and shared paths independent of specific environments:
{
"Source": {
"PackagesPath": "..\\Packages",
"DbBackupFilePath": "..\\Databases\\project-latest.bak",
"DatabasesPath": "..\\Databases\\",
"VsTemplatesRepo": "https://github.com/SenseNet/sn-vs-projecttemplates",
"TemplatesBranch": "master",
"SnWebFolderFilePath": "..\\Archives\\project-Web.zip"
}
}The default configuration section for most steps, typically containing local development settings:
{
"Project": {
"DataSource": "MySenseNetContentRepositoryDatasource",
"InitialCatalog": "sensenetdb",
"WebAppName": "sensenetapp",
"AppPoolName": "sensenetapp",
"Hosts": ["sensenet.local"],
"DotNetVersion": "v4.0",
"WebFolderPath": "..\\WebApplication",
"AsmFolderPath": "..\\WebApplication\\bin",
"WebConfigFilePath": "..\\WebApplication\\web.config"
}
}DataSource: SQL Server instance name or connection stringInitialCatalog: Database nameUserName: SQL Server authentication username (optional)UserPsw: SQL Server authentication password (optional)
WebAppName: IIS site nameAppPoolName: IIS application pool nameDotNetVersion: .NET Framework version (e.g., "v4.0")Hosts: Array of hostnames for local development
WebFolderPath: Web application root directoryAsmFolderPath: Binary assemblies directory (typically bin/)ToolsFolderPath: Utilities and tools directorySolutionFilePath: Visual Studio solution file path
SnAdminFilePath: Path to snadmin.exe utilityIndexerPath: Path to index populator executableRepoFsFolderPath: Repository content import directoryDeployFolderPath: Deployment manifest directory
Create custom sections for different deployment targets:
{
"Production": {
"DataSource": "prod-sql-server",
"InitialCatalog": "ProductionDB",
"WebAppName": "ProductionSite",
"MachineName": "PROD-SERVER-01"
},
"Staging": {
"DataSource": "staging-sql-server",
"InitialCatalog": "StagingDB",
"WebAppName": "StagingSite"
}
}Defines paths to external utilities used by various steps:
{
"Tools": {
"VisualStudio": "C:\\Program Files\\Microsoft Visual Studio\\2019\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\tf.exe",
"UnZipperFilePath": "C:\\Program Files\\7-Zip\\7z.exe",
"NuGetFilePath": "..\\Tools\\nuget\\nuget.exe"
}
}Any configuration setting can be overridden using environment variables with the PLOTMANAGER_ prefix:
# Override database settings
$env:PLOTMANAGER_DataSource = "new-sql-server"
$env:PLOTMANAGER_InitialCatalog = "NewDatabase"
# Override application settings
$env:PLOTMANAGER_WebAppName = "TestApplication"- Store sensitive data like passwords in environment variables rather than configuration files
- Use SQL Server integrated authentication when possible
- Protect configuration files with appropriate file system permissions
- Keep environment-specific settings separate from shared configurations
- Use descriptive section names without special characters or spaces
- Document custom configuration properties and their purpose
- Regularly validate configuration paths and ensure tools are accessible
- Test configurations across all target environments
- Version control configuration files but exclude sensitive data