Minimal Suave Host for Azure Service Fabric
Based ok https://github.com/isaacabraham/ServiceFabricFsDemo.
Project shows how to host Suave application inside of Azure Service Fabric stateless service. It also demonstrates build, testing and releasing process which can be used for similar applications.
Build process
The automated build process contains:
- Restore dependencies using Paket
- Clean artifacts from previous build
- Update assembly infos and manifest files with version from RELEASE_NOTES.md file (this probably should be done differently - in Service Fabric you can have separate versioning for applications and services being part of it)
- Build application and tests projects
- Run unit tests (plain business logic tests - not testing anything Suave or Service Fabric releated)
- Package application
- Start local development Service Fabric Cluster (and remove previously deployed versions of application)
- Deploy application to local cluster.
- Run integration tests (testing Suave and Service Fabric hosting - making normal HTTP requests to locally deployed application)
- Push changes to GitHub, upload packaged application, create tag and release
- Deploy application to remote (Azure) Service Fabric cluster (only unsecured clusters) (no good upgrade story yet)
Build server
Project is configured to use appveyor build server for testing any changes to master branch and any PRs. Unfortunately right now it's only running unit tests - I haven't managed to start local development cluster on appveyor build server so Integration tests can't be run.