EPS Installer Service
The EPS Installer Service is a service that is used to install other services. The service can be used and called like any other service, but it is more common to use the standard client application (which is also part of the installer service solution - it's called EPS.ServiceInstaller.Client).
The standard client looks like this:
The left side of this UI represents the client environment (dev environment). The location textbox at the top can be used to point the tool to a Visual Studio project directory for the service that is to be deployed. (This has to be the actual location of the Windows Service Host project within the solution, NOT the solution folder).
Note: The “Discover” button can be used to make the utility search for all Windows Services folders that can be found on the local machine. Using this feature may take a while, as all locations on the local harddrives are searched. Once that search is complete, one can click the down-arrow of the location drop down and see all the locations that have potential service projects. (Note: This is not the most intuitive process, but hey, it works! 😃).
Once a location is chosen, click “Install” to install the service on the server. This packages up all the files in the Release build folder and sends them to the server (it knows what server to choose, since it knows where the installer server side components reside). On the server, the system searches for a previously installed version and uninstalls it if need be. Then, the new version is installed and started. If this fails, the system uninstalls the service again, and reverts to the previous version (if there was one). All deployment versions get their own install folder on the server, so all versions get preserved until they are explicitly deleted.
Note: There currently is a known issue with uninstalling services. This doesn't happen all the time, but sometimes the uninstall succeeds, but the service remains in the system flagged as deleted, until the “EPS Service Installer service” is stopped and re-started. If that happens, you have to first click “Uninstall” and then Remote Desktop into SVC1 and stop and start the EPS Service Installer service and then return to the client UI and click “Install”. Note that the service you are installing is down between uninstalling and finally installing. So you want to do this as swiftly as possible. If this doesn't solve the issue, the machine has to be rebooted, unfortunately. This is a known problem and one we do not have a solution for.
The right-hand side of the tool represents the server environment. Click “Refresh” to see all the services installed on the server and what their status is. You can do things like start and stop services. You can also uninstall services from there. At that point, the service is of uninstalled status, but still resides on the server. You can then click “Install” to reinstall the same version of the service again. (This process just registers and unregisters the services with the Windows Service system, but it doesn't remove the actual files from the server).
You can also click on a service in the list to see more detail about the service. In particular, you can see all the older versions of the service that still reside on the server. You can also choose to remove older files from the server. (Note: The most recent version can not be removed in this way). You can also click on each version to see the config file for each service, which is often useful.
Modifying the Installer Service
The installer service is a standard WCF service that can be modified the same way all other services can. The main difference is that the installer service itself can't be deployed through itself. Instead, the Windows Service host that represents the server-side components of the installer service have to be copied manually onto SVC1 (and into the “Service Installs\EPS Service Installer\x.x.x.x” folder and then be installed using InstallUtil.exe in the command line.