Merge "Factorize load balancer code into its own template"
This commit is contained in:
commit
c9b26f3c9b
|
@ -8,7 +8,7 @@ resource_registry:
|
|||
"Magnum::Optional::Neutron::LBaaS::Listener": "OS::Heat::None"
|
||||
"Magnum::Optional::Neutron::LBaaS::Pool": "OS::Heat::None"
|
||||
"Magnum::Optional::Neutron::LBaaS::HealthMonitor": "OS::Heat::None"
|
||||
"Magnum::Optional::Neutron::FloatingIP": "OS::Heat::None"
|
||||
"Magnum::Optional::Neutron::LBaaS::FloatingIP": "OS::Heat::None"
|
||||
|
||||
# Master node template
|
||||
"Magnum::Optional::Neutron::LBaaS::PoolMember": "OS::Heat::None"
|
||||
|
|
|
@ -8,7 +8,7 @@ resource_registry:
|
|||
"Magnum::Optional::Neutron::LBaaS::Listener": "OS::Neutron::LBaaS::Listener"
|
||||
"Magnum::Optional::Neutron::LBaaS::Pool": "OS::Neutron::LBaaS::Pool"
|
||||
"Magnum::Optional::Neutron::LBaaS::HealthMonitor": "OS::Neutron::LBaaS::HealthMonitor"
|
||||
"Magnum::Optional::Neutron::FloatingIP": "OS::Neutron::FloatingIP"
|
||||
"Magnum::Optional::Neutron::LBaaS::FloatingIP": "OS::Neutron::FloatingIP"
|
||||
|
||||
# Master node template
|
||||
"Magnum::Optional::Neutron::LBaaS::PoolMember": "OS::Neutron::LBaaS::PoolMember"
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
heat_template_version: 2014-10-16
|
||||
|
||||
parameters:
|
||||
|
||||
fixed_subnet:
|
||||
type: string
|
||||
|
||||
external_network:
|
||||
type: string
|
||||
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
constraints:
|
||||
- allowed_values: ["TCP", "HTTP"]
|
||||
|
||||
port:
|
||||
type: number
|
||||
|
||||
resources:
|
||||
loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_param: fixed_subnet}
|
||||
|
||||
listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: loadbalancer}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
protocol_port: {get_param: port}
|
||||
|
||||
pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: listener}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
|
||||
monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: pool }
|
||||
|
||||
floating:
|
||||
type: Magnum::Optional::Neutron::LBaaS::FloatingIP
|
||||
properties:
|
||||
floating_network: {get_param: external_network}
|
||||
port_id: {get_attr: [loadbalancer, vip_port_id]}
|
||||
|
||||
outputs:
|
||||
pool_id:
|
||||
value: {get_resource: pool}
|
||||
|
||||
address:
|
||||
value: {get_attr: [loadbalancer, vip_address]}
|
||||
|
||||
floating_address:
|
||||
value: {get_attr: [floating, floating_ip_address]}
|
|
@ -234,6 +234,22 @@ resources:
|
|||
router_id: {get_resource: extrouter}
|
||||
subnet: {get_resource: fixed_subnet}
|
||||
|
||||
api_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_param: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
port: {get_param: kubernetes_port}
|
||||
|
||||
etcd_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_param: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: HTTP
|
||||
port: 2379
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# security groups. we need to permit network traffic of various
|
||||
|
@ -272,74 +288,6 @@ resources:
|
|||
- protocol: tcp
|
||||
- protocol: udp
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# load balancers.
|
||||
#
|
||||
api_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_resource: fixed_subnet}
|
||||
|
||||
api_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: api_loadbalancer}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
protocol_port: {get_param: kubernetes_port}
|
||||
|
||||
api_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: api_listener}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
|
||||
api_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: api_pool }
|
||||
|
||||
api_pool_floating:
|
||||
type: Magnum::Optional::Neutron::FloatingIP
|
||||
depends_on:
|
||||
- extrouter_inside
|
||||
properties:
|
||||
floating_network: {get_param: external_network}
|
||||
port_id: {get_attr: [api_loadbalancer, vip_port_id]}
|
||||
|
||||
etcd_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_resource: fixed_subnet}
|
||||
|
||||
etcd_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: etcd_loadbalancer}
|
||||
protocol: HTTP
|
||||
protocol_port: 2379
|
||||
|
||||
etcd_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: etcd_listener}
|
||||
protocol: HTTP
|
||||
|
||||
etcd_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: etcd_pool }
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# resources that expose the IPs of either the kube master or a given
|
||||
|
@ -387,8 +335,8 @@ resources:
|
|||
resource_def:
|
||||
type: kubemaster.yaml
|
||||
properties:
|
||||
api_public_address: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
api_private_address: {get_attr: [api_loadbalancer, vip_address]}
|
||||
api_public_address: {get_attr: [api_lb, floating_address]}
|
||||
api_private_address: {get_attr: [api_lb, address]}
|
||||
ssh_key_name: {get_param: ssh_key_name}
|
||||
server_image: {get_param: server_image}
|
||||
master_flavor: {get_param: master_flavor}
|
||||
|
@ -411,8 +359,8 @@ resources:
|
|||
kube_version: {get_param: kube_version}
|
||||
wait_condition_timeout: {get_param: wait_condition_timeout}
|
||||
cluster_uuid: {get_param: cluster_uuid}
|
||||
api_pool_id: {get_resource: api_pool}
|
||||
etcd_pool_id: {get_resource: etcd_pool}
|
||||
api_pool_id: {get_attr: [api_lb, pool_id]}
|
||||
etcd_pool_id: {get_attr: [etcd_lb, pool_id]}
|
||||
magnum_url: {get_param: magnum_url}
|
||||
trustee_user_id: {get_param: trustee_user_id}
|
||||
trustee_password: {get_param: trustee_password}
|
||||
|
@ -443,6 +391,7 @@ resources:
|
|||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
flannel_network_cidr: {get_param: flannel_network_cidr}
|
||||
kube_master_ip: {get_attr: [api_address_lb_switch, private_ip]}
|
||||
etcd_server_ip: {get_attr: [etcd_address_lb_switch, private_ip]}
|
||||
external_network: {get_param: external_network}
|
||||
kube_allow_priv: {get_param: kube_allow_priv}
|
||||
network_driver: {get_param: network_driver}
|
||||
|
@ -453,7 +402,6 @@ resources:
|
|||
https_proxy: {get_param: https_proxy}
|
||||
no_proxy: {get_param: no_proxy}
|
||||
kube_version: {get_param: kube_version}
|
||||
etcd_server_ip: {get_attr: [etcd_address_lb_switch, private_ip]}
|
||||
wait_condition_timeout: {get_param: wait_condition_timeout}
|
||||
cluster_uuid: {get_param: cluster_uuid}
|
||||
magnum_url: {get_param: magnum_url}
|
||||
|
|
|
@ -298,6 +298,22 @@ resources:
|
|||
router_id: {get_resource: extrouter}
|
||||
subnet: {get_resource: fixed_subnet}
|
||||
|
||||
api_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
port: {get_param: kubernetes_port}
|
||||
|
||||
etcd_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: HTTP
|
||||
port: 2379
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# security groups. we need to permit network traffic of various
|
||||
|
@ -339,74 +355,6 @@ resources:
|
|||
- protocol: tcp
|
||||
- protocol: udp
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# load balancers.
|
||||
#
|
||||
api_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_resource: fixed_subnet}
|
||||
|
||||
api_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: api_loadbalancer}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
protocol_port: {get_param: kubernetes_port}
|
||||
|
||||
api_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: api_listener}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
|
||||
api_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: api_pool }
|
||||
|
||||
api_pool_floating:
|
||||
type: Magnum::Optional::Neutron::FloatingIP
|
||||
depends_on:
|
||||
- extrouter_inside
|
||||
properties:
|
||||
floating_network: {get_param: external_network}
|
||||
port_id: {get_attr: [api_loadbalancer, vip_port_id]}
|
||||
|
||||
etcd_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_resource: fixed_subnet}
|
||||
|
||||
etcd_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: etcd_loadbalancer}
|
||||
protocol: HTTP
|
||||
protocol_port: 2379
|
||||
|
||||
etcd_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: etcd_listener}
|
||||
protocol: HTTP
|
||||
|
||||
etcd_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: etcd_pool }
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# resources that expose the IPs of either the kube master or a given
|
||||
|
@ -416,15 +364,15 @@ resources:
|
|||
api_address_lb_switch:
|
||||
type: Magnum::ApiGatewaySwitcher
|
||||
properties:
|
||||
pool_public_ip: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
pool_private_ip: {get_attr: [api_loadbalancer, vip_address]}
|
||||
pool_public_ip: {get_attr: [api_lb, floating_address]}
|
||||
pool_private_ip: {get_attr: [api_lb, address]}
|
||||
master_public_ip: {get_attr: [kube_masters, resource.0.kube_master_external_ip]}
|
||||
master_private_ip: {get_attr: [kube_masters, resource.0.kube_master_ip]}
|
||||
|
||||
etcd_address_lb_switch:
|
||||
type: Magnum::ApiGatewaySwitcher
|
||||
properties:
|
||||
pool_private_ip: {get_attr: [etcd_loadbalancer, vip_address]}
|
||||
pool_private_ip: {get_attr: [etcd_lb, address]}
|
||||
master_private_ip: {get_attr: [kube_masters, resource.0.kube_master_ip]}
|
||||
|
||||
######################################################################
|
||||
|
@ -454,8 +402,8 @@ resources:
|
|||
resource_def:
|
||||
type: kubemaster.yaml
|
||||
properties:
|
||||
api_public_address: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
api_private_address: {get_attr: [api_loadbalancer, vip_address]}
|
||||
api_public_address: {get_attr: [api_lb, floating_address]}
|
||||
api_private_address: {get_attr: [api_lb, address]}
|
||||
ssh_key_name: {get_param: ssh_key_name}
|
||||
server_image: {get_param: server_image}
|
||||
master_flavor: {get_param: master_flavor}
|
||||
|
@ -474,8 +422,8 @@ resources:
|
|||
magnum_url: {get_param: magnum_url}
|
||||
fixed_network: {get_resource: fixed_network}
|
||||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
api_pool_id: {get_resource: api_pool}
|
||||
etcd_pool_id: {get_resource: etcd_pool}
|
||||
api_pool_id: {get_attr: [api_lb, pool_id]}
|
||||
etcd_pool_id: {get_attr: [etcd_lb, pool_id]}
|
||||
username: {get_param: username}
|
||||
password: {get_param: password}
|
||||
tenant_name: {get_param: tenant_name}
|
||||
|
|
|
@ -278,6 +278,22 @@ parameters:
|
|||
|
||||
resources:
|
||||
|
||||
api_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_param: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
port: {get_param: kubernetes_port}
|
||||
|
||||
etcd_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_param: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: HTTP
|
||||
port: 2379
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# security groups. we need to permit network traffic of various
|
||||
|
@ -324,92 +340,38 @@ resources:
|
|||
- protocol: tcp
|
||||
- protocol: udp
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# load balancers.
|
||||
#
|
||||
api_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_param: fixed_subnet}
|
||||
|
||||
api_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: api_loadbalancer}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
protocol_port: {get_param: kubernetes_port}
|
||||
|
||||
api_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: api_listener}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
|
||||
api_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: api_pool }
|
||||
|
||||
api_pool_floating:
|
||||
type: Magnum::Optional::Neutron::FloatingIP
|
||||
properties:
|
||||
floating_network: {get_param: external_network}
|
||||
port_id: {get_attr: [api_loadbalancer, vip_port_id]}
|
||||
|
||||
etcd_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_param: fixed_subnet}
|
||||
|
||||
etcd_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: etcd_loadbalancer}
|
||||
protocol: HTTP
|
||||
protocol_port: 2379
|
||||
|
||||
etcd_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: etcd_listener}
|
||||
protocol: HTTP
|
||||
|
||||
etcd_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: etcd_pool }
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# resources that expose the IPs of either the kube master or a given
|
||||
# LBaaS pool depending on whether LBaaS is enabled for the cluster.
|
||||
#
|
||||
|
||||
api_address_switch:
|
||||
api_address_lb_switch:
|
||||
type: Magnum::ApiGatewaySwitcher
|
||||
properties:
|
||||
pool_public_ip: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
pool_private_ip: {get_attr: [api_loadbalancer, vip_address]}
|
||||
pool_public_ip: {get_attr: [api_lb, floating_address]}
|
||||
pool_private_ip: {get_attr: [api_lb, address]}
|
||||
master_public_ip: {get_attr: [kube_masters, resource.0.kube_master_external_ip]}
|
||||
master_private_ip: {get_attr: [kube_masters, resource.0.kube_master_ip]}
|
||||
|
||||
etcd_address_switch:
|
||||
etcd_address_lb_switch:
|
||||
type: Magnum::ApiGatewaySwitcher
|
||||
properties:
|
||||
pool_private_ip: {get_attr: [etcd_loadbalancer, vip_address]}
|
||||
pool_private_ip: {get_attr: [etcd_lb, address]}
|
||||
master_private_ip: {get_attr: [kube_masters, resource.0.kube_master_ip]}
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# resources that expose the IPs of either floating ip or a given
|
||||
# fixed ip depending on whether FloatingIP is enabled for the cluster.
|
||||
#
|
||||
|
||||
api_address_floating_switch:
|
||||
type: Magnum::FloatingIPAddressSwitcher
|
||||
properties:
|
||||
public_ip: {get_attr: [api_address_lb_switch, public_ip]}
|
||||
private_ip: {get_attr: [api_address_lb_switch, private_ip]}
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# kubernetes masters. This is a resource group that will create
|
||||
|
@ -423,8 +385,8 @@ resources:
|
|||
resource_def:
|
||||
type: kubemaster.yaml
|
||||
properties:
|
||||
api_public_address: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
api_private_address: {get_attr: [api_loadbalancer, vip_address]}
|
||||
api_public_address: {get_attr: [api_lb, floating_address]}
|
||||
api_private_address: {get_attr: [api_lb, address]}
|
||||
ssh_key_name: {get_param: ssh_key_name}
|
||||
server_image: {get_param: server_image}
|
||||
master_flavor: {get_param: master_flavor}
|
||||
|
@ -443,8 +405,8 @@ resources:
|
|||
magnum_url: {get_param: magnum_url}
|
||||
fixed_network: {get_param: fixed_network}
|
||||
fixed_subnet: {get_param: fixed_subnet}
|
||||
api_pool_id: {get_resource: api_pool}
|
||||
etcd_pool_id: {get_resource: etcd_pool}
|
||||
api_pool_id: {get_attr: [api_lb, pool_id]}
|
||||
etcd_pool_id: {get_attr: [etcd_lb, pool_id]}
|
||||
username: {get_param: username}
|
||||
password: {get_param: password}
|
||||
tenant_name: {get_param: tenant_name}
|
||||
|
@ -483,8 +445,8 @@ resources:
|
|||
fixed_subnet: {get_param: fixed_subnet}
|
||||
network_driver: {get_param: network_driver}
|
||||
flannel_network_cidr: {get_param: flannel_network_cidr}
|
||||
kube_master_ip: {get_attr: [api_address_switch, private_ip]}
|
||||
etcd_server_ip: {get_attr: [etcd_address_switch, private_ip]}
|
||||
kube_master_ip: {get_attr: [api_address_lb_switch, private_ip]}
|
||||
etcd_server_ip: {get_attr: [etcd_address_lb_switch, private_ip]}
|
||||
external_network: {get_param: external_network}
|
||||
kube_allow_priv: {get_param: kube_allow_priv}
|
||||
docker_volume_size: {get_param: docker_volume_size}
|
||||
|
@ -526,7 +488,7 @@ outputs:
|
|||
str_replace:
|
||||
template: api_ip_address
|
||||
params:
|
||||
api_ip_address: {get_attr: [api_address_switch, public_ip]}
|
||||
api_ip_address: {get_attr: [api_address_floating_switch, ip_address]}
|
||||
description: >
|
||||
This is the API endpoint of the Kubernetes cluster. Use this to access
|
||||
the Kubernetes API.
|
||||
|
|
|
@ -227,6 +227,14 @@ resources:
|
|||
router_id: {get_resource: extrouter}
|
||||
subnet: {get_resource: fixed_subnet}
|
||||
|
||||
api_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: HTTP
|
||||
port: 8080
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# security groups. we need to permit network traffic of various
|
||||
|
@ -342,57 +350,19 @@ resources:
|
|||
config: {get_resource: start_services_master}
|
||||
servers: {get_attr: [mesos_masters, attributes, mesos_server_id]}
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# load balancers.
|
||||
#
|
||||
api_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_resource: fixed_subnet}
|
||||
|
||||
api_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: api_loadbalancer}
|
||||
protocol: HTTP
|
||||
protocol_port: 8080
|
||||
|
||||
api_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: api_listener}
|
||||
protocol: HTTP
|
||||
|
||||
api_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: api_pool }
|
||||
|
||||
api_pool_floating:
|
||||
type: Magnum::Optional::Neutron::FloatingIP
|
||||
depends_on:
|
||||
- extrouter_inside
|
||||
properties:
|
||||
floating_network: {get_param: external_network}
|
||||
port_id: {get_attr: [api_loadbalancer, vip_port_id]}
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# resources that expose the IPs of either the mesos master or a given
|
||||
# LBaaS pool depending on whether LBaaS is enabled for the bay.
|
||||
#
|
||||
|
||||
api_address_switch:
|
||||
api_address_lb_switch:
|
||||
type: Magnum::ApiGatewaySwitcher
|
||||
properties:
|
||||
pool_public_ip: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
pool_public_ip: {get_attr: [api_lb, floating_address]}
|
||||
pool_private_ip: {get_attr: [api_lb, address]}
|
||||
master_public_ip: {get_attr: [mesos_masters, resource.0.mesos_master_external_ip]}
|
||||
master_private_ip: {get_attr: [mesos_masters, resource.0.mesos_master_ip]}
|
||||
|
||||
######################################################################
|
||||
#
|
||||
|
@ -416,7 +386,7 @@ resources:
|
|||
fixed_network: {get_resource: fixed_network}
|
||||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
secgroup_mesos_id: {get_resource: secgroup_master}
|
||||
api_pool_id: {get_resource: api_pool}
|
||||
api_pool_id: {get_attr: [api_lb, pool_id]}
|
||||
|
||||
######################################################################
|
||||
#
|
||||
|
@ -463,7 +433,7 @@ resources:
|
|||
outputs:
|
||||
|
||||
api_address:
|
||||
value: {get_attr: [api_address_switch, public_ip]}
|
||||
value: {get_attr: [api_address_lb_switch, public_ip]}
|
||||
description: >
|
||||
This is the API endpoint of the Mesos master. Use this to access
|
||||
the Mesos API from outside the cluster.
|
||||
|
|
|
@ -275,6 +275,22 @@ resources:
|
|||
get_resource:
|
||||
fixed_subnet
|
||||
|
||||
api_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
port: {get_param: swarm_port}
|
||||
|
||||
etcd_lb:
|
||||
type: ../../common/templates/lb.yaml
|
||||
properties:
|
||||
fixed_subnet: {get_resource: fixed_subnet}
|
||||
external_network: {get_param: external_network}
|
||||
protocol: HTTP
|
||||
port: 2379
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# security groups. we need to permit network traffic of various
|
||||
|
@ -289,92 +305,24 @@ resources:
|
|||
- protocol: tcp
|
||||
- protocol: udp
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# load balancers.
|
||||
#
|
||||
api_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_resource: fixed_subnet}
|
||||
|
||||
api_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: api_loadbalancer}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
protocol_port: {get_param: swarm_port}
|
||||
|
||||
api_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: api_listener}
|
||||
protocol: {get_param: loadbalancing_protocol}
|
||||
|
||||
api_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: api_pool }
|
||||
|
||||
api_pool_floating:
|
||||
type: Magnum::Optional::Neutron::FloatingIP
|
||||
depends_on:
|
||||
- extrouter_inside
|
||||
properties:
|
||||
floating_network: {get_param: external_network}
|
||||
port_id: {get_attr: [api_loadbalancer, vip_port_id]}
|
||||
|
||||
etcd_loadbalancer:
|
||||
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
|
||||
properties:
|
||||
vip_subnet: {get_resource: fixed_subnet}
|
||||
|
||||
etcd_listener:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Listener
|
||||
properties:
|
||||
loadbalancer: {get_resource: etcd_loadbalancer}
|
||||
protocol: HTTP
|
||||
protocol_port: 2379
|
||||
|
||||
etcd_pool:
|
||||
type: Magnum::Optional::Neutron::LBaaS::Pool
|
||||
properties:
|
||||
lb_algorithm: ROUND_ROBIN
|
||||
listener: {get_resource: etcd_listener}
|
||||
protocol: HTTP
|
||||
|
||||
etcd_monitor:
|
||||
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
|
||||
properties:
|
||||
type: TCP
|
||||
delay: 5
|
||||
max_retries: 5
|
||||
timeout: 5
|
||||
pool: { get_resource: etcd_pool }
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# resources that expose the IPs of either the swarm master or a given
|
||||
# LBaaS pool depending on whether LBaaS is enabled for the cluster.
|
||||
#
|
||||
|
||||
api_address_switch:
|
||||
api_address_lb_switch:
|
||||
type: Magnum::ApiGatewaySwitcher
|
||||
properties:
|
||||
pool_public_ip: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
pool_private_ip: {get_attr: [api_loadbalancer, vip_address]}
|
||||
pool_public_ip: {get_attr: [api_lb, floating_address]}
|
||||
pool_private_ip: {get_attr: [api_lb, address]}
|
||||
master_public_ip: {get_attr: [swarm_masters, resource.0.swarm_master_external_ip]}
|
||||
master_private_ip: {get_attr: [swarm_masters, resource.0.swarm_master_ip]}
|
||||
|
||||
etcd_address_switch:
|
||||
etcd_address_lb_switch:
|
||||
type: Magnum::ApiGatewaySwitcher
|
||||
properties:
|
||||
pool_private_ip: {get_attr: [etcd_loadbalancer, vip_address]}
|
||||
pool_private_ip: {get_attr: [etcd_lb, address]}
|
||||
master_private_ip: {get_attr: [swarm_masters, resource.0.swarm_master_ip]}
|
||||
|
||||
######################################################################
|
||||
|
@ -405,7 +353,7 @@ resources:
|
|||
http_proxy: {get_param: http_proxy}
|
||||
https_proxy: {get_param: https_proxy}
|
||||
no_proxy: {get_param: no_proxy}
|
||||
swarm_api_ip: {get_attr: [api_loadbalancer, vip_address]}
|
||||
swarm_api_ip: {get_attr: [api_lb, address]}
|
||||
cluster_uuid: {get_param: cluster_uuid}
|
||||
magnum_url: {get_param: magnum_url}
|
||||
tls_disabled: {get_param: tls_disabled}
|
||||
|
@ -415,10 +363,10 @@ resources:
|
|||
flannel_network_subnetlen: {get_param: flannel_network_subnetlen}
|
||||
flannel_backend: {get_param: flannel_backend}
|
||||
swarm_port: {get_param: swarm_port}
|
||||
api_pool_id: {get_resource: api_pool}
|
||||
etcd_pool_id: {get_resource: etcd_pool}
|
||||
etcd_server_ip: {get_attr: [etcd_loadbalancer, vip_address]}
|
||||
api_ip_address: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||
api_pool_id: {get_attr: [api_lb, pool_id]}
|
||||
etcd_pool_id: {get_attr: [etcd_lb, pool_id]}
|
||||
etcd_server_ip: {get_attr: [etcd_lb, address]}
|
||||
api_ip_address: {get_attr: [api_lb, floating_address]}
|
||||
swarm_version: {get_param: swarm_version}
|
||||
swarm_strategy: {get_param: swarm_strategy}
|
||||
trustee_user_id: {get_param: trustee_user_id}
|
||||
|
@ -448,15 +396,15 @@ resources:
|
|||
http_proxy: {get_param: http_proxy}
|
||||
https_proxy: {get_param: https_proxy}
|
||||
no_proxy: {get_param: no_proxy}
|
||||
swarm_api_ip: {get_attr: [api_address_switch, private_ip]}
|
||||
swarm_api_ip: {get_attr: [api_address_lb_switch, private_ip]}
|
||||
cluster_uuid: {get_param: cluster_uuid}
|
||||
magnum_url: {get_param: magnum_url}
|
||||
tls_disabled: {get_param: tls_disabled}
|
||||
secgroup_swarm_node_id: {get_resource: secgroup_manager}
|
||||
flannel_network_cidr: {get_param: flannel_network_cidr}
|
||||
network_driver: {get_param: network_driver}
|
||||
etcd_server_ip: {get_attr: [etcd_address_switch, private_ip]}
|
||||
api_ip_address: {get_attr: [api_address_switch, public_ip]}
|
||||
etcd_server_ip: {get_attr: [etcd_address_lb_switch, private_ip]}
|
||||
api_ip_address: {get_attr: [api_address_lb_switch, public_ip]}
|
||||
swarm_version: {get_param: swarm_version}
|
||||
trustee_domain_id: {get_param: trustee_domain_id}
|
||||
trustee_user_id: {get_param: trustee_user_id}
|
||||
|
@ -480,7 +428,7 @@ outputs:
|
|||
str_replace:
|
||||
template: api_ip_address
|
||||
params:
|
||||
api_ip_address: {get_attr: [api_address_switch, public_ip]}
|
||||
api_ip_address: {get_attr: [api_address_lb_switch, public_ip]}
|
||||
description: >
|
||||
This is the API endpoint of the Swarm masters. Use this to access
|
||||
the Swarm API server from outside the cluster.
|
||||
|
|
Loading…
Reference in New Issue