Amazon EC2 resources provide failover protection in Amazon EC2 environments. Two EC2 types are supported:

  • RouteTable - Updates an AWS route table to redirect traffic to the new active node’s network interface during failover.
  • ElasticIP - Reassigns an Elastic IP address to the new active node’s network interface during failover.

Resource Type: comm/ecc
Aliases: ecc, ec2

Subcommands

Amazon EC2 resources are managed by commands of the form:

lkcli resource comm/ecc <subcommand> [flags]

Subcommand Description Required Role
create Create a new EC2 resource admin
extend Extend to a standby server admin
get-property Read a resource property guest
set-property Update an editable resource property admin

create

lkcli resource comm/ecc create --ec2-type=<RouteTable|ElasticIP> [flags]

Flag Short Type Required Default Constraints Description
--ec2-type enum Yes RouteTable, ElasticIP EC2 resource type
--ip-resource string Conditional LifeKeeper IP resource tag; required when --ec2-type=RouteTable
--elastic-ip string Conditional Elastic IP address; required when --ec2-type=ElasticIP
--network-interface string Conditional EC2 network interface ID; required when --ec2-type=ElasticIP
--route-table-ids array No List of Route Table IDs to update
--verify-iam-role bool No true Verify IAM role permissions during creation
--tag string No Auto-generated Resource tag name

extend

lkcli resource comm/ecc extend --primary-sys=<string> --primary-tag=<string> [flags]

Flag Short Type Required Default Constraints Description
--primary-sys string Yes Hostname of the server the existing resource is extended from
--primary-tag string Yes Tag of the existing resource to extend
--standby-sys string No Value of --host (defaults to localhost) Hostname of the standby server
--switchback enum No INTELLIGENT INTELLIGENT, AUTOMATIC Switchback type
--primary-priority int No Defaults to the current priority of the --primary-sys server, or 1 if the resource has not yet been extended min: 1, max: 999 Failover priority for the primary server
--standby-priority int No Defaults to an unused value which is computed dynamically based on the priority values currently in-use min: 1, max: 999 Failover priority for the standby server

get-property / set-property

lkcli resource comm/ecc get-property --tag=<string> --property=<string>
lkcli resource comm/ecc set-property --tag=<string> --property=<string> --value=<string>


Flag Short Type Required Description
--tag -t string Yes Resource tag name
--property -p string Yes Property name (see Properties table below)
--value -v string Yes (set-property only) New property value

Properties

Property Type Constraints Editable Description
ec2-type enum RouteTable, ElasticIP No EC2 resource type
elastic-ip string No Elastic IP address (ElasticIP type only)
network-interface string No Network interface ID associated with the EC2 resource
network-interface-guid string No Network interface GUID associated with the EC2 resource
region string No AWS region
kit-name string No Recovery kit name
deepcheck-interval int min: 0, max: 604800 Yes Deepcheck interval in seconds (default: 300)
quickcheck-interval int min: 0, max: 604800 Yes Quickcheck interval in seconds (default: 180)
local-recovery enum enabled, disabled Yes Enable local recovery
switchback enum INTELLIGENT, AUTOMATIC Yes Switchback type

Example Usage

# Create a RouteTable-based EC2 resource
lkcli resource comm/ecc create \
  --host=server1 \
  --ec2-type=RouteTable \
  --ip-resource=ip-10.0.0.5 \
  --tag=ecc-routetable

# Create an ElasticIP-based EC2 resource
lkcli resource ec2 create \
  --host=server1 \
  --ec2-type=ElasticIP \
  --elastic-ip=52.10.20.30 \
  --network-interface="Ethernet 2" \
  --tag=ecc-eip

# Extend to server2
lkcli resource comm/ecc extend \
  --primary-sys=server1 \
  --primary-tag=ecc-routetable \
  --standby-sys=server2

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment