Event though my question is somewhat development-related, I believe it's more of an IT Pro question, so please keep reading if you're not a developer!
I am developing a custom Service Application. I have a Farm scoped Feature Receiver to add instances of my SPService, SPServiceProxy and SPServiceInstance derived types to the Farm.
Regarding the SPServiceInstances, I iterate through each SPServer in SPFarm.Local.Servers and if it's an Application Server or a Web Front End, I register an instance of my SPServiceInstance derived type against the SPServer. This all works well, and it allows me to go into Central Admin and start/stop the service on a particular server using the Services on Server page.
Now, what if we decided to add a few more servers to the farm after we have activated our abovementioned Farm scoped feature and created the Service Application etc, and we need these new servers to also run our existing Service Application? These new Servers will not have the SPServiceInstance registered against them, so the Service cannot be started on these Servers. I don't like the idea of deactivating / activating the feature. Also, this problem must also exists for out-of-the-box Service Applications, so there must be a recommended way of handling this scenario. Can anyone point me in the right direction? Is PowerShell the answer?