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

Best Practices for Using Developer Tooling to D...

Best Practices for Using Developer Tooling to Drive Operations with GitOps

More and more businesses are requiring developers to own end-to-end delivery, including operational ownership. In this talk, Ilya will take you on a journey of discovery into the world of GitOps. He will share with you what it means, and how easy it is to create cloud native applications, CICD pipelines, integrate operations and more, using GitOps. Inherited from best practices going back 10-15 years, cloud native is making these practices more relevant today. At Weaveworks, their experiences are based on operating a full CNCF stack in anger for more than two years. This includes continuously updated Kubernetes, Prometheus, Istio, OpenTracing, and more. Ilya will showcase best practices and tools, including some of Weaveworks’ use cases.

Ilya Dmitrichenko

June 15, 2018
Tweet

More Decks by Ilya Dmitrichenko

Other Decks in Technology

Transcript

  1. * Running tests √ Tests OK * Building container image

    # docker build -t $APP:$REV # docker push $APP:$REV * Deploying to Kubernetes # kubectl set image deployment/$APP $APP=$APP:$REV * Build finished √ “CIOps”
  2. – local setup # skaffold.yaml apiVersion: skaffold/v1alpha2 kind: Config build:

    artifacts: - imageName: podinfo docker: dockerfilePath: ./Dockerfile.ci deploy: kubectl: { manifests: [ deploy/skaffold/dev/* ] }
  3. – local setup # skaffold.yaml apiVersion: skaffold/v1alpha2 kind: Config build:

    artifacts: - imageName: podinfo docker: dockerfilePath: ./Dockerfile.ci deploy: kubectl: { manifests: [ deploy/skaffold/dev/* ] }
  4. – CI setup # skaffold.yaml apiVersion: skaffold/v1alpha2 kind: Config build:

    {} # <snip> deploy: {} # <snip> profiles: - name: test # <snip>
 - name: production # <snip>
  5. – CI setup # skaffold.yaml (continued) - name: test ##

    This profile runs unit tests and builds the image build: local: { skipPush: true } artifacts: - imageName: stefanprodan/podinfo docker: dockerfilePath: ./Dockerfile.ci deploy: {} # no-op
  6. – CI setup # skaffold.yaml (continued) - name: production ##

    This profile pushes the image build: local: { skipPush: false } artifacts: - imageName: stefanprodan/podinfo docker: dockerfilePath: ./Dockerfile.ci deploy: {} # no-op
  7. – CI setup # .circleci/config.yml version: 2 jobs: test: {}

    # <snip> deploy: {} # <snip> workflows: main: jobs: - test - deploy: requires: [test] filters: { branches: {only: [master]} }
  8. – CI setup # .circleci/config.yml (continued) test: docker: - image:

    errordeveloper/skaffold:66cc263e
 steps: - checkout - setup_remote_docker: {docker_layer_caching: true} - run: command: skaffold build --profile=test
  9. – CI setup # .circleci/config.yml (continued) deploy: docker: - image:

    errordeveloper/skaffold:66cc263e
 steps: - checkout - setup_remote_docker: {docker_layer_caching: true} - run: command: | scripts/docker_login.sh skaffold build —profile=production
  10. – Using Weave Flux (open-source) apiVersion: apps/v1 kind: Deployment spec.template.spec.containers:

    - name: flux image: quay.io/weaveworks/flux:1.4.0 args: - [email protected]:stefanprodan/podinfo - --git-path=deploy/skaffold/production - --git-branch=master