Warning: Array to string conversion in /home/wwwroot/myf5/wp-content/plugins/wpjam-basic/public/wpjam-utils.php on line 496
[root@controller heat(keystone_fulladmin)]$ more deploy-lb.yaml
description: >
This heat template demonstrates a basic load-balancing scenario on an F5 Device.
heat_template_version: 2016-04-08
parameters:
bigip_un:
description: BigIP Username
label: BigIP Login Username
type: string
default: admin
bigip_pw:
description: BigIP Password
label: BigIP Login Password
type: string
hidden: True
vs_name:
description: Virtual Server Name
label: Virtual Server Name
type: string
default: virtual_server1
pool_name:
description: Pool Name
label: Pool Name
type: string
default: pool1
bigip_fip:
description: BigIP Floating IP
label: BigIP FIP
type: string
vs_vip:
description: Virtual Server Virtual IP
label: Virtual Server VIP
type: string
vs_port:
description: Virtual Server Port
label: Virtual Server Port
type: number
default: 443
pool_member_port:
description: Pool Member Port
label: Pool Member Port
type: number
default: 8080
parameter_groups:
- label: BigIP Parameters
parameters:
- bigip_fip
- bigip_un
- bigip_pw
- label: Load Balancing Parameters
parameters:
- vs_name
- vs_vip
- vs_port
- pool_name
- pool_member_port
resources:
bigip:
type: F5::BigIP::Device
properties:
ip: { get_param: bigip_fip }
username: { get_param: bigip_un }
password: { get_param: bigip_pw }
partition:
type: F5::Sys::Partition
depends_on: bigip
properties:
name: Common
bigip_server: { get_resource: bigip }
iapp_service:
type: F5::Sys::iAppService
depends_on: iapp_template
properties:
name: lb_service
bigip_server: { get_resource: bigip }
partition: { get_resource: partition }
template_name: alb_templ
traffic_group: /Common/traffic-group-local-only
iapp_template:
type: F5::Sys::iAppCompositeTemplate
depends_on: partition
properties:
name: alb_templ
bigip_server: { get_resource: bigip }
partition: { get_resource: partition }
requires_modules: [ ltm ]
implementation:
str_replace:
params:
__partition__: Common
__pool_name__: { get_param: pool_name }
__vs_name__: { get_param: vs_name }
__vip__: { get_param: vs_vip }
__vs_port__: { get_param: vs_port }
__rs_port__: { get_param: pool_member_port }
__rs_ip__: 11.0.0.10
template: |
tmsh::create {
ltm pool /__partition__/__pool_name__
load-balancing-mode least-connections-node
members replace-all-with {
__rs_ip__:__rs_port__ {
address __rs_ip__
}
}
}
tmsh::create {
ltm virtual /__partition__/__vs_name__
connection-limit 1
destination /__partition__/__vip__:__vs_port__
mask 255.255.255.255
pool /__partition__/__pool_name__
profiles replace-all-with {
/Common/clientssl {
context clientside
}
}
source 0.0.0.0/0
source-address-translation {
type automap
}
translate-address enabled
translate-port enabled
vlans replace-all-with {
/Common/external
}
vlans-enabled
}
tmsh::create {
ltm virtual-address /__partition__/__vip__
address __vip__
arp enabled
icmp-echo enabled
mask 255.255.255.255
traffic-group traffic-group-1
}
presentation: |
section say_hello {
message intro "This template deploys a virtual server and a pool with two members."
}
[root@controller heat(keystone_fulladmin)]$ cat deploy-lb-params.yaml parameters: bigip_un: admin bigip_pw: admin vs_name: virtual_server_heat pool_name: pool_heat bigip_fip: 192.168.214.253 vs_vip: 6.7.8.9 vs_port: 443 pool_member_port: 8080
openstack stack create -t deploy-lb.yaml -e deploy-lb-params.yaml f5-heat-stack
Array
文章评论