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

The Great Cloud Migration with Network Automation & Service Mesh

The Great Cloud Migration with Network Automation & Service Mesh

You need to migrate some workloads from a private datacenter to public cloud. The result? The unavoidable hybrid environment. How do you observe traffic and mitigate risky changes to each system? In this talk, I’ll discuss how you can supercharge your cloud migrations with a combination of network automation for your datacenter and a service mesh across environments. We'll use Consul and Consul Terraform Sync to demonstrate how to migrate applications on AWS.

Be8b596c46f4c9a1aec6a7586af33134?s=128

Rosemary Wang

February 06, 2021
Tweet

More Decks by Rosemary Wang

Other Decks in Programming

Transcript

  1. The Great Cloud Migration with Network Automation & Service Mesh

    1
  2. We want 50% of our applications on cloud in 2

    years. @JOATMON08 2
  3. For the next 5 years, we will run across two

    or more platforms. @JOATMON08 3
  4. ** Draws lots of diagrams. ** @JOATMON08 4

  5. @JOATMON08 Rosemary Wang (she/her) Developer Advocate at HashiCorp joatmon08.github.io 5

  6. Premise 6

  7. @JOATMON08 7 LOAD BALANCER DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.NET ▪

    Internal application ▪ Runs on a dedicated server ▪ Multiple instances for availability ▪ Used by UI in datacenter ▪ It must be re-platformed on cloud. UI SERVICE
  8. @JOATMON08 8 CLOUD LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.NET LOAD

    BALANCER DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.NET UI SERVICE Step 2: Configure with infrastructure as code Step 3: Split traffic between datacenter and cloud Step 1: Refactor application DIRECT CONNECT
  9. Patterns for Migration: Traffic Splitting 9

  10. @JOATMON08 10 LOAD BALANCER DATACENTER WEST MY-APPLICATION.MY-COMPANY.NET MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2

    Singleton: Global application DNS controls traffic routing. LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 DATACENTER EAST
  11. @JOATMON08 11 LOAD BALANCER DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.NET CLOUD

    LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.NET DIRECT CONNECT
  12. @JOATMON08 12 REVERSE PROXY & LOAD BALANCER DATACENTER REVERSE-PROXY.NET/MY-APPLICATION MY-APPLICATION-0

    MY-APPLICATION-1 MY-APPLICATION-2 Reverse Proxy: Based on path or header routing, transform request to the correct service.
  13. @JOATMON08 13 REVERSE PROXY & LOAD BALANCER DATACENTER REVERSE-PROXY.NET/MY-APPLICATION MY-APPLICATION-0

    MY-APPLICATION-1 MY-APPLICATION-2 CLOUD LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.NET DIRECT CONNECT
  14. @JOATMON08 14 LOAD BALANCER DATACENTER MY-APPLICATION.DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 Composite:

    Create a subdomain specific to datacenter or region. Top-level domain references subdomains. MY-APPLICATION.MY-COMPANY.NET
  15. @JOATMON08 15 DATACENTER CLOUD LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.CLOUD

    LOAD BALANCER MY-APPLICATION.DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.MY-COMPANY.NET DIRECT CONNECT
  16. Supercharge! (Scale & Evolve) 16

  17. @JOATMON08 17 DATACENTER CLOUD LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.CLOUD

    DIRECT CONNECT LOAD BALANCER MY-APPLICATION.DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.MY-COMPANY.NET SOME INFRASTRUCTURE LAYER HERE
  18. Service mesh An infrastructure layer that facilitates communication between services.

    @JOATMON08 18
  19. @JOATMON08 19 DATACENTER CLOUD LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.CLOUD

    LOAD BALANCER MY-APPLICATION.DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.MY-COMPANY.NET NETWORK AUTOMATION TO SYNCHRONIZE SERVICE MESH FOR CLOUD DIRECT CONNECT
  20. @JOATMON08 20 DATACENTER LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.CLOUD LOAD

    BALANCER MY-APPLICATION.DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.MY-COMPANY.NET CONSUL TERRAFORM SYNC DIRECT CONNECT CONSUL SERVICE MESH (CLOUD) 💡 If datacenter & cloud can connect ✅ No change to downstream applications
  21. @JOATMON08 21 CONSUL TERRAFORM SYNC DAEMON SERVICE CHANGED TERRAFORM CONFIGURATION

    WITH MODULE REFERENCE USE CONSUL TEMPLATING CAPABILITY TO GENERATE TERRAFORM CONFIGURATION RUNS TERRAFORM TERRAFORM MODULE REFERENCE MODULE Consul Terraform Sync (CTS) github.com/hashicorp/ consul-terraform-sync
  22. @JOATMON08 22 Service Mesh Traffic Management Security Observability

  23. Demo Network Automation + Service Mesh @JOATMON08 23 Demo: github.com/joatmon08/cloud-migration

    Terraform Module: github.com/joatmon08/terraform-aws-listenerrule-nia Note: “Datacenter” is AWS us-east-2. This can be done with datacenter load balancers as long as they can be configured with Terraform.
  24. @JOATMON08 24 DATACENTER LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.CLOUD LOAD

    BALANCER MY-APPLICATION.DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.MY-COMPANY.NET CONSUL TERRAFORM SYNC DIRECT CONNECT CONSUL SERVICE MESH (CLOUD) 💡 If datacenter & cloud can connect ✅ No change to downstream applications ❗Difficult to maintain as more services migrate
  25. @JOATMON08 25 DATACENTER LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.CLOUD LOAD

    BALANCER MY-COMPANY.NET MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 CONSUL SERVICE MESH (CLOUD) CONSUL TERMINATING GATEWAY CONSUL INGRESS GATEWAY UI SERVICE 💡 If datacenter & cloud can connect ✅ Additional observability & configurability ❗Refactor applications to use Consul for service discovery DIRECT CONNECT
  26. @JOATMON08 26 CONSUL SERVICE MESH (DATACENTER) LOAD BALANCER MY-APPLICATION-0 MY-APPLICATION-1

    MY-APPLICATION-2 MY-APPLICATION.CLOUD LOAD BALANCER MY-APPLICATION.DATACENTER MY-APPLICATION-0 MY-APPLICATION-1 MY-APPLICATION-2 MY-APPLICATION.MY-COMPANY.NET CONSUL MESH GATEWAY CONSUL MESH GATEWAY CONSUL SERVICE MESH (CLOUD) 💡 If datacenter & cloud cannot connect ✅ Observability and configurability ✅ Secure networking (mTLS, intentions) ❗Must deploy Consul in datacenter
  27. Want to learn more? ▪ [Datacenter Load Balancing] devcentral.f5.com/s/articles/Pushing- Updates-to-BIG-IP-w-Consul-Terraform-Sync

    ▪ [Consul Terraform Sync Integrations] hashicorp.com/blog/announcing- consul-terraform-sync-tech-preview ▪ [Consul Service Mesh] learn.hashicorp.com/collections/consul/ developer-mesh ▪ [Slides & Code] joatmon08.github.io/03_speaking.html @JOATMON08 27