From 0baff5b2f593481d76d78bab7264f78c6f9e9e7e Mon Sep 17 00:00:00 2001 From: loganhz Date: Fri, 6 Oct 2017 20:12:23 +0800 Subject: [PATCH] copy aws-elbv1 previous version --- templates/aws-elbv1/2/README.md | 15 +++++++++ templates/aws-elbv1/2/docker-compose.yml | 14 ++++++++ templates/aws-elbv1/2/rancher-compose.yml | 41 +++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 templates/aws-elbv1/2/README.md create mode 100644 templates/aws-elbv1/2/docker-compose.yml create mode 100644 templates/aws-elbv1/2/rancher-compose.yml diff --git a/templates/aws-elbv1/2/README.md b/templates/aws-elbv1/2/README.md new file mode 100644 index 0000000..bc7a9c5 --- /dev/null +++ b/templates/aws-elbv1/2/README.md @@ -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. diff --git a/templates/aws-elbv1/2/docker-compose.yml b/templates/aws-elbv1/2/docker-compose.yml new file mode 100644 index 0000000..6af3d03 --- /dev/null +++ b/templates/aws-elbv1/2/docker-compose.yml @@ -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" diff --git a/templates/aws-elbv1/2/rancher-compose.yml b/templates/aws-elbv1/2/rancher-compose.yml new file mode 100644 index 0000000..a654e5b --- /dev/null +++ b/templates/aws-elbv1/2/rancher-compose.yml @@ -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