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

Hashistack : orchestrer des applications Cloud Native avec simplicité

Hashistack : orchestrer des applications Cloud Native avec simplicité

Lorsqu'on parle d'orchestration de conteneurs, d'exécution d'applications Cloud Native, tout le monde se tourne vers kubernetes. Et pourtant, d'autres solutions existent. L'une d'elle est particulièrement efficace et se base sur une suite d'outils libres développés par Hashicorp : Consul et Nomad en sont les briques principales.

Voyons ensemble et en démos comment mettre en oeuvre une telle stack et pourquoi pas vous faire changer d'avis sur l'orchestration de vos applications.

Ba2198386e326d6e3ca57b2271d861e9?s=128

Yves Brissaud

January 24, 2019
Tweet

Transcript

  1. Hashistack Orchestrer des applications Cloud Native avec simplicité Yves Brissaud

     @_crev_
  2. Cloud Native ?

  3. microservices conteneurs / docker kubernetes 

  4. exploiter les possibilités du cloud écrite pour le cloud http://pzf.fremantle.org/2010/05/cloud-native.html

  5.  https://whvn.cc/56532

  6. https://whvn.cc/56532

  7.      elasticité

  8. https://gotocph.com/2018/sessions/612

  9. Yves Brissaud  @_crev_  eunomie  yves.brissaud@squarescale.com Tech Lead

    Build Infrastructures and Deploy Cloud Native Applications Seamlessly | Automatically | Instantly  @sqscale  squarescale.com
  10. Full Remote | |

  11. https://wallpaperscraft.com/download/rings_rubber_background_heap_80332/3821x2560

  12.     

  13. idempotence application infrastructure

  14. https://whvn.cc/569648

  15. None
  16. Packaging Immutabilité Idempotence

  17. https://www.nomadproject.io/

  18. Orchestrateur Lifecycle Rolling deploys Blue green Service, batch, system

  19. Drivers Docker, rkt JVM qemu plugins nomad >= 0.9

  20. Facile à déployer 1 binaire linux / windows / mac

    autopilot
  21. job "hello" { type = "service" datacenters = ["dc1"] group

    "world" { count = 3 task "hello-api" { driver = "docker" config { image = "hashicorp/http-echo" args = ["-text=Hello!"] port_map {
  22. job "run-hook" { datacenters = ["dc1"] type = "batch" periodic

    { cron = "@hourly" prohibit_overlap = true } group "run-hook" { count = 1 task "curl" { driver = "exec"
  23. job "notify-event" { type = "batch" parameterized { payload =

    "required" meta_required = ["email"] } group "notify" { task "notify" { driver = "docker" dispatch_payload { file = "config.json"
  24. None
  25. None
  26. https://www.consul.io/

  27. Service Discovery Service Con guration Service Segmentation

  28. Enregistre chaque service Health Checks (http, tcp, grpc, script) Découverte

    API / DNS (SRV) Service Discovery
  29. # dig srv web.service.consul ;; ANSWER SECTION: web.service.consul. 0 IN

    SRV 1 1 3000 2310.addr.dc1.consul. web.service.consul. 0 IN SRV 1 1 3000 2600.addr.dc1.consul. web.service.consul. 0 IN SRV 1 1 3000 2010.addr.dc1.consul. ;; ADDITIONAL SECTION: 2310.addr.dc1.consul. 0 IN A 10.2.49.9 ip-10-0-6-93.node.dc1.consul. 0 IN TXT "cluster=app" ip-10-0-6-93.node.dc1.consul. 0 IN TXT "group=worker" 2600.addr.dc1.consul. 0 IN A 10.2.96.3 ip-10-0-22-143.node.dc1.consul. 0 IN TXT "group=worker" ip-10-0-22-143.node.dc1.consul. 0 IN TXT "consul-network-se
  30. intégration load balancers Trae k Fabio Envoy Service Discovery

  31. Distributed KV Store Watches Distributed Locks Service Con guration

  32. Service Access Graph Intentions Auto TLS encrypted communications authorization Service

    Segmentation
  33. Facile à déployer 1 binaire linux / windows / mac

    autopilot
  34. None
  35. None
  36.     

  37. Déployer Consul & Nomad Con gurer (docker, dns, etc) Répétable

  38. https://www.packer.io/

  39. Construction d'images machine Installation / con guration

  40. AWS, Azure, GCP, DigitalOcean, OpenStack VirtualBox, VMware Docker, LXC ...

  41. { "builders": [{ "type": "amazon-ebs", "region": "eu-west-1", "instance_type": "t3.small", "source_ami_filter":

    { "filters": { "virtualization-type": "hvm", "name": "CoreOS-stable-*", "root-device-type": "ebs" }, "owners": ["595879546273"], "most_recent": true
  42. Infrastructure Services externes 

  43. https://www.terraform.io/

  44. Infrastructure as Code

  45. Prévisualisation avant changement Gestion d'état

  46. Multi environments Modules Multi-providers

  47.  J'adore quand un plan se déroule sans accroc. -

    Hannibal
  48. 1. Construction de l'image système

  49. 2 Construction de l'infrastructure

  50. 3. Consul

  51. 4. Nomad

  52. 5. Docker Votre application

  53. Demo

  54. Deploying and Scaling Microservices with Docker and Kubernetes https://container.training/kube-selfpaced.yml.html

  55. + 1 outil, 1 rôle ~ Consul Suite cohérente Documentation

    Facile à déployer
  56. + Développement actif Consul 1.4 Nomad ~0.9 Terraform ~0.12

  57. - kubernetes

  58. Hashistack Packer, Terraform, Consul, Nomad Orchestrer des applications Cloud Native

    avec simplicité Yves Brissaud  @_crev_