O'Reilly logo

Scalable Cloud Ops with Fugue by Josha Stella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tightening Refuge Code with a Function

You’ve looked at some of the basics of Ludwig and are ready to take action with our real-world Refuge example that currently spins up 14 AWS infrastructure services. Our composition is sitting at around 500 lines of code and we’re starting to repeat ourselves. In particular, we’re creating Elastic Load Balancers (ELBs) that differ in only a few parameters. We can capture the pattern of building a Refuge-specific ELB in a function so that we need to write this code only once.

We need to figure out the types of our function, which we’ll call loadbalancer. We want the function to return an ELB, so we know the return type should be ELB.LoadBalancer. But what arguments do we need to provide for our function? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required