We have tried lots of features to collaborate wtih Service Fabric, VSTS and Docker containers. I have realized it's needed to describe overview of the architecture, so you can learn it following this article.
At first, refer to the architecture diagram below. Purple lines mean processing flows of the CI/CD pipeline and green lines mean its setting dependencies.
Create below resources to setup this architecture.
- Service Fabric cluster
- VSTS Proejct, Build Process and Release Process
- Azure Container Registry
- Virtual Machines for VSTS Private Agent
In this article, you can find references to Service Fabric cluster, VSTS and Virtula Machines. But create Azure Container Registry for yourself and it should be quite easy.
a - Setup Private Agent for VSTS Build Definitions
Unfortunately, Windows Docker base image sizes are about 1.5G. It takes much time to download and build Docker images if you don't use Pirvate Agent. By caching the Docker images, its building time can be largely reduced.
b - Setup connections for Service Fabric cluster deployment
Setup your Service Fabric cluster at first, but note when you choose its instance type. Refer to What is workaround when you got error message "failure in a Windows system call: No hypervisor is present on this system." on Service Fabric Explorer - normalian blog when you specify hyper-v isolation mode in ApplicationManifest.xml.
- What is workaround when you got error message "failure in a Windows system call: No hypervisor is present on this system." on Service Fabric Explorer - normalian blog
- Step by step how to setup Service Fabric Explorer on Azure - normalian blog
- How to setup Service Fabric connections on VSTS - normalian blog
1. and 2. Create Build Definitions to make Windows Docker images and deployment artifacts
- How to build ASP.NET Framework Docker images on VSTS build tasks - normalian blog
- Create Service Fabric Deployment Package with Docker images on VSTS Build Task - normalian blog
Note when you choose Windows Docker base images. Unfortunately, it needs to be compatible between host OS and guest OS.
- What is workaround when you got error messages "There was an error during download.Failed" while downloading container images - normalian blog
You probably need to read below articles when you need to use your project name or something environment variables for Docker image names.