|
|
|
@ -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.
|
|
|
|
|