Closed rodneymiller12 closed 6 years ago
I just updated to DFSDsc 4.0.0.0 so that I am on the latest release, however there is still no hub and spoke support
Are you seeing this being add to an existing resource, or do you see this being one or more new resources?
Id like to see it as an option to the DFSReplicationGroupConnection resource. If you give it more than one destination computer set a connection up to each computer using the prime node as the master
Hi @rodneymiller12 - You can actually do this already. You need to add multiple DFSReplicationGroupConnection
resources -one for each source/destination combo. So you'd have the same source but multiple destinations. This example: https://github.com/PowerShell/DFSDsc/wiki/DFSReplicationGroup#example-3 sort of does it.
This works because the Key for this resource is a combo of SourceComputerName, DestinationComputerName and ResourceGroupName.
But if it helps we could add an actual example of hub and spoke.
It has been a while though - so it is possible there is something preventing this model, but it was definitely one of my user scenarios I was implementing when I created this.
I am aware that currently you can add multiple connections, however what I am trying to solution is the following. I am creating a webserver and sometimes webserver pairs and sometimes 8 webservers that will all be connected to each other with one server being the primary. I would like to only have to call the DSC one time to set up DFS. If the DFSReplicationGroupConnection resource had the ability to accept one SourceComputerName and an array of DestinationComputerNames I could solution this with one call. Due to the fact that it currently cannot I have to put some looping smarts around my ARM template to call the DSC template which is not ideal. Unless Im mistaken this is Hub and Spoke
I think I understand. So this is more about being able to do the config in an easier way rather than it not being able to be done?
Is it possible to use a for loop within the config itself and parameterize instead?
I'll take at the resources and see if it is possible to change the key into an array. It may be simple enough but we generally don't use arrays as keys (in fact it may be completely prevented). So making the field required instead of key might be involved which opens up other problems. But I'll see what I can do - but it just might not be possible. So I would suggest looking into using a loop in your config - that would be a pretty easy way to do it IMHO. But I might be missing something...?
@PlagueHO Arrays are not allowed to be keys, I have tried. 🙂
Thanks @johlju I did suspect as much but I was on a plane when I wrote that so didn't have resource to check :grin:
Thanks everyone. I will look into adding a for loop to the connection for the member nodes. Appreciate everyone's time
Closing this at this time. If this was not resolved then please reopen or comment. Thanks!
On second thought, lets rename this issue to add an example showing a hub and spoke topology as suggested by @PlagueHO.
@johlju you read my mind :grin: in back home now from travelling around nz for work so can catch up on some dsc stuff.
Still prepping my lab to test out the Hub & Spoke config (I needed to update LabBuilder to use all the newly renamed DSC modules :grin:).
Great to get LabBuilder to use the latest renamed modules :) Hope it was a nice trip around NZ and you got time to see things too :)
Just waiting for NetworkingDsc to be released to finish the final changes to LabBuilder to fully support the newly minted *Dsc resources! :grin:
Trying to use DFSDsc not to ensure a configuration but to do setup work. I have a scenario where Im using an Azure ARM template to call DFSDsc. My member nodes array could be 2 servers or 10 and with not supporting the Hub and Spoke technology I have to find a way to run DFSGroupConnections multiple times if there are more than two nodes in my member nodes group. The big picture is to be able to use this for 2 servers or 10 without having to hardcode values. Hub and Spoke support would allow me to do that. We do not want to implement full mesh due to network traffic
The DSC configuration that is using the resource (as detailed as possible): xDFS
Version of the Operating System and PowerShell the DSC Target Node is running: Windows server 2012 and 2016
Version of the DSC module you're using, or 'dev' if you're using current dev branch: Latest version