Upgrade to Pro — share decks privately, control downloads, hide ads and more …

.NET Day 19 - DOCKER + AZURE DEVOPS + KUBERNETE...

.NET Day 19 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥ by Marc Müller

DOCKER + AZURE DEVOPS + KUBERNETES = ♥

dotnetday

May 28, 2019
Tweet

More Decks by dotnetday

Other Decks in Technology

Transcript

  1. ▪ Versioned artifact ▪ Isolated deployable unit ▪ Container image

    is bit by bit identical when deployed ▪ Abstraction of data center resources ▪ ▪ Orchestration is “Cattle Business” ▪ ▪
  2. 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 App A App A’ App B App B’ App B App B’ App B App B’ Containers are isolated, but share OS and, where appropriate, bins/libraries Bins/Libs Image Source: https://sec.ch9.ms/sessions/build/2016/B822.pptx
  3. FROM microsoft/dotnet:2.1-aspnetcore- runtime WORKDIR /app COPY output/app . ENTRYPOINT ["dotnet",

    "HelloWorld.dll"] FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base WORKDIR /app EXPOSE 80 FROM microsoft/dotnet:2.1-sdk AS build WORKDIR /src COPY ["HelloWorld/HelloWorld.csproj", "HelloWorld/"] RUN dotnet restore "HelloWorld/HelloWorld.csproj" COPY . . WORKDIR "/src/HelloWorld" RUN dotnet build "HelloWorld.csproj" -c Release -o /app FROM build AS publish RUN dotnet publish "HelloWorld.csproj" -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "HelloWorld.dll"]
  4. ▪ ▪ Pod Container Pod Container Container 10.0.10.14 10.0.10.16 localhost

    Multi container Pods should only be used for highly coupled containers! Pod Container 10.0.10.15
  5. ▪ ▪ ▪ ▪ ▪ ▪ Service Pod Container Pod

    Container Pod Container A B A B A B A B
  6. Azure DevOps Azure Resource Group DCOS Master DCOS Master Master

    Agent Cert-Manager App1 App1 App1 App1 App1 App2 Git Build Release Internet Azure Load Balancer Ingress
  7. Azure DevOps Build Azure DevOps Release Docker Registry Build App

    Test Build Container Repo Helm Upgrade Publish to Target AKS (Cluster) Helm Chart (Config) Push Host / Cluster Pull Config Artifact
  8. Release v2 Deploy DB Schema Deploy Binaries Prod Environment v2

    Binaries v1 Prod Environment v2 Binaries v2 Release v2 Deploy Binaries Deploy DB Schema Prod Environment v1 Binaries v1 Binaries v2 Factory Prod Environment v2 Binaries v1 Binaries v2 Factory