Installing Packages
Overview
Besides being an interface to controlling applications with long running processes, Services also let you manage package deployment.
Because Service is a subtype of Deployment, it too has a Deploy workflow that calls Packages-Install to install any package dependencies. The difference is how the Deploy workflow is structured. Because services typically need to be restarted after their software packages are installed, the Deploy workflow interleaves stop and start operations.
The diagram below describes the Deploy workflow in Service. It's a four step operation that begins by stopping the service, running the package installation, calling a hook to customize configuration, finally re-starting the Service.

Setup
The necessary setup is the same as the one described in the Installing packages section called Bound by deployment. The described setup entailed defining packages as dependenices to the Deployment object. With these dependencies in place the Packages-Install command invoked via the Deploy workflow cycles through the package dependencies, installing each of them.


