copy aws-elbv1 previous version

This commit is contained in:
loganhz 2017-10-06 20:12:23 +08:00
parent 1b6cd9b93e
commit 0baff5b2f5
3 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,15 @@
AWS ELB Classic External LB Service
==========
#### About ELB Classic Load Balancers
The [Classic Load Balancer](https://aws.amazon.com/elasticloadbalancing/classicloadbalancer/) option in AWS routes traffic based on application or network level information and is ideal for simple load balancing of traffic across multiple EC2 instances.
#### About this service
Load balance Rancher services using Elastic Load Balancing.
This service keeps existing ELB Classic load balancers updated with the EC2 instances on which Rancher services that have one or more exposed ports and the label `io.rancher.service.external_lb.endpoint` are running on.
#### Usage
1. Deploy this stack
2. Using the AWS Console create a Classic ELB load balancer with one or more listeners and configure it according to your applications requirements. Configure the listener(s) with an instance protocol and port matching that of the Rancher service that you want to forward traffic to.
3. Create or update your service to expose host ports that match the configuration of the ELB listener(s). Add the service label `io.rancher.service.external_lb.endpoint` using as value the name of the ELB load balancer you created.

View File

@ -0,0 +1,14 @@
elbv1:
image: rancher/external-lb:v0.3.0
command: -provider=elbv1
expose:
- 1000
environment:
ELBV1_AWS_ACCESS_KEY: ${ELBV1_AWS_ACCESS_KEY}
ELBV1_AWS_SECRET_KEY: ${ELBV1_AWS_SECRET_KEY}
ELBV1_AWS_REGION: ${ELBV1_AWS_REGION}
ELBV1_AWS_VPCID: ${ELBV1_AWS_VPCID}
ELBV1_USE_PRIVATE_IP: ${ELBV1_USE_PRIVATE_IP}
labels:
io.rancher.container.create_agent: "true"
io.rancher.container.agent.role: "external-dns"

View File

@ -0,0 +1,41 @@
.catalog:
name: ELB Classic Load Balancer
version: "v0.3.0-rancher1"
description: "External LB service powered by AWS Elastic Load Balancing"
minimum_rancher_version: v1.1.0
questions:
- variable: "ELBV1_AWS_ACCESS_KEY"
label: "AWS Access Key ID"
description: "Access key ID for your AWS account"
type: "string"
required: false
- variable: "ELBV1_AWS_SECRET_KEY"
label: "AWS Secret Access Key"
description: "Secret access key for your AWS account"
type: "string"
required: false
- variable: "ELBV1_AWS_REGION"
label: "AWS Region (Optional)"
description: "The region for load balancers and EC2 instances in this Rancher environment. Defaults to the region of the instance the service will be running on."
type: "string"
required: false
- variable: "ELBV1_AWS_VPCID"
label: "AWS VPC ID (Optional)"
description: "The VPC for the load balancers and EC2 instances in this Rancher environment. Defaults to the VPC of the instance the service will be running on."
type: "string"
required: false
- variable: "ELBV1_USE_PRIVATE_IP"
label: "EC2 Private IP Lookup"
description: "If your EC2 instances are registered in Rancher with their private IP addresses, then this must be set to true."
required: true
type: "boolean"
default: false
elbv1:
health_check:
port: 1000
interval: 5000
unhealthy_threshold: 2
request_line: GET / HTTP/1.0
healthy_threshold: 2
response_timeout: 2000