I have a Multi-tenant Deployment projects . I have about 200 tenants, each tenant represents an ASP.net site. How can I compare these 200 tenants with one master site. Like I have a master copy that has all the files and folders and I need to see that every files and folders in this master copy matches with the files and folders in my 200 tenants. If there is a mismatch It gives me the list of files that don’t match
Any help would be greatly appreciated.
Thanks for getting in touch!
While we don’t have anything built in to Octopus, with a bit of scripting work I think we can come up with a plan that should get you where you need to go.
Firstly, you’ll need a Powershell script that can go through the directories and compare files. StackOverflow (as always) has a good starting point. It will then need to throw an error if the files mismatch, and write out the name/locations of the mismatched files to a file.
Once you have the above you can add that code to your Octopus health check, as that runs periodically and will mark the machine as “unhealthy” when the script fails. You can then use a subscription to alert you that a machine has gone out of state (or fire a project to scrape that file from disc and email you its contents).
Depending on how you want to proceed you could also automatically trigger a re-deployment to that machine to get it back into a “healthy” state. While this blog post is talking about DSC, functionally the process is the same.
I hope that helps, any questions let me know!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.