libcluster_ec2 v0.1.1 ClusterEC2 View Source

ClusterEC2

This is an EC2 clustering strategy for libcluster. It currently supports identifying nodes based on EC2 tags.

config :libcluster,
  topologies: [
    example: [
      strategy: ClusterEC2.Strategy.Tags,
      config: [
        ec2_tagname: "elasticbeanstalk:environment-name",
        ec2_tagvalue: &ClusterEC2.local_instance_tag_value/1,
        app_prefix: "phoenix"
      ],
    ]
  ]

Installation

The package can be installed by adding libcluster_ec2 to your list of dependencies in mix.exs:

def deps do
  [{:libcluster_ec2, "~> 0.1.0"}]
end

Link to this section Summary

Functions

Queries the local EC2 instance metadata API to determine the instance ID of the current instance

Retrieves the value of a specific tag for the current instance

Uses the EC2 API to determine the tags of the current instance

Link to this section Functions

Queries the local EC2 instance metadata API to determine the instance ID of the current instance.

Link to this function local_instance_tag_value(tagname) View Source

Retrieves the value of a specific tag for the current instance.

Uses the EC2 API to determine the tags of the current instance.