Slide 1

Slide 1 text

Shipping containers How containers will change the way we ship software

Slide 2

Slide 2 text

https://www.pexels.com/photo/business-cargo-cargo-container-city-262353/

Slide 3

Slide 3 text

● Basic concepts ● Containers in the wild ● How could Redgate leverage containers? ● What’s next? Table of contents

Slide 4

Slide 4 text

macOS web app dep1 dep2 8000

Slide 5

Slide 5 text

macOS linux web app dep1 dep2 8000

Slide 6

Slide 6 text

macOS linux web app dep1 dep2 8000 8000

Slide 7

Slide 7 text

macOS linux CLI dep1 dep2 >_ >_

Slide 8

Slide 8 text

FROM XXX COPY XXXXXX RUN XXXXXXX RUN XXXXXXX 1251debdf2 2346ad27d7 568ba9896f 1b7da6b599 1b7da6b599 Dockerfile image container

Slide 9

Slide 9 text

FROM XXX COPY XXXXXX RUN XXXXXXX RUN XXXXXXX 1251debdf2 2346ad27d7 568ba9896f 1b7da6b599 1b7da6b599 127a749973 30285e40a4 072756f83c 79b149c433 532e43ed02 1251debdf2 8a05d95840 2346ad27d7 409df063b4 568ba9896f ca548745fe 1b7da6b599 Dockerfile image registry container

Slide 10

Slide 10 text

● CLIs, services and databases ● CI/CD agents ● Orchestration Containers in the wild

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

$ docker run --rm mesosphere/aws-cli --version

Slide 14

Slide 14 text

$ docker run --rm mesosphere/aws-cli --version aws-cli/1.14.5 Python/2.7.13 Linux/4.9.125-li…

Slide 15

Slide 15 text

$ docker run --rm mesosphere/aws-cli --version aws-cli/1.14.5 Python/2.7.13 Linux/4.9.125-li… image name makes container ephemeral AWS CLI command-line arguments

Slide 16

Slide 16 text

$ docker run --rm \ -e "AWS_ACCESS_KEY_ID=$(AWS_ID)" \ -e "AWS_SECRET_ACCESS_KEY=$(AWS_SECRET)" \ mesosphere/aws-cli \ ecr list-images

Slide 17

Slide 17 text

$ docker run --rm \ -e "AWS_ACCESS_KEY_ID=$(AWS_ID)" \ -e "AWS_SECRET_ACCESS_KEY=$(AWS_SECRET)" \ mesosphere/aws-cli \ ecr list-images AWS CLI command-line arguments defines environment variables

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

test_migrations.sh #!/bin/bash docker run \ -e POSTGRES_PASSWORD=mypwd -p 5432:5432 -d postgres:11 docker run --rm -v $(pwd):/flyway/sql boxfuse/flyway:5 \ -url=jdbc:postgresql://host.docker.internal:5432/postgres \ -user=postgres \ -password=mypwd \ migrate

Slide 20

Slide 20 text

test_migrations.sh #!/bin/bash docker run \ -e POSTGRES_PASSWORD=mypwd -p 5432:5432 -d postgres:11 docker run --rm -v $(pwd):/flyway/sql boxfuse/flyway:5 \ -url=jdbc:postgresql://host.docker.internal:5432/postgres \ -user=postgres \ -password=mypwd \ migrate

Slide 21

Slide 21 text

macOS linux CLI dep1 dep2 linux DB 5432 5432 host.docker.internal

Slide 22

Slide 22 text

macOS linux CLI dep1 dep2 linux DB 5432 mydb mynet

Slide 23

Slide 23 text

test_migrations.diff #!/bin/bash +docker network create mynet + -docker run \ +docker run --name mydb --network mynet \ -e POSTGRES_PASSWORD=mypwd -d postgres:11 -docker run --rm -v $(pwd):/flyway/sql boxfuse/flyway:5 \ - -url=jdbc:postgresql://host.docker.internal:5432/postgres \ +docker run --rm --network mynet -v $(pwd):/flyway/sql boxfuse/flyway:5 \ + -url=jdbc:postgresql://mydb:5432/postgres \ -user=postgres \ -password=mypwd \ migrate

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

dev.azure.com on-prem cloud Hosted agents

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

dev.azure.com on-prem cloud Containerised hosted agents Containerised local agent

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

DLL

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

