Creating automated release pipelines with VSTS and Kubernetes for ASP.NET Core Microservices (EN) Marc Müller - 4tecture GmbH
Nowadays, everybody is talking about Docker and Microservices. But how does that affect me as a developer working with the Microsoft stack? In this session Marc shows how to build an automated release pipeline using Visual Studio and VSTS which deploys ASP.NET Core Microservices into a Kubernetes infrastructure. In addition to the full developer stack needed to build the pipeline, the session covers advanced topics, such as staging environments and load-balancing.
11. ▪ Versioned artifact
▪ Isolated deployable unit
▪ Container image is bit by bit identical when
deployed
▪ Abstraction of data center resources
▪
▪ Orchestration is “Cattle Business”
▪
▪
12.
13. Server
Host OS
Hypervisor
Server
Host OS
Docker Engine
Guest
OS
Guest
OS
Guest
OS
Bins/Libs Bins/Libs
App A App A’ App B
Bins/Libs Bins/Libs
AppA
AppA’
AppB
AppB’
AppB
AppB’
AppB
AppB’
Containers are isolated, but
share OS and, where
appropriate, bins/librariesBins/Libs
Image Source: https://sec.ch9.ms/sessions/build/2016/B822.pptx
16. Developer PC / Laptop
Docker Engine
Container Container Container
17. FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "a.dll"]
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80
FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY *.sln ./
COPY SampleWebApplication/SampleWebApplication.csproj
SampleWebApplication/
RUN dotnet restore
COPY . .
WORKDIR /src/SampleWebApplication
RUN dotnet build -c Release -o /app
FROM build AS publish
RUN dotnet publish -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "SampleWebApplication.dll"]