Docker ohne Kubernetes

Docker ohne Kubernetes

Wie kommt man von einer herkömmlichen PHP-Plattform zu einer Lösung mit Containern, wenn man den notwendigen Aufwand für Kubernetes nicht leisten kann?

Dd04c77354394458bbd4afd64bf7e8b3?s=128

Frank Kleine

October 13, 2018
Tweet

Transcript

  1. 4.

    B::IT 25 people Identity Management (EIAM, LDAP, etc.) Intranet (InsideNET,

    ONE) Tools for Collaboration (Wiki, Dev-Jira, Bitbucket)
  2. 9.

    JUNE 21 2016 Yesterday I thought again over the hlt/xenon

    topic and aggregation on a VM. Couldn’t this be a use case for Docker? Jens (Head of IT Operations Data Services)
  3. 14.

    OCTOBER 2016 Kernel panics & incompatibilities between
 Kernel & file

    systems. https://inside.1and1.org/one/#walls/1112/posts/40582
  4. 18.

    DOCKER SWARM No one ever used this in production. Otherwise

    the lack of working features can’t be explained.
  5. 22.
  6. 28.
  7. 31.

    PROXY <Proxy "balancer://navigation-proxy"> ProxySet failonstatus=418 BalancerMember http://bitservicesdockerqabsa01.mw.server.lan:80 retry=10 timeout=2 BalancerMember

    http://bitservicesdockerqabsa02.mw.server.lan:80 retry=10 timeout=2 </Proxy> ProxyPass /navigation/ "balancer://navigation-proxy/navigation/"
  8. 33.

    BYREQUESTS => Mon Jun 18 14:24:58 CEST 2018 HTTP/1.1 200

    OK Host: bitdocker01:8123 => Mon Jun 18 14:24:59 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123 => Mon Jun 18 14:25:00 CEST 2018 HTTP/1.1 200 OK Host: bitdocker01:8123 => Mon Jun 18 14:25:01 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123
  9. 34.

    DOWN: 01 => Mon Jun 18 14:25:51 CEST 2018 HTTP/1.1

    200 OK Host: bitdocker01:8123 => Mon Jun 18 14:25:52 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123 => Mon Jun 18 14:25:55 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123
  10. 35.

    UP: 01 => Mon Jun 18 14:25:55 CEST 2018 HTTP/1.1

    200 OK Host: bitdocker02:8123 => Mon Jun 18 14:25:56 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123 => Mon Jun 18 14:25:57 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123 => Mon Jun 18 14:26:05 CEST 2018 HTTP/1.1 200 OK Host: bitdocker01:8123 => Mon Jun 18 14:26:06 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123
  11. 36.

    DOWN: BOTH => Mon Jun 18 14:26:09 CEST 2018 HTTP/1.1

    200 OK Host: bitdocker01:8123 => Mon Jun 18 14:26:10 CEST 2018 HTTP/1.1 200 OK Host: bitdocker02:8123 => Mon Jun 18 14:26:11 CEST 2018 HTTP/1.1 503 Service Unavailable => Mon Jun 18 14:26:14 CEST 2018 HTTP/1.1 503 Service Unavailable => Mon Jun 18 14:26:17 CEST 2018 HTTP/1.1 503 Service Unavailable => Mon Jun 18 14:26:18 CEST 2018 HTTP/1.1 200 OK Host: bitdocker01:8123
  12. 38.

    TRÆFIK Instance on each Docker host Listens to Docker backend

    Routes managed via labels on containers
  13. 41.

    CONTAINER version: "2.0" services: web: image: "bit-registry.1and1.org/bbc/frontend:latest" restart: unless-stopped network_mode:

    bridge command: [ "-streamLocation", "http://idevplaindockerqsa01.mw.server.lan:8081/hls/", "-streamHost", "idevplaindockerqsa01.mw.server.lan", "-goshHost", "idevplaindockerqsa01.mw.server.lan", "-basepath", "/streams/", "-db", "/secrets/database", "-csrfAuthKey", "/secrets/csrfAuthKey", "-loginURL", "https://stage.inside.1and1.org/signin", "-validateURL", "https://stage.inside.1and1.org/signin/serviceValidate" ] volumes: - /opt/ui/data/bit-docker/credentials/bbc/database:/secrets/database - /opt/ui/data/bit-docker/credentials/bbc/csrfAuthKey:/secrets/csrfAuthKey labels: - "traefik.backend=bbc_frontend" - "traefik.frontend.rule=PathPrefixStrip:/streams" - "traefik.port=8443" - "traefik.enable=true"
  14. 45.

    DELIVERYFILE version: 1.0 application: bit-docker/teapot deployment: parallel environments: qa: cluster:

    - https://bitbucket.1and1.org/projects/BIT/repos/bit_cluster/raw/bitservicesqa.yml files: - docker-compose-qa.yml prod: cluster: - https://bitbucket.1and1.org/projects/BIT/repos/bit_cluster/raw/bitservicesprod.yml files: - docker-compose.yml
  15. 46.

    ROLLOUT On each single server Accepts the tar file, unpacks

    it Classic blue/green deployment Starts & stops instances w/ docker-compose Zero downtime with deployment mode “parallel”
  16. 48.

    PITFALLS Clean up old images on single hosts! Ensure log-opts:

    max-size is set when using json-file log-driver