● Containerised SQL Compare CLI ● Base images for SQL Change Automation ● Redgate Platform deployment models How could Redgate leverage containers?

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Windows >_ sqlcompare .NET Framework 4.6.1

Slide 37

Slide 37 text

> sqlcompare ` /Database1:WidgetStaging ` /Database2:WidgetProduction ` /Synchronize

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Host 13.6.0 Container >_ sqlcompare .NET Core 2.2 >_

Slide 40

Slide 40 text

Host Container >_ sqlcompare .NET Core 3.0 >_ 14.0.0

Slide 41

Slide 41 text

$ docker run --rm \ -e "SERIAL_NUMBER=$(RG_SERIAL_NUMBER)" \ redgate/sql-compare:13.6.0 \ synchronize \ --source WidgetStaging \ --destination WidgetProduction

Slide 42

Slide 42 text

$ docker run --rm \ -e "SERIAL_NUMBER=$(RG_SERIAL_NUMBER)" \ redgate/sql-compare:13.6.0 \ synchronize \ --source WidgetStaging \ --destination WidgetProduction image name version tag command-line arguments

Slide 43

Slide 43 text

A word on multi-stage builds

Slide 44

Slide 44 text

FROM mcr.microsoft.com/dotnet/core/sdk:2.2 COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN dotnet restore RUN dotnet publish -c Release -o out ENTRYPOINT ["dotnet", "out/MySolution.MyProject.dll"] Dockerfile

Slide 45

Slide 45 text

FROM mcr.microsoft.com/dotnet/core/sdk:2.2 COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN dotnet restore RUN dotnet publish -c Release -o out ENTRYPOINT ["dotnet", "out/MySolution.MyProject.dll"] Dockerfile build-specific

Slide 46

Slide 46 text

FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN dotnet restore RUN dotnet publish -c Release -o out FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS runtime WORKDIR /app COPY --from=build /app/src/MySolution.MyProject/out ./ ENTRYPOINT ["dotnet", "MySolution.MyProject.dll"] Dockerfile

Slide 47

Slide 47 text

FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build COPY ./src /app/src WORKDIR /app/src/MySolution.MyProject RUN dotnet restore RUN dotnet publish -c Release -o out FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS runtime WORKDIR /app COPY --from=build /app/src/MySolution.MyProject/out ./ ENTRYPOINT ["dotnet", "MySolution.MyProject.dll"] Dockerfile

Slide 48

Slide 48 text

FROM XXX COPY XXXXXX RUN XXXXXXX RUN XXXXXXX FROM XXX COPY --from ENTRYPOINT 53c59901c1 afa0e18698 ade8f7e850 a36426ba37 97c11f30b3 Dockerfile container 39603b1de3 d54c37ce8b 97c11f30b3 image (stage 1) image (stage 0)

Slide 49

Slide 49 text

$ docker build -t myimage . $ docker run --name myapp -p 5000:80 myimage

Slide 50

Slide 50 text

Host Container 5000 MySolution.MyProject ASP.NET Core 2.2 80

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

FROM redgate/sql-change-automation:1.0-sdk AS build COPY ./MyProject.Database /project WORKDIR /project RUN sca publish ./MyProject.Database.sqlproj --output ./artifacts FROM redgate/sql-change-automation:1.0-mssql AS db COPY --from=build /project/artifacts /sca/artifacts Dockerfile

Slide 53

Slide 53 text

FROM redgate/sql-change-automation:1.0-sdk AS build COPY ./MyProject.Database /project WORKDIR /project RUN sca publish ./MyProject.Database.sqlproj --output ./artifacts FROM redgate/sql-change-automation:1.0-mssql AS db COPY --from=build /project/artifacts /sca/artifacts Dockerfile 1.0-oracle 1.0-postgres 1.0-mysql

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

● OS-native server ● Redgate-provided cluster ● Customer cluster Proposed deployment models

Slide 56

Slide 56 text

● OS-native server ● Redgate-provided cluster ● Customer cluster Proposed deployment models

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

What if users don't have Docker installed?

Slide 60

Slide 60 text

is the new

Slide 61

Slide 61 text

What can we do to prepare for the future?

Slide 62

Slide 62 text

coming soon...

Slide 63

Slide 63 text

Play with Docker https://training.play-with-docker.com/ Katacoda https://www.katacoda.com/courses/docker Docker Documentation https://docs.docker.com/develop/ Learning resources

Slide 64

Slide 64 text

Thanks!