Avi Vantage Platform LB template

This commit is contained in:
Anant Patil 2017-07-25 12:22:25 +05:30
parent 6ab8d9db19
commit e388502579
5 changed files with 115 additions and 0 deletions

45
templates/avi/0/README.md Normal file
View File

@ -0,0 +1,45 @@
Avi Vantage Platform Load Balancer Provider
========
#### About Avi Vantage Platform
The Avi Vantage Platform is built on software-defined architectural principles to create a centrally managed pool of distributed load balancers to deliver application services close to the applications.
#### About this provider
This provider load balances Rancher services using Avi Vantage Platform Load Balancer. It uses REST API to update the Avi controller which enables the Avi Service Engines to load balance the Rancher Services.
#### Usage
1. Deploy the stack for this provider from Rancher Community Catalog.
While deploying, you need to give the username, password (optional,
read below), Avi Controller IP address, Avi Controller Port, the
Cloud name where Virtual Services and Pools are created.
2. Create Virtual Services using Avi Controller console. Make sure you
create VS in given cloud in Avi. Leave the Virtual Service pool as
empty. Configure any policies or rules for Virtual Service.
3. Create services in Rancher with public host port mapping and adding
label `io.rancher.service.external_lb.endpoint` with value as Virtual
Service name created in previous step. You can scale out/in the
service or stop the service and the changes will get reflected on Avi
Controller and Service Engine.
Environment Variables
========
| Variable Name | Description | Default Value | Optional |
|--------------------------|-----------------------------------------------------------------------------------------------|--------------------|-----------------------------------|
| AVI_USER | User name to log into Avi Controller | | No |
| AVI_PASSWORD | Password for Avi user. This is optional if you are using Rancher Secrets to provide password. | | Yes (if using Rancher Secrets) |
| AVI_CONTROLLER_ADDR | IP Address of Avi Controller. | | No |
| AVI_CONTROLLER_PORT | Port to connect to Avi Controller. | 443 | Yes |
| AVI_SSL_VERIFY | Enable or Disable SSL certificate validation while connecting to Avi Controller | False | Yes |
| AVI_CLOUD_NAME | Name of Avi Cloud in which Virtual Services are created. | Default-Cloud | Yes |
| LB_TARGET_RANCHER_SUFFIX | Pool names in Avi will have this suffix. | "rancher.internal" | Yes |
Using Rancher Secrets for Avi Password
----
Optionally, you can use the Rancher Secrets to pass the Avi controller
password instead of using environment variable.
1. Run the Rancher Secrets service before deploying this provider stack.
2. Create a secret named "avi-creds".
3. While deploying the Avi provider stack, use the "avi-creds" secret
for Avi Provider service.

View File

@ -0,0 +1,13 @@
avi:
image: rancher/external-lb:v0.3.0
command: -provider=Avi
expose:
- 1000
environment:
AVI_USER: ${AVI_USER}
AVI_PASSWORD: ${AVI_PASSWORD}
AVI_CONTROLLER_ADDR: ${AVI_CONTROLLER_ADDR}
AVI_CONTROLLER_PORT: ${AVI_CONTROLLER_PORT}
AVI_SSL_VERIFY: ${AVI_SSL_VERIFY}
AVI_CLOUD_NAME: ${AVI_CLOUD_NAME}
LB_TARGET_RANCHER_SUFFIX: ${LB_TARGET_RANCHER_SUFFIX}

View File

@ -0,0 +1,52 @@
.catalog:
name: Avi Vantange Platform Load Balancer
version: "v0.3.0-rancher1"
description: "External LB service powered by Avi Vantage Platform"
minimum_rancher_version: v1.1.0
questions:
- variable: "AVI_USER"
label: "Avi account username"
description: "User name for your account on Avi Controller"
type: "string"
required: true
- variable: "AVI_PASSWORD"
label: "Avi user account password"
description: "Password for your account on Avi Controller"
type: "string"
required: false
- variable: "AVI_CONTROLLER_ADDR"
label: "Avi Controller IP Address"
description: "IP Address of the Avi Controller"
type: "string"
required: true
- variable: "AVI_CONTROLLER_PORT"
label: "Avi Controller Port (Optional)"
description: "Port on which Avi Controller is listening for API requests"
type: "string"
required: false
- variable: "AVI_CLOUD_NAME"
label: "Avi Cloud Name (Optional)"
description: "Name of Avi Cloud in which Virtual Services are created"
required: false
type: "string"
- variable: "AVI_SSL_VERIFY"
label: "Avi SSL Verify (Optional)"
description: "SSL certificate validation while connecting to Avi Controller"
required: false
type: "boolean"
default: false
- variable: "LB_TARGET_RANCHER_SUFFIX"
label: "Avi pool name suffix"
description: "Pool names in Avi created/updated by Rancher will have this suffix"
type: "string"
required: true
default: rancher.internal
avi:
health_check:
port: 1000
interval: 5000
unhealthy_threshold: 2
request_line: GET / HTTP/1.0
healthy_threshold: 2
response_timeout: 2000

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

5
templates/avi/config.yml Normal file
View File

@ -0,0 +1,5 @@
name: Avi Vantage Platform
description: |
External LB service powered by Avi Vantage Platform
version: v0.3.0-rancher1
category: Load Balancing