Netflix/SimianArmy

Add Elastic Load Balancer Cleanup Support to Janitor

ebukoski opened this issue · 3 comments

Add Elastic Load Balancer (ELB) Cleanup support to Janitor. Janitor will identify, mark, and clean ELBs that are unused.

This would involve creating multiple new classes:

  • ELBJanitor.java
  • EddaELBJanitorCrawler.java
  • EmptyELBRule.java

So far the rule we are considering for this cleanup is:

  1. EmptyELBRule: Mark and clean any ELBs with no attached instances. A possible additional condition is to mark/clean ELBs with no instances attached for X days with X a configurable value.

Ed,

I think I already did this, but since very soon after I implemented this on my local fork I accepted a job at another company where they don’t use AWS/Simian Army. Maybe I can dig out the code and commit it if you’re interested. I previously committed as Ten48BASE.

Lou Young
VP of IT Architecture, SpyFu, Inc.
www.spyfu.comhttp://www.spyfu.com/

From: ebukoski [mailto:notifications@github.com]
Sent: Monday, August 29, 2016 5:37 PM
To: Netflix/SimianArmy SimianArmy@noreply.github.com
Subject: [Netflix/SimianArmy] Add Elastic Load Balancer Cleanup Support to Janitor (#273)

Add Elastic Load Balancer (ELB) Cleanup support to Janitor. Janitor will identify, mark, and clean ELBs that are unused.

This would involve creating multiple new classes:

  • ELBJanitor.java
  • EddaELBJanitorCrawler.java
  • EmptyELBRule.java

So far the rule we are considering for this cleanup is:

  1. EmptyELBRule: Mark and clean any ELBs with no attached instances. A possible additional condition is to mark/clean ELBs with no instances attached for X days with X a configurable value.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/273, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AO6mGz6-GAvMeaZjdRLaI89vg15lYoZHks5qk3sRgaJpZM4JwCPq.

If you still have it, yeah I'd like to see it! I'm curious what kind of
issues you might have run into.

On Tue, Aug 30, 2016 at 8:46 AM, Lou Young notifications@github.com wrote:

Ed,

I think I already did this, but since very soon after I implemented this
on my local fork I accepted a job at another company where they don’t use
AWS/Simian Army. Maybe I can dig out the code and commit it if you’re
interested. I previously committed as Ten48BASE.

Lou Young
VP of IT Architecture, SpyFu, Inc.
www.spyfu.comhttp://www.spyfu.com/

From: ebukoski [mailto:notifications@github.com]
Sent: Monday, August 29, 2016 5:37 PM
To: Netflix/SimianArmy SimianArmy@noreply.github.com
Subject: [Netflix/SimianArmy] Add Elastic Load Balancer Cleanup Support to
Janitor (#273)

Add Elastic Load Balancer (ELB) Cleanup support to Janitor. Janitor will
identify, mark, and clean ELBs that are unused.

This would involve creating multiple new classes:

  • ELBJanitor.java
  • EddaELBJanitorCrawler.java
  • EmptyELBRule.java

So far the rule we are considering for this cleanup is:

  1. EmptyELBRule: Mark and clean any ELBs with no attached instances. A
    possible additional condition is to mark/clean ELBs with no instances
    attached for X days with X a configurable value.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://github.com/
/issues/273>, or mute the thread<https://github.com/
notifications/unsubscribe-auth/AO6mGz6-GAvMeaZjdRLaI89vg15lYoZHks5qk3
sRgaJpZM4JwCPq>.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#273 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKXxgf2pC77E1RCCZ99VqdVpBH4l0JUPks5qlFBUgaJpZM4JwCPq
.

Opened PR #276.

Created OrphanedELBRule.java that marks and cleans ELBs if:

  1. The ELB has no associated instances AND
  2. The ELB has no associated ASGs
  • Properties that control ELB cleanup:

simianarmy.janitor.enabledResources
Add "ELB" to this list to enable the ELB Janitor.

simianarmy.janitor.edda.enabled
(default: false)
When set to false, ELBJanitorCrawler will be used to query AWS directly. When set to true EddaELBJanitorCrawler will be used to query through Edda for ELB resources.

simianarmy.janitor.rule.orphanedELBRule.enabled
(default: false)
Set this to true to enable the Orphaned ELB cleanup rule.

simianarmy.janitor.rule.orphanedELBRule.retentionDays
(default: 7)
Days to retain ELBs after they are marked.

simianarmy.janitor.rule.orphanedELBRule.edda.useApplicationOwner
(default: false)
Set this to true to derive ELB owners from Edda Application lists. This rule is specific to the Netflix environment where Spinnaker is used to allocate ELBs based on application names.

In the default (Non-Netflix) case owner will be determined by the resource tag defined by simianarmy.tags.owner. If this property is not set then the owner will be determined by the value of the tag owner.

simianarmy.janitor.rule.orphanedELBRule.edda.fallbackOwnerEmail
(default: null)
Fallback email owner address to use if no other owner can be determined.