What tool / technology: system management for databases and dependent services

Further consideration of this system management issue :

Since I probably don't get a lot of serverfault reviews , I will try here.

My main task is to reflect the dependencies between the databases, services and tasks / tasks that I will need to manage.

In addition to using Powershell, I even thought about using MSBuild because it will allow us to model dependencies and reuse configuration goals.

In other words: . What technology should be used to develop a flexible solution that will allow me to stop servicing A, B and C on machine D in the correct order and disable task E on machine F when removing database X?

... and I would like to reuse the part to stop serving B and C when deleting database Y.

+3
source share
1 answer

If you are familiar with PowerShell and want to work with dependencies, try psake . What does it look like:

psake script.ps1:-------
properties {
 $dbServer = 'sqlexpress'
 ...
}
task default -depend StopServer1, StopServer2

task StopS1 -depend MakeS1Backup, StopSqlServer1 {
 ...
}
task MakeS1Backup {
 ... make backup
}
task StopSqlServer1 {
 stop-service ...
}
# and anything similar to StopServer2

Then you can call it that (there are more options):

Invoke-Psake script.ps1 
#or
Invoke-Psake script.ps1 -task StopS1 #calls only StopS1 task and all other scripts it depends on
#or
Invoke-Psake script.ps1 -task MakeS1Backup #only backups S1, it doesn't depend on anything else

- 1 ( StopS1), , StopS1. , S1 S1 Sql 1 ..

, msbuild, ( ).

+5

Source: https://habr.com/ru/post/1745509/


All Articles