incrementalism
play

INCREMENTALISM An Industrial Strategy For Adopting Modern - PowerPoint PPT Presentation

INCREMENTALISM An Industrial Strategy For Adopting Modern Automation BACKGROUND MONOCULTURE RDBMS ARE RAD TROUBLEMAKER OPERATOR AND ENGINEER BACKGROUND MONOCULTURE RDBMS ARE RAD TROUBLEMAKER OPERATOR AND ENGINEER Industrial Techno


  1. v2.0.0

  2. v1.1.2 v2.0.0

  3. What's a Cluster Scheduler?

  4. redis.job job "redis" { datacenters = ["asia-east1", "asia-northeast1"] task "redis" { driver = "docker" config { image = "redis:latest" } resources { cpu = 500 # Mhz memory = 256 # MB network { mbits = 10 port "redis" {} } } } }

  5. redis-service.job job "redis" { datacenters = ["asia-east1", "asia-northeast1"] task "redis" { service { name = "redis" # redis.service.consul port = "redis" check { type = "tcp" interval = "30s" timeout = "2s" } } ... resources { network { mbits = 10 port "redis" { static = "6379" } } }

  6. Declare what you want to run

  7. Scheduler determines where and manages how to run

  8. v1.1.2 QTY: 1

  9. Developer-centric Release Management Reproducible Runtime Environments Provider Agnostic Runtime Native Hybrid-Cloud Consumption Model Self-Healing Infrastructure * Service Discovery and Secure Introduction Support

  10. myapp.job job "myapp" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" group "myapp" { count = 1 task "api" { driver = "docker" artifact { source = "https://s3.amazonaws.com/myorg/myapp.tar.gz" options { archive = "tar.gz" } } ...

  11. myapp.job config { load = ["myapp.tar"] image = "myorg/myapp" command = "/sbin/start_myapp" args = [ "-mode=api" ] network_mode = "host" pid_mode = "host" } service { name = "${TASKGROUP}" # myapp.service.consul tags = [ "api" ] # api.myapp.service.consul port = "api" check { type = "http" path = "/health.txt" interval = "5s" timeout = "2s" } } }

  12. myapp.job task "web" { driver = "docker" config { load = ["myapp.tar"] image = "myorg/myapp" command = "/sbin/start_myapp" args = [ "-mode=web" ] network_mode = "host" pid_mode = "host" } service { name = "${TASKGROUP}" # myapp.service.consul tags = [ "web" ] # web.myapp.service.consul port = "web" check { type = "http" path = "/health.txt" interval = "5s" timeout = "2s" } }

  13. myapp.job $ nomad plan myapp.job $ nomad run -check-index 12515398 myapp.job

  14. v1.1.2 v2.0.0 QTY: 20 QTY: 0

  15. myapp-green.job job "myapp-green" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" group "myapp" { count = 19 task "api" { driver = "docker" artifact { source = "https://s3.amazonaws.com/myorg/myapp-v123.tar.gz" options { archive = "tar.gz" } } ...

  16. myapp-blue.job job "myapp-blue" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" group "myapp" { count = 1 task "api" { driver = "docker" artifact { source = "https://s3.amazonaws.com/myorg/myapp-v124.tar.gz" options { archive = "tar.gz" } } ...

  17. myapp-blue.job $ nomad plan myapp-blue.job + Job: "myapp-blue" + Task Group: "myapp" (1 create) + Task: "api" (forces create) Scheduler dry-run: - All tasks successfully allocated.

  18. blue: myapp-v124 100% Green 95% Green 70% Green 90% Blue 100% green: myapp-v123 Blue

  19. v1.1.2 v2.0.0 QTY: 20 QTY: 0

  20. myapp-green.job job "myapp-green" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" group "myapp" { count = 0 task "api" { driver = "docker" artifact { source = "https://s3.amazonaws.com/myorg/myapp-v123.tar.gz" options { archive = "tar.gz" } } ...

  21. myapp-blue.job job "myapp-blue" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" group "myapp" { count = 20 task "api" { driver = "docker" artifact { source = "https://s3.amazonaws.com/myorg/myapp-v124.tar.gz" options { archive = "tar.gz" } } ...

  22. myapp-blue.job job "myapp-blue" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" update { # Stagger updates every 120 seconds stagger = "120s" # Update a single task at a time max_parallel = 1 } ...

  23. myapp-blue.job $ nomad status myapp-blue ID = myapp-blue Name = myapp-blue Type = service Priority = 50 Datacenters = asia-east1 Status = running Periodic = false Summary Task Group Queued Starting Running Failed Complete Lost myapp 0 0 1 0 0 0 Allocations ID Eval ID Node ID Task Group Desired Status Created At 24cfd201 81efc2fa 8d0331e9 myapp run running 11/11/16 21:03:19 AEDT

  24. myapp-blue.job $ nomad alloc-status --verbose a7365fe4 ID = a7365fe4-cb28-a6e9-f3d4-f99e49c89776 Eval ID = c3c9a1db-dbeb-8afa-0a83-4f1b8b5a03f5 Name = myapp-blue.myapp[0] Node ID = 1f029d38-8d4b-a552-261f-e457b60f9b4b Job ID = myapp-blue Client Status = running Created At = 11/11/16 22:04:53 AEDT Evaluated Nodes = 1 Filtered Nodes = 0 Exhausted Nodes = 0 Allocation Time = 1.085001ms Failures = 0 ==> Task Resources Task: "api" CPU Memory MB Disk MB IOPS Addresses 500 256 300 0 db: 127.0.0.1:38537 Task: "web" CPU Memory MB Disk MB IOPS Addresses

  25. Terminal $ vault read postgresql/creds/readonly Key Value --- ----- lease_id postgresql/creds/readonly/5fec46f2-ab40-d9b8-61a2-887c7946eeb6 lease_duration 1h0m0s lease_renewable true password f8a93086-b11d-10cd-8795-f537a10de712 username token-9e57c18f-ac99-8e29-48f2-3fb09066d2b4

  26. Terminal $ env VAULT_TOKEN=.... vault read postgresql/creds/readonly Key Value --- ----- lease_id postgresql/creds/readonly/5fec46f2-ab40-d9b8-61a2-887c7946eeb6 lease_duration 1h0m0s lease_renewable true password f8a93086-b11d-10cd-8795-f537a10de712 username token-9e57c18f-ac99-8e29-48f2-3fb09066d2b4

  27. myapp.job job "myapp" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" group "myapp" { count = 1 task "api" { driver = "docker" env { VAULT_TOKEN = "7ea47d76-a653-4d43-9507-dbeed3b3747f" } artifact { source = "https://s3.amazonaws.com/myorg/myapp.tar.gz" options { archive = "tar.gz" } }

  28. myapp.job job "myapp" { region = "apac" datacenters = ["asia-east1", "asia-northeast1"] type = "service" group "myapp" { count = 1 task "api" { driver = "docker" vault { policies = ["myapp", "api"] change_mode = "signal" change_signal = "SIGUSR1" } artifact { source = "https://s3.amazonaws.com/myorg/myapp.tar.gz" options { archive = "tar.gz" }

  29. Docker Containerized Rkt Windows Server Containers Qemu / KVM Virtualized Xen Hyper-V Java Jar Standalone Static Binaries C#

  30. Service Host & Service Level Health Discovery Checks HTTP + DNS Key Value Store Datacenter Aware HTTP API

  31. CLIENT CLIENT CLIENT CLIENT CLIENT CLIENT RPC RPC L A N G O S S I P SERVER SERVER SERVER REPLICATION REPLICATION

  32. CLIENT CLIENT CLIENT CLIENT CLIENT CLIENT RPC RPC L A N G O S S I P SERVER SERVER SERVER REPLICATION REPLICATION W A N G O S S I P SERVER SERVER SERVER REPLICATION REPLICATION

  33. DB 1 "Are you healthy?" "Yessir!" HEALTH DB 2 CHECKING "What about you?" SERVICE "Nah" DB N

  34. DB 1 1,000'S OF HEALTH DB 2 CHECKING REQUESTS SERVICE DB N

  35. DB 1 My status has changed DB 2 CONSUL DB N

  36. DB 1 10'S OF DB 2 CONSUL REQUESTS DB N

  37. v2.0.0 v1.1.2 QTY: 20 QTY: 0

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend