From 9a378cac0b226f913edd67f31f12c9e4970d2d69 Mon Sep 17 00:00:00 2001 From: Ahmad Date: Sun, 2 Jul 2017 22:54:07 -0700 Subject: [PATCH 1/2] base copy for folder --- templates/aws-elbv1/1/README.md | 15 +++++++++ templates/aws-elbv1/1/docker-compose.yml | 14 ++++++++ templates/aws-elbv1/1/rancher-compose.yml | 41 +++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 templates/aws-elbv1/1/README.md create mode 100644 templates/aws-elbv1/1/docker-compose.yml create mode 100644 templates/aws-elbv1/1/rancher-compose.yml diff --git a/templates/aws-elbv1/1/README.md b/templates/aws-elbv1/1/README.md new file mode 100644 index 0000000..bc7a9c5 --- /dev/null +++ b/templates/aws-elbv1/1/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/1/docker-compose.yml b/templates/aws-elbv1/1/docker-compose.yml new file mode 100644 index 0000000..82ddc39 --- /dev/null +++ b/templates/aws-elbv1/1/docker-compose.yml @@ -0,0 +1,14 @@ +elbv1: + image: rancher/external-lb:v0.2.1 + 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/1/rancher-compose.yml b/templates/aws-elbv1/1/rancher-compose.yml new file mode 100644 index 0000000..e65e536 --- /dev/null +++ b/templates/aws-elbv1/1/rancher-compose.yml @@ -0,0 +1,41 @@ +.catalog: + name: ELB Classic Load Balancer + version: "v0.2.1-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 From dd79978f8d64d3d95814b6f1ec0f9e239a59ce50 Mon Sep 17 00:00:00 2001 From: Ahmad Date: Sun, 2 Jul 2017 22:57:51 -0700 Subject: [PATCH 2/2] version bump for image and config --- templates/aws-elbv1/1/docker-compose.yml | 2 +- templates/aws-elbv1/1/rancher-compose.yml | 2 +- templates/aws-elbv1/config.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/aws-elbv1/1/docker-compose.yml b/templates/aws-elbv1/1/docker-compose.yml index 82ddc39..6af3d03 100644 --- a/templates/aws-elbv1/1/docker-compose.yml +++ b/templates/aws-elbv1/1/docker-compose.yml @@ -1,5 +1,5 @@ elbv1: - image: rancher/external-lb:v0.2.1 + image: rancher/external-lb:v0.3.0 command: -provider=elbv1 expose: - 1000 diff --git a/templates/aws-elbv1/1/rancher-compose.yml b/templates/aws-elbv1/1/rancher-compose.yml index e65e536..a654e5b 100644 --- a/templates/aws-elbv1/1/rancher-compose.yml +++ b/templates/aws-elbv1/1/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: ELB Classic Load Balancer - version: "v0.2.1-rancher1" + version: "v0.3.0-rancher1" description: "External LB service powered by AWS Elastic Load Balancing" minimum_rancher_version: v1.1.0 questions: diff --git a/templates/aws-elbv1/config.yml b/templates/aws-elbv1/config.yml index f62d9e3..9aec5d1 100644 --- a/templates/aws-elbv1/config.yml +++ b/templates/aws-elbv1/config.yml @@ -1,5 +1,5 @@ name: ELB Classic Load Balancer description: | External LB service powered by AWS Elastic Load Balancing -version: v0.2.1-rancher1 +version: v0.3.0-rancher1 category: Load Balancing