Deployment on Windows is harder than it should be.
Every Windows shop that manages its own servers does deployment their own way. Sometimes this involves an developer or ops staffer copying files to servers by hand. Other times it involves MSDeploy and pushing from a copy of Visual Studio. These processes are error prone, none repeatable and cause friction.
Some people script continuous deployments. Often leveraging tools like TeamCity, Jenkins or Go in conjunction with PowerShell scripts or batch files to coordinate an "automated xcopy". This is normally the sweet spot of getting people over the hump towards structured repeatable deployments. Building in this way though, often forces lots of your deployment knowledge to be tied up in scripts hidden in your CI server. You also end up with a signal/noise problem where your deployment files have a mix of responsibities, from building packages, physically copying files and then orchestrating an installation.
Deployd-micro is an attempt to build on these CI-based deployment systems by putting together a small suite of command line tools that can be chained together, removing all of the common tasks and friction from deployments. The project follows some core beliefs:
The aim of deployd is to take care of all the reusable bits. Take care of packaging, take care of transport, take care of installation, so that every time, you only need to think about your application concerns.
The idea is that you can chain these tools into any configuration you wish.
When you invoke "deployd /app=MyApp /i", deployd will:
You can override the app installation directory and the package source from the configuration .json file.
Your apps will be unpacked into: ~/Apps/AppName On install, version numbered backups are made in: ~/Apps/AppName/x.x.x.x
During install, the staged (unpacked, not-installed) version of your app will be searched for any files matching the following patterns:
All matching files found will be executed on the command line. Known extensions will be auto-executed in their appropriate environments presuming that you have all the information required to do this in your environment PATH.
An example:
hook-pre-install.rb will be executed as "ruby hook-pre-install.rb" on the command line.
All deployd directory paths are copied into environmental variables and made available if the script of your choice supports it. These variables start with "Deployd."
Presume you have a copy of TeamCity that is running as a CI server
On the target server, install deployd.watchman.
On the target server, configure deployd to point to your package source, perhaps a network share.
Optionally install deployd.mothership on a deployment server with the watchman installs set to autoregister.
Add a build step at the end of your build calling deployd-package to package your asset.
Add a build step to copy your package to your package location.
Add a call to deployd-remote with the package name and target server name as command line parameters.
You CI server, on pulling a code change, would then build your software, deployd would package it.
Your CI server would then copy the asset somewhere.
deployd-remote would ask watchman to invoke an install.
deployd would pull the package from the published source and install.