Skip to content

SharpeRAD/Cake.AWS.ElasticLoadBalancing

Repository files navigation

Cake.AWS.ElasticLoadBalancing

Cake Build addin for configuring Amazon Elastic Load Balancers

Build status

cakebuild.net

Join the chat at https://gitter.im/cake-build/cake

Table of contents

  1. Implemented functionality
  2. Referencing
  3. Usage
  4. Example
  5. Plays well with
  6. License
  7. Share the love

Implemented functionality

  • Register Instances
  • Deregister Instances
  • Uses AWS fallback credentials (app.config / web.config file, SDK store or credentials file, environment variables, instance profile)

Referencing

NuGet Version NuGet Downloads

Cake.AWS.ElasticLoadBalancing is available as a nuget package from the package manager console:

Install-Package Cake.AWS.ElasticLoadBalancing

or directly in your build script via a cake addin directive:

#addin "Cake.AWS.ElasticLoadBalancing"

Usage

#addin "Cake.AWS.ElasticLoadBalancing"

LoadBalancingSettings settings = Context.CreateLoadBalancingSettings();



Task("Register-Instances")
    .Description("Adds new instances to the load balancer.")
    .Does(async () =>
{
    await RegisterLoadBalancerInstances("LoadBlanerName", "instance1,instance2,instance3", settings);
});

Task("Deregister-Instances")
    .Description("Deregisters instances from the load balancer.")
    .Does(async () =>
{
    await DeregisterLoadBalancerInstances("LoadBlanerName", "instance1,instance2,instance3", settings);
});

Task("Deregister-Instances-Fallback")
    .Description("Deregisters instances from the load balancer, using AWS Fallback credentials")
    .Does(async () =>
{
    await DeregisterLoadBalancerInstances("LoadBlanerName", "instance1,instance2,instance3", Context.CreateLoadBalancingSettings());
});

RunTarget("Register-Instances");

Example

A complete Cake example can be found here.

TroubleShooting

  • Please be aware of the breaking changes that occurred with the release of Cake v0.22.0, you will need to upgrade Cake in order to use Cake.AWS.ElasticLoadBalancing v0.2.0 or above.

Plays well with

If your routing traffic to EC2 instances its worth checking out Cake.AWS.EC2 or if your using Route53 as your DNS server check out Cake.AWS.Route53.

If your looking for a way to trigger cake tasks based on windows events or at scheduled intervals then check out CakeBoss.

License

Copyright (c) 2015 - 2016 Phillip Sharpe

Cake.AWS.ElasticLoadBalancing is provided as-is under the MIT license. For more information see LICENSE.

Share the love

If this project helps you in anyway then please ⭐ the repository.

About

Amazon ElasticLoadBalancing addon for Cake

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published