Advertisement
Advertisement

More Related Content

Similar to .NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥(20)

Advertisement

More from Marc Müller(20)

Recently uploaded(20)

Advertisement

.NET Day Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥

  1. Marc Müller Principal Consultant @muellermarc
  2. https://globaldevopsbootcamp.com
  3. Write Code Customer use the code Write Code Customer use the code
  4. 100 deployments per day!
  5. ▪ ▪ ▪ ▪ ▪ ▪ ▪
  6. ▪ Versioned artifact ▪ Isolated deployable unit ▪ Container image is bit by bit identical when deployed ▪ Abstraction of data center resources ▪ ▪ Orchestration is “Cattle Business” ▪ ▪
  7. 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
  8. My ASP.NET Core Application microsoft/dotnet:2.1.4- aspnetcore-runtime microsoft/dotnet:2.1-runtime- deps-alpine3.7 alpine:3.7
  9. 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"]
  10. docker build –t <reponame>:<tag> . docker image ls REPOSITORY TAG IMAGE ID HelloWorld latest 326387cea398
  11. Developer PC / Laptop Docker Engine Container Container Container
  12. ▪ ▪ ▪
  13. ▪ ▪ ▪ ▪ ▪ ▪
  14. ▪ ▪ ▪ ▪ ▪
  15. App1 App2
  16. ▪ ▪ ▪ ▪ ▪ ▪ ▪
  17. ▪ ▪ ▪ ▪
  18. ▪ ▪ 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
  19. ▪ ▪ Replication Controller / Deployment (Replication Set) Pod Container Pod Container Pod Container
  20. ▪ ▪ ▪
  21. ▪ ▪ ▪ ▪ ▪ ▪ Service Pod Container Pod Container Pod Container A B A B A B A B
  22. ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪
  23. ▪ ▪ ▪ ▪ ▪ ▪ Source: https://helm.sh/
  24. Source: https://docs.helm.sh/developing_charts/#charts
  25. Azure DevOps Azure Resource Group DCOS Master DCOS Master Master Agent Cert-Manager App1 App1 App1 App1 App1 App2 Git Build Release Internet AzureLoadBalancer Ingress
  26. 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
  27. ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪
  28. 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
  29. ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪
  30. ▪ ▪
  31. ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪
  32. ▪ ▪ ▪ ▪
Advertisement