Ship It or It Never Happened

Doguhan Uluca

Questions? Tweet to @duluca

If a tree falls in a forest and no one is around to hear it, does it make a sound?

⛴ 👈 or 👉 😣 🤷

DOGUHAN ULUCA

AngularForEnterprise.com

for discount codes visit

Shipping Code

Value Stream

Config. Gap

Repeat Intg.

n ➡️ n Deploys

Shipping Code

practice

🙏

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

📝

value

Features

Time

Quality

Roy Osherove

Ron Jeffries

Chet Hendrickson

deliver:Agile 2018

"It's not up to them

it's up to us [the developers]"

"Success with Agile

requires

Agile software development"

value

quality

Lean

Kanban

Scrum

LeSS

SAFe

SoS

Nexus

Spotify

, forward flow

consistent

of features

consistent,

value

quality

in engineering trying rarely ever counts

  • nobody reads the docs

  • lucky if anyone reads the code

  • managers and clients are tricky

  • process hamsters

  • "it's up to us"

Value Stream

GitHub Flow

Branch

Commit

Open Pull Request

Discuss and Review

Deploy

Merge

  • code review

  • isolation of changes

  • repeatable

  • high standards

💰

🔥

The Configuration Gap

Branch

Merge

Branch

Merge

Ship

Dockerfile

Anatomy of a Dockerfile

FROM

Dockerfile Inheritance

FROM
FROM
FROM
scratch

Anatomy of a Dockerfile

FROM
SETUP

Security

Dependencies

Docker Security

Host OS
Docker
Runtime
Image
Web Server
App

Anatomy of a Dockerfile

FROM
SETUP
COPY

Security

Dependencies

Copying Code

Host OS
Docker
Runtime
Docker Image
Web Server
App Code

Copying Code

Host OS
Docker
Runtime
minimal-node-web-server
Express.js
Angular
/dist
/usr/src/app

Anatomy of a Dockerfile

FROM
SETUP
COPY
CMD

Security

Dependencies

npm Scripts for Docker

bit.ly/npmScriptsForDocker

  • Living documentation

  • DevOps

  • Closes the configuration gap

Repeatable Integration

.circleci/config.yml

.circleci/config.yml

version: 2
jobs:
  build:
    docker:
      - image: docker:17.12.0-ce-git
    working_directory: /usr/src
    steps:
      - checkout
      - setup_remote_docker
      ...

Multi-stage Containers

Multi-Stage

FROM
FROM
FROM
as builder
as tester
COPY
from builder
CMD

duluca/lemon-mart

FROM
FROM
FROM
as builder
as tester
COPY
from builder
CMD

minimal-node-build-env

alpine-node-chromium

minimal-nginx-web-server

.circleci/config.yml

build:
  ...
    - run:
        name: Execute Pipeline
        command: |
          docker build -f Dockerfile.integration . -t lemon-mart
          ...
    - store_artifacts:
        path: docker-cache/built-image.tar
        destination: built-image.tar
    - store_test_results:
        path: tests/units.html
  • Declarative

  • Infrastructure-as-Code

  • Repeatable Integration

n ➡️ n Deploys

Local build

CI-x build

...

.circleci/config.yml

publish:
...
steps:
  - restore_cache:
    keys:
      - built-image-{{ .BuildNum }}
  - run:
      name: Sign into AWS ecr
      command: $(aws ecr get-login)
  - run:
      name: Push it to ECR
      command: |
        docker load < docker-cache/built-image.tar
        docker tag my_app $AWS_ACCOUNT_ID.$AWS_URL/lemon-mart
        docker push $AWS_ACCOUNT_ID.$AWS_URL/lemon-mart

npm Script for AWS

bit.ly/npmScriptsForAWS

npm run aws:fargate-release
heroku container:push web -a lemon-mart
now --docker --public
  • Declarative
  • Infrastructure-as-Code
  • Repeatable deployments
  • n ➡️ n Flexibility

Shipping Code

Value Stream

Config. Gap

Repeat Intg.

n ➡️ n Deploys

⛴ 👈 or 👉 😣 🤷

deliver:Agile

XP 2018

Agile Portugal 2018

Angular Mix

Questions? @duluca

AngularForEnterprise.com

for discount codes visit