Proxy support for Mesos cluster

For OpenStack environment behind a firewall, services such as
google/docker cannot be accessed directly so a proxy server
is needed to provide access.Proxy support is already available
for Kubernetes and Swarm clusters. This series of patches adds
the proxy support for Mesos cluster.

This particular patch covers the Mesos master node.

Implements: blueprint add-proxy-mesos
Change-Id: I1c6e212e1477801d6f0d3c4a48df4f0bba5223d4
This commit is contained in:
wangqun 2016-01-14 03:09:42 +00:00
parent a786a2ae68
commit 2a33a25675
2 changed files with 27 additions and 1 deletions

View File

@ -5,4 +5,7 @@ cat > /etc/sysconfig/heat-params <<EOF
MESOS_MASTERS_IPS="$MESOS_MASTERS_IPS"
CLUSTER_NAME="$CLUSTER_NAME"
QUORUM="$((($NUMBER_OF_MASTERS+1)/2))"
HTTP_PROXY="$HTTP_PROXY"
HTTPS_PROXY="$HTTPS_PROXY"
NO_PROXY="$NO_PROXY"
EOF

View File

@ -159,6 +159,12 @@ resources:
type: String
- name: QUORUM
type: String
- name: HTTP_PROXY
type: String
- name: HTTPS_PROXY
type: String
- name: NO_PROXY
type: String
configure_master:
type: OS::Heat::SoftwareConfig
@ -166,6 +172,12 @@ resources:
group: script
config: {get_file: fragments/configure-mesos-master.sh}
add_proxy_master:
type: OS::Heat::SoftwareConfig
properties:
group: script
config: {get_file: fragments/add-proxy.sh}
start_services_master:
type: OS::Heat::SoftwareConfig
properties:
@ -186,6 +198,9 @@ resources:
MESOS_MASTERS_IPS: {list_join: [' ', {get_attr: [mesos_masters, mesos_master_ip]}]}
CLUSTER_NAME: {get_param: cluster_name}
NUMBER_OF_MASTERS: {get_param: number_of_masters}
HTTP_PROXY: {get_param: http_proxy}
HTTPS_PROXY: {get_param: https_proxy}
NO_PROXY: {get_param: no_proxy}
configure_master_deployment:
type: OS::Heat::SoftwareDeploymentGroup
@ -195,10 +210,18 @@ resources:
config: {get_resource: configure_master}
servers: {get_attr: [mesos_masters, attributes, mesos_server_id]}
start_services_master_deployment:
add_proxy_master_deployment:
type: OS::Heat::SoftwareDeploymentGroup
depends_on:
- configure_master_deployment
properties:
config: {get_resource: add_proxy_master}
servers: {get_attr: [mesos_masters, attributes, mesos_server_id]}
start_services_master_deployment:
type: OS::Heat::SoftwareDeploymentGroup
depends_on:
- add_proxy_master_deployment
properties:
config: {get_resource: start_services_master}
servers: {get_attr: [mesos_masters, attributes, mesos_server_id]}