summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajiv Kumar <rajiv.kumar@nectechnologies.in>2016-07-07 09:39:06 +0530
committerRajiv Kumar <rajiv.kumar@nectechnologies.in>2016-07-18 08:51:17 +0530
commit15162ce33a099a53f7022ae45aec15463b0432a6 (patch)
tree90e7417b7ba667e4245614695e39b4b8d3735f83
parent830db91bf2a842f0c28e15e5754d19ace9546e4c (diff)
Update mesos slave to mesos agent
Mesos community has renamed slave to agent. This change reflect this renaming in the code. Change-Id: Ic97a827345b62f812ed63180cd1f5820e2200682 Closes-Bug: #1516188
Notes
Notes (review): Code-Review+1: Drago <drago.rosson@rackspace.com> Code-Review+2: Madhuri Kumari <madhuri.kumari@intel.com> Code-Review+2: Ton Ngo <ton@us.ibm.com> Workflow+1: Ton Ngo <ton@us.ibm.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 18 Jul 2016 08:13:10 +0000 Reviewed-on: https://review.openstack.org/338680 Project: openstack/magnum Branch: refs/heads/master
-rw-r--r--doc/source/dev/mesos.rst6
-rw-r--r--magnum/api/attr_validator.py46
-rw-r--r--magnum/api/controllers/v1/bay.py2
-rw-r--r--magnum/conductor/mesos_monitor.py10
-rwxr-xr-xmagnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart2
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/template_def.py20
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-agent.sh (renamed from magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-slave.sh)20
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-agent.sh (renamed from magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-slave.sh)4
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/mesosagent.yaml (renamed from magnum/drivers/mesos_ubuntu_v1/templates/mesosslave.yaml)66
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml52
-rw-r--r--magnum/templates/mesos/fragments/configure-mesos-agent.sh53
-rw-r--r--magnum/templates/mesos/fragments/start-services-agent.sh8
-rw-r--r--magnum/templates/mesos/mesosagent.yaml275
-rw-r--r--magnum/tests/functional/common/base.py6
-rw-r--r--magnum/tests/functional/python_client_base.py2
-rw-r--r--magnum/tests/unit/api/test_attr_validator.py26
-rw-r--r--magnum/tests/unit/conductor/handlers/test_mesos_bay_conductor.py60
-rw-r--r--magnum/tests/unit/conductor/test_monitors.py4
-rw-r--r--magnum/tests/unit/drivers/test_template_definition.py32
19 files changed, 515 insertions, 179 deletions
diff --git a/doc/source/dev/mesos.rst b/doc/source/dev/mesos.rst
index 9762ab3..2642e4b 100644
--- a/doc/source/dev/mesos.rst
+++ b/doc/source/dev/mesos.rst
@@ -144,12 +144,12 @@ You can ssh into that server as the ``ubuntu`` user:
144 144
145 $ ssh ubuntu@192.168.200.86 145 $ ssh ubuntu@192.168.200.86
146 146
147You can log into your slaves using the ``ubuntu`` user as well. You can 147You can log into your agents using the ``ubuntu`` user as well. You can
148get a list of slaves addresses by running: 148get a list of agents addresses by running:
149 149
150:: 150::
151 151
152 $ heat output-show my-mesos-cluster mesos_slaves 152 $ heat output-show my-mesos-cluster mesos_agents
153 [ 153 [
154 "192.168.200.182" 154 "192.168.200.182"
155 ] 155 ]
diff --git a/magnum/api/attr_validator.py b/magnum/api/attr_validator.py
index de5ed98..cbccdf8 100644
--- a/magnum/api/attr_validator.py
+++ b/magnum/api/attr_validator.py
@@ -109,14 +109,14 @@ def validate_labels(labels):
109 109
110 110
111def validate_labels_isolation(labels): 111def validate_labels_isolation(labels):
112 """Validate mesos_slave_isolation""" 112 """Validate mesos_agent_isolation"""
113 mesos_slave_isolation = labels.get('mesos_slave_isolation') 113 mesos_agent_isolation = labels.get('mesos_agent_isolation')
114 mesos_slave_isolation_list = mesos_slave_isolation.split(',') 114 mesos_agent_isolation_list = mesos_agent_isolation.split(',')
115 unsupported_isolations = set(mesos_slave_isolation_list) - set( 115 unsupported_isolations = set(mesos_agent_isolation_list) - set(
116 SUPPORTED_ISOLATION) 116 SUPPORTED_ISOLATION)
117 if (len(unsupported_isolations) > 0): 117 if (len(unsupported_isolations) > 0):
118 raise exception.InvalidParameterValue(_( 118 raise exception.InvalidParameterValue(_(
119 'property "labels/mesos_salve_isolation" with value ' 119 'property "labels/mesos_agent_isolation" with value '
120 '"%(isolation_val)s" is not supported, supported values are: ' 120 '"%(isolation_val)s" is not supported, supported values are: '
121 '%(supported_isolation)s') % { 121 '%(supported_isolation)s') % {
122 'isolation_val': ', '.join(list(unsupported_isolations)), 122 'isolation_val': ', '.join(list(unsupported_isolations)),
@@ -125,15 +125,15 @@ def validate_labels_isolation(labels):
125 125
126 126
127def validate_labels_image_providers(labels): 127def validate_labels_image_providers(labels):
128 """Validate mesos_slave_image_providers""" 128 """Validate mesos_agent_image_providers"""
129 mesos_slave_image_providers = labels.get('mesos_slave_image_providers') 129 mesos_agent_image_providers = labels.get('mesos_agent_image_providers')
130 mesos_slave_image_providers_list = mesos_slave_image_providers.split(',') 130 mesos_agent_image_providers_list = mesos_agent_image_providers.split(',')
131 isolation_with_valid_data = False 131 isolation_with_valid_data = False
132 for image_providers_val in mesos_slave_image_providers_list: 132 for image_providers_val in mesos_agent_image_providers_list:
133 image_providers_val = image_providers_val.lower() 133 image_providers_val = image_providers_val.lower()
134 if image_providers_val not in SUPPORTED_IMAGE_PROVIDERS: 134 if image_providers_val not in SUPPORTED_IMAGE_PROVIDERS:
135 raise exception.InvalidParameterValue(_( 135 raise exception.InvalidParameterValue(_(
136 'property "labels/mesos_slave_image_providers" with value ' 136 'property "labels/mesos_agent_image_providers" with value '
137 '"%(image_providers)s" is not supported, supported values ' 137 '"%(image_providers)s" is not supported, supported values '
138 'are: %(supported_image_providers)s') % { 138 'are: %(supported_image_providers)s') % {
139 'image_providers': image_providers_val, 139 'image_providers': image_providers_val,
@@ -141,26 +141,26 @@ def validate_labels_image_providers(labels):
141 SUPPORTED_IMAGE_PROVIDERS + ['unspecified'])}) 141 SUPPORTED_IMAGE_PROVIDERS + ['unspecified'])})
142 142
143 if image_providers_val == 'docker': 143 if image_providers_val == 'docker':
144 mesos_slave_isolation = labels.get('mesos_slave_isolation') 144 mesos_agent_isolation = labels.get('mesos_agent_isolation')
145 if mesos_slave_isolation is not None: 145 if mesos_agent_isolation is not None:
146 mesos_slave_isolation_list = mesos_slave_isolation.split(',') 146 mesos_agent_isolation_list = mesos_agent_isolation.split(',')
147 for isolations_val in mesos_slave_isolation_list: 147 for isolations_val in mesos_agent_isolation_list:
148 if isolations_val == 'docker/runtime': 148 if isolations_val == 'docker/runtime':
149 isolation_with_valid_data = True 149 isolation_with_valid_data = True
150 if mesos_slave_isolation is None or not isolation_with_valid_data: 150 if mesos_agent_isolation is None or not isolation_with_valid_data:
151 raise exception.RequiredParameterNotProvided(_( 151 raise exception.RequiredParameterNotProvided(_(
152 "Docker runtime isolator has to be specified if 'docker' " 152 "Docker runtime isolator has to be specified if 'docker' "
153 "is included in 'mesos_slave_image_providers' Please add " 153 "is included in 'mesos_agent_image_providers' Please add "
154 "'docker/runtime' to 'mesos_slave_isolation' labels " 154 "'docker/runtime' to 'mesos_agent_isolation' labels "
155 "flags")) 155 "flags"))
156 156
157 157
158def validate_labels_executor_env_variables(labels): 158def validate_labels_executor_env_variables(labels):
159 """Validate executor_environment_variables""" 159 """Validate executor_environment_variables"""
160 mesos_slave_executor_env_val = labels.get( 160 mesos_agent_executor_env_val = labels.get(
161 'mesos_slave_executor_env_variables') 161 'mesos_agent_executor_env_variables')
162 try: 162 try:
163 json.loads(mesos_slave_executor_env_val) 163 json.loads(mesos_agent_executor_env_val)
164 except ValueError: 164 except ValueError:
165 err = (_("Json format error")) 165 err = (_("Json format error"))
166 raise exception.InvalidParameterValue(err) 166 raise exception.InvalidParameterValue(err)
@@ -194,8 +194,8 @@ validators = {'image_id': validate_image,
194 'fixed_network': validate_fixed_network, 194 'fixed_network': validate_fixed_network,
195 'labels': validate_labels} 195 'labels': validate_labels}
196 196
197labels_validators = {'mesos_slave_isolation': validate_labels_isolation, 197labels_validators = {'mesos_agent_isolation': validate_labels_isolation,
198 'mesos_slave_image_providers': 198 'mesos_agent_image_providers':
199 validate_labels_image_providers, 199 validate_labels_image_providers,
200 'mesos_slave_executor_env_variables': 200 'mesos_agent_executor_env_variables':
201 validate_labels_executor_env_variables} 201 validate_labels_executor_env_variables}
diff --git a/magnum/api/controllers/v1/bay.py b/magnum/api/controllers/v1/bay.py
index db029b5..3e5fa64 100644
--- a/magnum/api/controllers/v1/bay.py
+++ b/magnum/api/controllers/v1/bay.py
@@ -118,7 +118,7 @@ class Bay(base.APIBase):
118 """Api address of cluster master node""" 118 """Api address of cluster master node"""
119 119
120 node_addresses = wsme.wsattr([wtypes.text], readonly=True) 120 node_addresses = wsme.wsattr([wtypes.text], readonly=True)
121 """IP addresses of cluster slave nodes""" 121 """IP addresses of cluster agent nodes"""
122 122
123 master_addresses = wsme.wsattr([wtypes.text], readonly=True) 123 master_addresses = wsme.wsattr([wtypes.text], readonly=True)
124 """IP addresses of cluster master nodes""" 124 """IP addresses of cluster master nodes"""
diff --git a/magnum/conductor/mesos_monitor.py b/magnum/conductor/mesos_monitor.py
index 2cd4471..158f7fc 100644
--- a/magnum/conductor/mesos_monitor.py
+++ b/magnum/conductor/mesos_monitor.py
@@ -51,11 +51,11 @@ class MesosMonitor(MonitorBase):
51 path='/state') 51 path='/state')
52 master = jsonutils.loads(urlfetch.get(mesos_master_url)) 52 master = jsonutils.loads(urlfetch.get(mesos_master_url))
53 if self._is_leader(master): 53 if self._is_leader(master):
54 for slave in master['slaves']: 54 for agent in master['agents']:
55 self.data['mem_total'] += slave['resources']['mem'] 55 self.data['mem_total'] += agent['resources']['mem']
56 self.data['mem_used'] += slave['used_resources']['mem'] 56 self.data['mem_used'] += agent['used_resources']['mem']
57 self.data['cpu_total'] += slave['resources']['cpus'] 57 self.data['cpu_total'] += agent['resources']['cpus']
58 self.data['cpu_used'] += slave['used_resources']['cpus'] 58 self.data['cpu_used'] += agent['used_resources']['cpus']
59 break 59 break
60 60
61 def compute_memory_util(self): 61 def compute_memory_util(self):
diff --git a/magnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart b/magnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart
index 199dc6e..989deb6 100755
--- a/magnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart
+++ b/magnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2 2
3for service in zookeeper mesos-slave mesos-master marathon; do 3for service in zookeeper mesos-agent mesos-master marathon; do
4 service $service stop 4 service $service stop
5 [ -f /etc/init/$service.conf ] && echo "manual" > /etc/init/$service.override 5 [ -f /etc/init/$service.conf ] && echo "manual" > /etc/init/$service.override
6done 6done
diff --git a/magnum/drivers/mesos_ubuntu_v1/template_def.py b/magnum/drivers/mesos_ubuntu_v1/template_def.py
index fb5ca34..0efacf1 100644
--- a/magnum/drivers/mesos_ubuntu_v1/template_def.py
+++ b/magnum/drivers/mesos_ubuntu_v1/template_def.py
@@ -28,11 +28,11 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
28 self.add_parameter('external_network', 28 self.add_parameter('external_network',
29 baymodel_attr='external_network_id', 29 baymodel_attr='external_network_id',
30 required=True) 30 required=True)
31 self.add_parameter('number_of_slaves', 31 self.add_parameter('number_of_agents',
32 bay_attr='node_count') 32 bay_attr='node_count')
33 self.add_parameter('master_flavor', 33 self.add_parameter('master_flavor',
34 baymodel_attr='master_flavor_id') 34 baymodel_attr='master_flavor_id')
35 self.add_parameter('slave_flavor', 35 self.add_parameter('agent_flavor',
36 baymodel_attr='flavor_id') 36 baymodel_attr='flavor_id')
37 self.add_parameter('cluster_name', 37 self.add_parameter('cluster_name',
38 bay_attr='name') 38 bay_attr='name')
@@ -45,9 +45,9 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
45 bay_attr=None) 45 bay_attr=None)
46 self.add_output('mesos_master', 46 self.add_output('mesos_master',
47 bay_attr='master_addresses') 47 bay_attr='master_addresses')
48 self.add_output('mesos_slaves_private', 48 self.add_output('mesos_agents_private',
49 bay_attr=None) 49 bay_attr=None)
50 self.add_output('mesos_slaves', 50 self.add_output('mesos_agents',
51 bay_attr='node_addresses') 51 bay_attr='node_addresses')
52 52
53 def get_params(self, context, baymodel, bay, **kwargs): 53 def get_params(self, context, baymodel, bay, **kwargs):
@@ -62,18 +62,18 @@ class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
62 extra_params['domain_name'] = context.domain_name 62 extra_params['domain_name'] = context.domain_name
63 extra_params['region_name'] = osc.cinder_region_name() 63 extra_params['region_name'] = osc.cinder_region_name()
64 64
65 label_list = ['rexray_preempt', 'mesos_slave_isolation', 65 label_list = ['rexray_preempt', 'mesos_agent_isolation',
66 'mesos_slave_image_providers', 66 'mesos_agent_image_providers',
67 'mesos_slave_work_dir', 67 'mesos_agent_work_dir',
68 'mesos_slave_executor_env_variables'] 68 'mesos_agent_executor_env_variables']
69 69
70 for label in label_list: 70 for label in label_list:
71 extra_params[label] = baymodel.labels.get(label) 71 extra_params[label] = baymodel.labels.get(label)
72 72
73 scale_mgr = kwargs.pop('scale_manager', None) 73 scale_mgr = kwargs.pop('scale_manager', None)
74 if scale_mgr: 74 if scale_mgr:
75 hosts = self.get_output('mesos_slaves_private') 75 hosts = self.get_output('mesos_agents_private')
76 extra_params['slaves_to_remove'] = ( 76 extra_params['agents_to_remove'] = (
77 scale_mgr.get_removal_nodes(hosts)) 77 scale_mgr.get_removal_nodes(hosts))
78 78
79 return super(UbuntuMesosTemplateDefinition, 79 return super(UbuntuMesosTemplateDefinition,
diff --git a/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-slave.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-agent.sh
index 8dd10c9..c5da6e4 100644
--- a/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-slave.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-agent.sh
@@ -2,7 +2,7 @@
2 2
3. /etc/sysconfig/heat-params 3. /etc/sysconfig/heat-params
4 4
5echo "Configuring mesos (slave)" 5echo "Configuring mesos (agent)"
6 6
7myip=$(ip addr show eth0 | 7myip=$(ip addr show eth0 |
8 awk '$1 == "inet" {print $2}' | cut -f1 -d/) 8 awk '$1 == "inet" {print $2}' | cut -f1 -d/)
@@ -17,31 +17,31 @@ zk=${zk::-1}
17# Format: zk://host1:port1,...,hostN:portN/path 17# Format: zk://host1:port1,...,hostN:portN/path
18echo "zk://${zk}/mesos" > /etc/mesos/zk 18echo "zk://${zk}/mesos" > /etc/mesos/zk
19 19
20# The hostname the slave should report 20# The hostname the agent should report
21echo "$myip" > /etc/mesos-slave/hostname 21echo "$myip" > /etc/mesos-agent/hostname
22 22
23# The IP address to listen on 23# The IP address to listen on
24echo "$myip" > /etc/mesos-slave/ip 24echo "$myip" > /etc/mesos-agent/ip
25 25
26# List of containerizer implementations 26# List of containerizer implementations
27echo "docker,mesos" > /etc/mesos-slave/containerizers 27echo "docker,mesos" > /etc/mesos-agent/containerizers
28 28
29# Amount of time to wait for an executor to register 29# Amount of time to wait for an executor to register
30cat > /etc/mesos-slave/executor_registration_timeout <<EOF 30cat > /etc/mesos-agent/executor_registration_timeout <<EOF
31$EXECUTOR_REGISTRATION_TIMEOUT 31$EXECUTOR_REGISTRATION_TIMEOUT
32EOF 32EOF
33 33
34if [ -n "$ISOLATION" ]; then 34if [ -n "$ISOLATION" ]; then
35 echo "$ISOLATION" > /etc/mesos-slave/isolation 35 echo "$ISOLATION" > /etc/mesos-agent/isolation
36fi 36fi
37 37
38if [ -n "$WORK_DIR" ]; then 38if [ -n "$WORK_DIR" ]; then
39 echo "$WORK_DIR" > /etc/mesos-slave/work_dir 39 echo "$WORK_DIR" > /etc/mesos-agent/work_dir
40fi 40fi
41 41
42if [ -n "$IMAGE_PROVIDERS" ]; then 42if [ -n "$IMAGE_PROVIDERS" ]; then
43 if [ -n "$ISOLATION" ]; then 43 if [ -n "$ISOLATION" ]; then
44 echo "$IMAGE_PROVIDERS" > /etc/mesos-slave/image_providers 44 echo "$IMAGE_PROVIDERS" > /etc/mesos-agent/image_providers
45 else 45 else
46 echo "isolation doesn't exist, not setting image_providers" 46 echo "isolation doesn't exist, not setting image_providers"
47 fi 47 fi
@@ -49,5 +49,5 @@ fi
49 49
50if [ -n "$EXECUTOR_ENVIRONMENT_VARIABLES" ]; then 50if [ -n "$EXECUTOR_ENVIRONMENT_VARIABLES" ]; then
51 echo "$EXECUTOR_ENVIRONMENT_VARIABLES" > /etc/executor_environment_variables 51 echo "$EXECUTOR_ENVIRONMENT_VARIABLES" > /etc/executor_environment_variables
52 echo "file:///etc/executor_environment_variables" > /etc/mesos-slave/executor_environment_variables 52 echo "file:///etc/executor_environment_variables" > /etc/mesos-agent/executor_environment_variables
53fi 53fi
diff --git a/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-slave.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-agent.sh
index d3bee13..0efb8f4 100644
--- a/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-slave.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-agent.sh
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# Start slave services 3# Start agent services
4for service in docker mesos-slave; do 4for service in docker mesos-agent; do
5 echo "starting service $service" 5 echo "starting service $service"
6 service $service start 6 service $service start
7 rm -f /etc/init/$service.override 7 rm -f /etc/init/$service.override
diff --git a/magnum/drivers/mesos_ubuntu_v1/templates/mesosslave.yaml b/magnum/drivers/mesos_ubuntu_v1/templates/mesosagent.yaml
index 521fec9..b06af53 100644
--- a/magnum/drivers/mesos_ubuntu_v1/templates/mesosslave.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/mesosagent.yaml
@@ -1,7 +1,7 @@
1heat_template_version: 2014-10-16 1heat_template_version: 2014-10-16
2 2
3description: > 3description: >
4 This is a nested stack that defines a single Mesos slave, This stack is 4 This is a nested stack that defines a single Mesos agent, This stack is
5 included by a ResourceGroup resource in the parent template 5 included by a ResourceGroup resource in the parent template
6 (mesoscluster.yaml). 6 (mesoscluster.yaml).
7 7
@@ -11,7 +11,7 @@ parameters:
11 type: string 11 type: string
12 description: glance image used to boot the server 12 description: glance image used to boot the server
13 13
14 slave_flavor: 14 agent_flavor:
15 type: string 15 type: string
16 description: flavor to use when booting the server 16 description: flavor to use when booting the server
17 17
@@ -87,7 +87,7 @@ parameters:
87 enables any host to take control of a volume irrespective of whether 87 enables any host to take control of a volume irrespective of whether
88 other hosts are using the volume 88 other hosts are using the volume
89 89
90 mesos_slave_isolation: 90 mesos_agent_isolation:
91 type: string 91 type: string
92 description: > 92 description: >
93 Isolation mechanisms to use, e.g., `posix/cpu,posix/mem`, or 93 Isolation mechanisms to use, e.g., `posix/cpu,posix/mem`, or
@@ -98,17 +98,17 @@ parameters:
98 module using the `--modules` flag. Note that this flag is only relevant 98 module using the `--modules` flag. Note that this flag is only relevant
99 for the Mesos Containerizer. 99 for the Mesos Containerizer.
100 100
101 mesos_slave_work_dir: 101 mesos_agent_work_dir:
102 type: string 102 type: string
103 description: directory path to place framework work directories 103 description: directory path to place framework work directories
104 104
105 mesos_slave_image_providers: 105 mesos_agent_image_providers:
106 type: string 106 type: string
107 description: > 107 description: >
108 Comma separated list of supported image providers e.g., 108 Comma separated list of supported image providers e.g.,
109 APPC,DOCKER 109 APPC,DOCKER
110 110
111 mesos_slave_executor_env_variables: 111 mesos_agent_executor_env_variables:
112 type: string 112 type: string
113 description: > 113 description: >
114 JSON object representing the environment variables that should be passed 114 JSON object representing the environment variables that should be passed
@@ -133,14 +133,14 @@ parameters:
133 133
134resources: 134resources:
135 135
136 slave_wait_handle: 136 agent_wait_handle:
137 type: OS::Heat::WaitConditionHandle 137 type: OS::Heat::WaitConditionHandle
138 138
139 slave_wait_condition: 139 agent_wait_condition:
140 type: OS::Heat::WaitCondition 140 type: OS::Heat::WaitCondition
141 depends_on: mesos_slave 141 depends_on: mesos_agent
142 properties: 142 properties:
143 handle: {get_resource: slave_wait_handle} 143 handle: {get_resource: agent_wait_handle}
144 timeout: {get_param: wait_condition_timeout} 144 timeout: {get_param: wait_condition_timeout}
145 145
146 secgroup_all_open: 146 secgroup_all_open:
@@ -178,24 +178,24 @@ resources:
178 "$REGION_NAME": {get_param: region_name} 178 "$REGION_NAME": {get_param: region_name}
179 "$DOMAIN_NAME": {get_param: domain_name} 179 "$DOMAIN_NAME": {get_param: domain_name}
180 "$REXRAY_PREEMPT": {get_param: rexray_preempt} 180 "$REXRAY_PREEMPT": {get_param: rexray_preempt}
181 "$ISOLATION": {get_param: mesos_slave_isolation} 181 "$ISOLATION": {get_param: mesos_agent_isolation}
182 "$WORK_DIR": {get_param: mesos_slave_work_dir} 182 "$WORK_DIR": {get_param: mesos_agent_work_dir}
183 "$IMAGE_PROVIDERS": {get_param: mesos_slave_image_providers} 183 "$IMAGE_PROVIDERS": {get_param: mesos_agent_image_providers}
184 "$EXECUTOR_ENVIRONMENT_VARIABLES": {get_param: mesos_slave_executor_env_variables} 184 "$EXECUTOR_ENVIRONMENT_VARIABLES": {get_param: mesos_agent_executor_env_variables}
185 185
186 configure_mesos_slave: 186 configure_mesos_agent:
187 type: OS::Heat::SoftwareConfig 187 type: OS::Heat::SoftwareConfig
188 properties: 188 properties:
189 group: ungrouped 189 group: ungrouped
190 config: {get_file: fragments/configure-mesos-slave.sh} 190 config: {get_file: fragments/configure-mesos-agent.sh}
191 191
192 start_services: 192 start_services:
193 type: OS::Heat::SoftwareConfig 193 type: OS::Heat::SoftwareConfig
194 properties: 194 properties:
195 group: ungrouped 195 group: ungrouped
196 config: {get_file: fragments/start-services-slave.sh} 196 config: {get_file: fragments/start-services-agent.sh}
197 197
198 slave_wc_notify: 198 agent_wc_notify:
199 type: OS::Heat::SoftwareConfig 199 type: OS::Heat::SoftwareConfig
200 properties: 200 properties:
201 group: ungrouped 201 group: ungrouped
@@ -205,7 +205,7 @@ resources:
205 #!/bin/bash -v 205 #!/bin/bash -v
206 wc_notify --data-binary '{"status": "SUCCESS"}' 206 wc_notify --data-binary '{"status": "SUCCESS"}'
207 params: 207 params:
208 wc_notify: {get_attr: [slave_wait_handle, curl_cli]} 208 wc_notify: {get_attr: [agent_wait_handle, curl_cli]}
209 209
210 add_proxy: 210 add_proxy:
211 type: OS::Heat::SoftwareConfig 211 type: OS::Heat::SoftwareConfig
@@ -219,34 +219,34 @@ resources:
219 group: ungrouped 219 group: ungrouped
220 config: {get_file: fragments/volume-service.sh} 220 config: {get_file: fragments/volume-service.sh}
221 221
222 mesos_slave_init: 222 mesos_agent_init:
223 type: OS::Heat::MultipartMime 223 type: OS::Heat::MultipartMime
224 properties: 224 properties:
225 parts: 225 parts:
226 - config: {get_resource: write_heat_params} 226 - config: {get_resource: write_heat_params}
227 - config: {get_resource: configure_mesos_slave} 227 - config: {get_resource: configure_mesos_agent}
228 - config: {get_resource: add_proxy} 228 - config: {get_resource: add_proxy}
229 - config: {get_resource: volume_service} 229 - config: {get_resource: volume_service}
230 - config: {get_resource: start_services} 230 - config: {get_resource: start_services}
231 - config: {get_resource: slave_wc_notify} 231 - config: {get_resource: agent_wc_notify}
232 232
233 ###################################################################### 233 ######################################################################
234 # 234 #
235 # a single Mesos agent. 235 # a single Mesos agent.
236 # 236 #
237 237
238 mesos_slave: 238 mesos_agent:
239 type: OS::Nova::Server 239 type: OS::Nova::Server
240 properties: 240 properties:
241 image: {get_param: server_image} 241 image: {get_param: server_image}
242 flavor: {get_param: slave_flavor} 242 flavor: {get_param: agent_flavor}
243 key_name: {get_param: ssh_key_name} 243 key_name: {get_param: ssh_key_name}
244 user_data_format: RAW 244 user_data_format: RAW
245 user_data: {get_resource: mesos_slave_init} 245 user_data: {get_resource: mesos_agent_init}
246 networks: 246 networks:
247 - port: {get_resource: mesos_slave_eth0} 247 - port: {get_resource: mesos_agent_eth0}
248 248
249 mesos_slave_eth0: 249 mesos_agent_eth0:
250 type: OS::Neutron::Port 250 type: OS::Neutron::Port
251 properties: 251 properties:
252 network: {get_param: fixed_network} 252 network: {get_param: fixed_network}
@@ -257,19 +257,19 @@ resources:
257 - subnet: {get_param: fixed_subnet} 257 - subnet: {get_param: fixed_subnet}
258 replacement_policy: AUTO 258 replacement_policy: AUTO
259 259
260 mesos_slave_floating: 260 mesos_agent_floating:
261 type: OS::Neutron::FloatingIP 261 type: OS::Neutron::FloatingIP
262 properties: 262 properties:
263 floating_network: {get_param: external_network} 263 floating_network: {get_param: external_network}
264 port_id: {get_resource: mesos_slave_eth0} 264 port_id: {get_resource: mesos_agent_eth0}
265 265
266outputs: 266outputs:
267 267
268 mesos_slave_ip: 268 mesos_agent_ip:
269 value: {get_attr: [mesos_slave_eth0, fixed_ips, 0, ip_address]} 269 value: {get_attr: [mesos_agent_eth0, fixed_ips, 0, ip_address]}
270 description: > 270 description: >
271 This is the "private" address of the Mesos agent node. 271 This is the "private" address of the Mesos agent node.
272 mesos_slave_external_ip: 272 mesos_agent_external_ip:
273 value: {get_attr: [mesos_slave_floating, floating_ip_address]} 273 value: {get_attr: [mesos_agent_floating, floating_ip_address]}
274 description: > 274 description: >
275 This is the "public" address of the Mesos agent node. 275 This is the "public" address of the Mesos agent node.
diff --git a/magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml b/magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml
index 7d00b2b..d1eb148 100644
--- a/magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml
@@ -3,7 +3,7 @@ heat_template_version: 2014-10-16
3description: > 3description: >
4 This template will boot a Mesos cluster with one or more masters 4 This template will boot a Mesos cluster with one or more masters
5 (as specified by number_of_masters, default is 1) and one or more agents 5 (as specified by number_of_masters, default is 1) and one or more agents
6 (as specified by the number_of_slaves parameter, which 6 (as specified by the number_of_agents parameter, which
7 defaults to 1). 7 defaults to 1).
8 8
9parameters: 9parameters:
@@ -27,7 +27,7 @@ parameters:
27 default: m1.small 27 default: m1.small
28 description: flavor to use when booting the master server 28 description: flavor to use when booting the master server
29 29
30 slave_flavor: 30 agent_flavor:
31 type: string 31 type: string
32 default: m1.small 32 default: m1.small
33 description: flavor to use when booting the agent server 33 description: flavor to use when booting the agent server
@@ -37,9 +37,9 @@ parameters:
37 description: address of a dns nameserver reachable in your environment 37 description: address of a dns nameserver reachable in your environment
38 default: 8.8.8.8 38 default: 8.8.8.8
39 39
40 number_of_slaves: 40 number_of_agents:
41 type: number 41 type: number
42 description: how many mesos slaves to spawn initially 42 description: how many mesos agents to spawn initially
43 default: 1 43 default: 1
44 44
45 fixed_network_cidr: 45 fixed_network_cidr:
@@ -61,7 +61,7 @@ parameters:
61 executor_registration_timeout: 61 executor_registration_timeout:
62 type: string 62 type: string
63 description: > 63 description: >
64 Amount of time to wait for an executor to register with the slave before 64 Amount of time to wait for an executor to register with the agent before
65 considering it hung and shutting it down 65 considering it hung and shutting it down
66 default: 5mins 66 default: 5mins
67 67
@@ -156,7 +156,7 @@ parameters:
156 type: string 156 type: string
157 description: url for keystone 157 description: url for keystone
158 158
159 mesos_slave_isolation: 159 mesos_agent_isolation:
160 type: string 160 type: string
161 description: > 161 description: >
162 Isolation mechanisms to use, e.g., `posix/cpu,posix/mem`, or 162 Isolation mechanisms to use, e.g., `posix/cpu,posix/mem`, or
@@ -168,19 +168,19 @@ parameters:
168 for the Mesos Containerizer. 168 for the Mesos Containerizer.
169 default: "" 169 default: ""
170 170
171 mesos_slave_work_dir: 171 mesos_agent_work_dir:
172 type: string 172 type: string
173 description: directory path to place framework work directories 173 description: directory path to place framework work directories
174 default: "" 174 default: ""
175 175
176 mesos_slave_image_providers: 176 mesos_agent_image_providers:
177 type: string 177 type: string
178 description: > 178 description: >
179 Comma separated list of supported image providers e.g., 179 Comma separated list of supported image providers e.g.,
180 APPC,DOCKER 180 APPC,DOCKER
181 default: "" 181 default: ""
182 182
183 mesos_slave_executor_env_variables: 183 mesos_agent_executor_env_variables:
184 type: string 184 type: string
185 description: > 185 description: >
186 JSON object representing the environment variables that should be passed 186 JSON object representing the environment variables that should be passed
@@ -188,10 +188,10 @@ parameters:
188 executor will inherit the agent's environment variables. 188 executor will inherit the agent's environment variables.
189 default: "" 189 default: ""
190 190
191 slaves_to_remove: 191 agents_to_remove:
192 type: comma_delimited_list 192 type: comma_delimited_list
193 description: > 193 description: >
194 List of slaves to be removed when doing an update. Individual slave may 194 List of agents to be removed when doing an update. Individual agent may
195 be referenced several ways: (1) The resource name (e.g.['1', '3']), 195 be referenced several ways: (1) The resource name (e.g.['1', '3']),
196 (2) The private IP address ['10.0.0.4', '10.0.0.6']. Note: the list should 196 (2) The private IP address ['10.0.0.4', '10.0.0.6']. Note: the list should
197 be empty when doing a create. 197 be empty when doing a create.
@@ -410,23 +410,23 @@ resources:
410 410
411 ###################################################################### 411 ######################################################################
412 # 412 #
413 # Mesos slaves. This is a resource group that will initially 413 # Mesos agents. This is a resource group that will initially
414 # create <number_of_slaves> slaves, and needs to be manually scaled. 414 # create <number_of_agents> agents, and needs to be manually scaled.
415 # 415 #
416 416
417 mesos_slaves: 417 mesos_agents:
418 type: OS::Heat::ResourceGroup 418 type: OS::Heat::ResourceGroup
419 depends_on: 419 depends_on:
420 - extrouter_inside 420 - extrouter_inside
421 properties: 421 properties:
422 count: {get_param: number_of_slaves} 422 count: {get_param: number_of_agents}
423 removal_policies: [{resource_list: {get_param: slaves_to_remove}}] 423 removal_policies: [{resource_list: {get_param: agents_to_remove}}]
424 resource_def: 424 resource_def:
425 type: mesosslave.yaml 425 type: mesosagent.yaml
426 properties: 426 properties:
427 ssh_key_name: {get_param: ssh_key_name} 427 ssh_key_name: {get_param: ssh_key_name}
428 server_image: {get_param: server_image} 428 server_image: {get_param: server_image}
429 slave_flavor: {get_param: slave_flavor} 429 agent_flavor: {get_param: agent_flavor}
430 fixed_network: {get_resource: fixed_network} 430 fixed_network: {get_resource: fixed_network}
431 fixed_subnet: {get_resource: fixed_subnet} 431 fixed_subnet: {get_resource: fixed_subnet}
432 mesos_masters_ips: {list_join: [' ', {get_attr: [mesos_masters, mesos_master_ip]}]} 432 mesos_masters_ips: {list_join: [' ', {get_attr: [mesos_masters, mesos_master_ip]}]}
@@ -445,10 +445,10 @@ resources:
445 region_name: {get_param: region_name} 445 region_name: {get_param: region_name}
446 domain_name: {get_param: domain_name} 446 domain_name: {get_param: domain_name}
447 rexray_preempt: {get_param: rexray_preempt} 447 rexray_preempt: {get_param: rexray_preempt}
448 mesos_slave_isolation: {get_param: mesos_slave_isolation} 448 mesos_agent_isolation: {get_param: mesos_agent_isolation}
449 mesos_slave_work_dir: {get_param: mesos_slave_work_dir} 449 mesos_agent_work_dir: {get_param: mesos_agent_work_dir}
450 mesos_slave_image_providers: {get_param: mesos_slave_image_providers} 450 mesos_agent_image_providers: {get_param: mesos_agent_image_providers}
451 mesos_slave_executor_env_variables: {get_param: mesos_slave_executor_env_variables} 451 mesos_agent_executor_env_variables: {get_param: mesos_agent_executor_env_variables}
452 452
453outputs: 453outputs:
454 454
@@ -470,12 +470,12 @@ outputs:
470 log in to the Mesos master via ssh or to access the Mesos API 470 log in to the Mesos master via ssh or to access the Mesos API
471 from outside the cluster. 471 from outside the cluster.
472 472
473 mesos_slaves_private: 473 mesos_agent_private:
474 value: {get_attr: [mesos_slaves, mesos_slave_ip]} 474 value: {get_attr: [mesos_agents, mesos_agent_ip]}
475 description: > 475 description: >
476 This is a list of the "private" addresses of all the Mesos agents. 476 This is a list of the "private" addresses of all the Mesos agents.
477 477
478 mesos_slaves: 478 mesos_agents:
479 value: {get_attr: [mesos_slaves, mesos_slave_external_ip]} 479 value: {get_attr: [mesos_agents, mesos_agent_external_ip]}
480 description: > 480 description: >
481 This is a list of the "public" addresses of all the Mesos agents. 481 This is a list of the "public" addresses of all the Mesos agents.
diff --git a/magnum/templates/mesos/fragments/configure-mesos-agent.sh b/magnum/templates/mesos/fragments/configure-mesos-agent.sh
new file mode 100644
index 0000000..c5da6e4
--- /dev/null
+++ b/magnum/templates/mesos/fragments/configure-mesos-agent.sh
@@ -0,0 +1,53 @@
1#!/bin/bash
2
3. /etc/sysconfig/heat-params
4
5echo "Configuring mesos (agent)"
6
7myip=$(ip addr show eth0 |
8 awk '$1 == "inet" {print $2}' | cut -f1 -d/)
9
10zk=""
11for master_ip in $MESOS_MASTERS_IPS; do
12 zk="${zk}${master_ip}:2181,"
13done
14# Remove last ','
15zk=${zk::-1}
16# Zookeeper URL. This specifies how to connect to a quorum of masters
17# Format: zk://host1:port1,...,hostN:portN/path
18echo "zk://${zk}/mesos" > /etc/mesos/zk
19
20# The hostname the agent should report
21echo "$myip" > /etc/mesos-agent/hostname
22
23# The IP address to listen on
24echo "$myip" > /etc/mesos-agent/ip
25
26# List of containerizer implementations
27echo "docker,mesos" > /etc/mesos-agent/containerizers
28
29# Amount of time to wait for an executor to register
30cat > /etc/mesos-agent/executor_registration_timeout <<EOF
31$EXECUTOR_REGISTRATION_TIMEOUT
32EOF
33
34if [ -n "$ISOLATION" ]; then
35 echo "$ISOLATION" > /etc/mesos-agent/isolation
36fi
37
38if [ -n "$WORK_DIR" ]; then
39 echo "$WORK_DIR" > /etc/mesos-agent/work_dir
40fi
41
42if [ -n "$IMAGE_PROVIDERS" ]; then
43 if [ -n "$ISOLATION" ]; then
44 echo "$IMAGE_PROVIDERS" > /etc/mesos-agent/image_providers
45 else
46 echo "isolation doesn't exist, not setting image_providers"
47 fi
48fi
49
50if [ -n "$EXECUTOR_ENVIRONMENT_VARIABLES" ]; then
51 echo "$EXECUTOR_ENVIRONMENT_VARIABLES" > /etc/executor_environment_variables
52 echo "file:///etc/executor_environment_variables" > /etc/mesos-agent/executor_environment_variables
53fi
diff --git a/magnum/templates/mesos/fragments/start-services-agent.sh b/magnum/templates/mesos/fragments/start-services-agent.sh
new file mode 100644
index 0000000..0efb8f4
--- /dev/null
+++ b/magnum/templates/mesos/fragments/start-services-agent.sh
@@ -0,0 +1,8 @@
1#!/bin/sh
2
3# Start agent services
4for service in docker mesos-agent; do
5 echo "starting service $service"
6 service $service start
7 rm -f /etc/init/$service.override
8done
diff --git a/magnum/templates/mesos/mesosagent.yaml b/magnum/templates/mesos/mesosagent.yaml
new file mode 100644
index 0000000..b06af53
--- /dev/null
+++ b/magnum/templates/mesos/mesosagent.yaml
@@ -0,0 +1,275 @@
1heat_template_version: 2014-10-16
2
3description: >
4 This is a nested stack that defines a single Mesos agent, This stack is
5 included by a ResourceGroup resource in the parent template
6 (mesoscluster.yaml).
7
8parameters:
9
10 server_image:
11 type: string
12 description: glance image used to boot the server
13
14 agent_flavor:
15 type: string
16 description: flavor to use when booting the server
17
18 ssh_key_name:
19 type: string
20 description: name of ssh key to be provisioned on our server
21
22 external_network:
23 type: string
24 description: uuid/name of a network to use for floating ip addresses
25
26 wait_condition_timeout:
27 type: number
28 description : >
29 timeout for the Wait Conditions
30
31 executor_registration_timeout:
32 type: string
33 description: >
34 Amount of time to wait for an executor to register with the agent before
35 considering it hung and shutting it down
36
37 http_proxy:
38 type: string
39 description: http proxy address for docker
40
41 https_proxy:
42 type: string
43 description: https proxy address for docker
44
45 no_proxy:
46 type: string
47 description: no proxies for docker
48
49 auth_url:
50 type: string
51 description: >
52 url for mesos to authenticate before sending request
53
54 username:
55 type: string
56 description: user name
57
58 password:
59 type: string
60 description: >
61 user password, not set in current implementation, only used to
62 fill in for Kubernetes config file
63 hidden: true
64
65 tenant_name:
66 type: string
67 description: >
68 tenant_name is used to isolate access to Compute resources
69
70 volume_driver:
71 type: string
72 description: volume driver to use for container storage
73
74 region_name:
75 type: string
76 description: A logically separate section of the cluster
77
78 domain_name:
79 type: string
80 description: >
81 domain is to define the administrative boundaries for management
82 of Keystone entities
83
84 rexray_preempt:
85 type: string
86 description: >
87 enables any host to take control of a volume irrespective of whether
88 other hosts are using the volume
89
90 mesos_agent_isolation:
91 type: string
92 description: >
93 Isolation mechanisms to use, e.g., `posix/cpu,posix/mem`, or
94 `cgroups/cpu,cgroups/mem`, or network/port_mapping (configure with flag:
95 `--with-network-isolator` to enable), or `cgroups/devices/gpus/nvidia`
96 for nvidia specific gpu isolation (configure with flag: `--enable-nvidia
97 -gpu-support` to enable), or `external`, or load an alternate isolator
98 module using the `--modules` flag. Note that this flag is only relevant
99 for the Mesos Containerizer.
100
101 mesos_agent_work_dir:
102 type: string
103 description: directory path to place framework work directories
104
105 mesos_agent_image_providers:
106 type: string
107 description: >
108 Comma separated list of supported image providers e.g.,
109 APPC,DOCKER
110
111 mesos_agent_executor_env_variables:
112 type: string
113 description: >
114 JSON object representing the environment variables that should be passed
115 to the executor, and thus subsequently task(s). By default the executor,
116 executor will inherit the agent's environment variables.
117
118 mesos_masters_ips:
119 type: string
120 description: IP addresses of the Mesos master servers.
121
122 fixed_network:
123 type: string
124 description: Network from which to allocate fixed addresses.
125
126 fixed_subnet:
127 type: string
128 description: Subnet from which to allocate fixed addresses.
129
130 secgroup_base_id:
131 type: string
132 description: ID of the security group for base.
133
134resources:
135
136 agent_wait_handle:
137 type: OS::Heat::WaitConditionHandle
138
139 agent_wait_condition:
140 type: OS::Heat::WaitCondition
141 depends_on: mesos_agent
142 properties:
143 handle: {get_resource: agent_wait_handle}
144 timeout: {get_param: wait_condition_timeout}
145
146 secgroup_all_open:
147 type: OS::Neutron::SecurityGroup
148 properties:
149 rules:
150 - protocol: icmp
151 - protocol: tcp
152 - protocol: udp
153
154 ######################################################################
155 #
156 # software configs. these are components that are combined into
157 # a multipart MIME user-data archive.
158 #
159
160 write_heat_params:
161 type: OS::Heat::SoftwareConfig
162 properties:
163 group: ungrouped
164 config:
165 str_replace:
166 template: {get_file: fragments/write-heat-params.yaml}
167 params:
168 "$MESOS_MASTERS_IPS": {get_param: mesos_masters_ips}
169 "$EXECUTOR_REGISTRATION_TIMEOUT": {get_param: executor_registration_timeout}
170 "$HTTP_PROXY": {get_param: http_proxy}
171 "$HTTPS_PROXY": {get_param: https_proxy}
172 "$NO_PROXY": {get_param: no_proxy}
173 "$AUTH_URL": {get_param: auth_url}
174 "$USERNAME": {get_param: username}
175 "$PASSWORD": {get_param: password}
176 "$TENANT_NAME": {get_param: tenant_name}
177 "$VOLUME_DRIVER": {get_param: volume_driver}
178 "$REGION_NAME": {get_param: region_name}
179 "$DOMAIN_NAME": {get_param: domain_name}
180 "$REXRAY_PREEMPT": {get_param: rexray_preempt}
181 "$ISOLATION": {get_param: mesos_agent_isolation}
182 "$WORK_DIR": {get_param: mesos_agent_work_dir}
183 "$IMAGE_PROVIDERS": {get_param: mesos_agent_image_providers}
184 "$EXECUTOR_ENVIRONMENT_VARIABLES": {get_param: mesos_agent_executor_env_variables}
185
186 configure_mesos_agent:
187 type: OS::Heat::SoftwareConfig
188 properties:
189 group: ungrouped
190 config: {get_file: fragments/configure-mesos-agent.sh}
191
192 start_services:
193 type: OS::Heat::SoftwareConfig
194 properties:
195 group: ungrouped
196 config: {get_file: fragments/start-services-agent.sh}
197
198 agent_wc_notify:
199 type: OS::Heat::SoftwareConfig
200 properties:
201 group: ungrouped
202 config:
203 str_replace:
204 template: |
205 #!/bin/bash -v
206 wc_notify --data-binary '{"status": "SUCCESS"}'
207 params:
208 wc_notify: {get_attr: [agent_wait_handle, curl_cli]}
209
210 add_proxy:
211 type: OS::Heat::SoftwareConfig
212 properties:
213 group: ungrouped
214 config: {get_file: fragments/add-proxy.sh}
215
216 volume_service:
217 type: OS::Heat::SoftwareConfig
218 properties:
219 group: ungrouped
220 config: {get_file: fragments/volume-service.sh}
221
222 mesos_agent_init:
223 type: OS::Heat::MultipartMime
224 properties:
225 parts:
226 - config: {get_resource: write_heat_params}
227 - config: {get_resource: configure_mesos_agent}
228 - config: {get_resource: add_proxy}
229 - config: {get_resource: volume_service}
230 - config: {get_resource: start_services}
231 - config: {get_resource: agent_wc_notify}
232
233 ######################################################################
234 #
235 # a single Mesos agent.
236 #
237
238 mesos_agent:
239 type: OS::Nova::Server
240 properties:
241 image: {get_param: server_image}
242 flavor: {get_param: agent_flavor}
243 key_name: {get_param: ssh_key_name}
244 user_data_format: RAW
245 user_data: {get_resource: mesos_agent_init}
246 networks:
247 - port: {get_resource: mesos_agent_eth0}
248
249 mesos_agent_eth0:
250 type: OS::Neutron::Port
251 properties:
252 network: {get_param: fixed_network}
253 security_groups:
254 - get_resource: secgroup_all_open
255 - get_param: secgroup_base_id
256 fixed_ips:
257 - subnet: {get_param: fixed_subnet}
258 replacement_policy: AUTO
259
260 mesos_agent_floating:
261 type: OS::Neutron::FloatingIP
262 properties:
263 floating_network: {get_param: external_network}
264 port_id: {get_resource: mesos_agent_eth0}
265
266outputs:
267
268 mesos_agent_ip:
269 value: {get_attr: [mesos_agent_eth0, fixed_ips, 0, ip_address]}
270 description: >
271 This is the "private" address of the Mesos agent node.
272 mesos_agent_external_ip:
273 value: {get_attr: [mesos_agent_floating, floating_ip_address]}
274 description: >
275 This is the "public" address of the Mesos agent node.
diff --git a/magnum/tests/functional/common/base.py b/magnum/tests/functional/common/base.py
index ed6e73e..3b250c1 100644
--- a/magnum/tests/functional/common/base.py
+++ b/magnum/tests/functional/common/base.py
@@ -176,7 +176,7 @@ class BaseMagnumTest(base.BaseTestCase):
176 176
177 :param get_nodes_fn: function that takes no parameters and returns 177 :param get_nodes_fn: function that takes no parameters and returns
178 a list of node IPs which are in such form: 178 a list of node IPs which are in such form:
179 [[master_nodes], [slave_nodes]]. 179 [[master_nodes], [agent_nodes]].
180 :param coe: the COE type of the nodes 180 :param coe: the COE type of the nodes
181 """ 181 """
182 182
@@ -192,7 +192,7 @@ class BaseMagnumTest(base.BaseTestCase):
192 nodes_addresses = get_nodes_fn() 192 nodes_addresses = get_nodes_fn()
193 193
194 master_nodes = nodes_addresses[0] 194 master_nodes = nodes_addresses[0]
195 slave_nodes = nodes_addresses[1] 195 agent_nodes = nodes_addresses[1]
196 196
197 base_path = os.path.split(os.path.dirname( 197 base_path = os.path.split(os.path.dirname(
198 os.path.abspath(magnum.__file__)))[0] 198 os.path.abspath(magnum.__file__)))[0]
@@ -221,7 +221,7 @@ class BaseMagnumTest(base.BaseTestCase):
221 log_name, node_address)) 221 log_name, node_address))
222 222
223 do_copy_logs('master', master_nodes) 223 do_copy_logs('master', master_nodes)
224 do_copy_logs('node', slave_nodes) 224 do_copy_logs('node', agent_nodes)
225 except Exception: 225 except Exception:
226 cls.LOG.exception(msg) 226 cls.LOG.exception(msg)
227 227
diff --git a/magnum/tests/functional/python_client_base.py b/magnum/tests/functional/python_client_base.py
index 101be0e..62e3dd5 100644
--- a/magnum/tests/functional/python_client_base.py
+++ b/magnum/tests/functional/python_client_base.py
@@ -294,7 +294,7 @@ extendedKeyUsage = clientAuth
294 elif self.baymodel.coe == "swarm": 294 elif self.baymodel.coe == "swarm":
295 output_keys = ["swarm_masters", "swarm_nodes"] 295 output_keys = ["swarm_masters", "swarm_nodes"]
296 elif self.baymodel.coe == "mesos": 296 elif self.baymodel.coe == "mesos":
297 output_keys = ["mesos_master", "mesos_slaves"] 297 output_keys = ["mesos_master", "mesos_agents"]
298 for output in stack_outputs: 298 for output in stack_outputs:
299 for key in output_keys: 299 for key in output_keys:
300 if output['output_key'] == key: 300 if output['output_key'] == key:
diff --git a/magnum/tests/unit/api/test_attr_validator.py b/magnum/tests/unit/api/test_attr_validator.py
index 0b286aa..3c2ad87 100644
--- a/magnum/tests/unit/api/test_attr_validator.py
+++ b/magnum/tests/unit/api/test_attr_validator.py
@@ -101,54 +101,54 @@ class TestAttrValidator(base.BaseTestCase):
101 mock_os_cli, 'test_keypair') 101 mock_os_cli, 'test_keypair')
102 102
103 def test_validate_labels_main_isolation_invalid(self): 103 def test_validate_labels_main_isolation_invalid(self):
104 fake_labels = {'mesos_slave_isolation': 'abc'} 104 fake_labels = {'mesos_agent_isolation': 'abc'}
105 self.assertRaises(exception.InvalidParameterValue, 105 self.assertRaises(exception.InvalidParameterValue,
106 attr_validator.validate_labels, 106 attr_validator.validate_labels,
107 fake_labels) 107 fake_labels)
108 108
109 def test_validate_labels_isolation_valid(self): 109 def test_validate_labels_isolation_valid(self):
110 fake_labels = {'mesos_slave_isolation': 110 fake_labels = {'mesos_agent_isolation':
111 'filesystem/posix,filesystem/linux'} 111 'filesystem/posix,filesystem/linux'}
112 attr_validator.validate_labels_isolation(fake_labels) 112 attr_validator.validate_labels_isolation(fake_labels)
113 113
114 def test_validate_labels_main_with_valid_providers_none_isolation(self): 114 def test_validate_labels_main_with_valid_providers_none_isolation(self):
115 fake_labels = {'mesos_slave_image_providers': 'docker'} 115 fake_labels = {'mesos_agent_image_providers': 'docker'}
116 self.assertRaises(exception.RequiredParameterNotProvided, 116 self.assertRaises(exception.RequiredParameterNotProvided,
117 attr_validator.validate_labels, 117 attr_validator.validate_labels,
118 fake_labels) 118 fake_labels)
119 119
120 def test_validate_labels_with_valid_providers_invalid_isolation(self): 120 def test_validate_labels_with_valid_providers_invalid_isolation(self):
121 fake_labels = {'mesos_slave_image_providers': 'docker', 121 fake_labels = {'mesos_agent_image_providers': 'docker',
122 'mesos_slave_isolation': 'abc'} 122 'mesos_agent_isolation': 'abc'}
123 self.assertRaises(exception.RequiredParameterNotProvided, 123 self.assertRaises(exception.RequiredParameterNotProvided,
124 attr_validator.validate_labels_image_providers, 124 attr_validator.validate_labels_image_providers,
125 fake_labels) 125 fake_labels)
126 126
127 def test_validate_labels_with_invalid_providers(self): 127 def test_validate_labels_with_invalid_providers(self):
128 fake_labels = {'mesos_slave_image_providers': 'abc'} 128 fake_labels = {'mesos_agent_image_providers': 'abc'}
129 self.assertRaises(exception.InvalidParameterValue, 129 self.assertRaises(exception.InvalidParameterValue,
130 attr_validator.validate_labels_image_providers, 130 attr_validator.validate_labels_image_providers,
131 fake_labels) 131 fake_labels)
132 132
133 def test_validate_labels_with_valid_providers_none_isolation(self): 133 def test_validate_labels_with_valid_providers_none_isolation(self):
134 fake_labels = {'mesos_slave_image_providers': 'docker'} 134 fake_labels = {'mesos_agent_image_providers': 'docker'}
135 self.assertRaises(exception.RequiredParameterNotProvided, 135 self.assertRaises(exception.RequiredParameterNotProvided,
136 attr_validator.validate_labels_image_providers, 136 attr_validator.validate_labels_image_providers,
137 fake_labels) 137 fake_labels)
138 138
139 def test_validate_labels_with_valid_providers_valid_isolation(self): 139 def test_validate_labels_with_valid_providers_valid_isolation(self):
140 fake_labels = {'mesos_slave_image_providers': 'docker', 140 fake_labels = {'mesos_agent_image_providers': 'docker',
141 'mesos_slave_isolation': 'docker/runtime'} 141 'mesos_agent_isolation': 'docker/runtime'}
142 attr_validator.validate_labels_image_providers(fake_labels) 142 attr_validator.validate_labels_image_providers(fake_labels)
143 143
144 def test_validate_labels_with_environment_variables_valid_json(self): 144 def test_validate_labels_with_environment_variables_valid_json(self):
145 contents = '{"step": "upgrade", "interface": "deploy"}' 145 contents = '{"step": "upgrade", "interface": "deploy"}'
146 fack_labels = {'mesos_slave_executor_env_variables': contents} 146 fack_labels = {'mesos_agent_executor_env_variables': contents}
147 attr_validator.validate_labels_executor_env_variables( 147 attr_validator.validate_labels_executor_env_variables(
148 fack_labels) 148 fack_labels)
149 149
150 def test_validate_labels_with_environment_variables_bad_json(self): 150 def test_validate_labels_with_environment_variables_bad_json(self):
151 fack_labels = {'mesos_slave_executor_env_variables': 'step'} 151 fack_labels = {'mesos_agent_executor_env_variables': 'step'}
152 self.assertRaisesRegex( 152 self.assertRaisesRegex(
153 exception.InvalidParameterValue, 153 exception.InvalidParameterValue,
154 "Json format error", 154 "Json format error",
@@ -156,12 +156,12 @@ class TestAttrValidator(base.BaseTestCase):
156 fack_labels) 156 fack_labels)
157 157
158 def test_validate_labels_with_valid_isolation(self): 158 def test_validate_labels_with_valid_isolation(self):
159 fake_labels = {'mesos_slave_isolation': 159 fake_labels = {'mesos_agent_isolation':
160 'filesystem/posix,filesystem/linux'} 160 'filesystem/posix,filesystem/linux'}
161 attr_validator.validate_labels_isolation(fake_labels) 161 attr_validator.validate_labels_isolation(fake_labels)
162 162
163 def test_validate_labels_isolation_invalid(self): 163 def test_validate_labels_isolation_invalid(self):
164 fake_labels = {'mesos_slave_isolation': 'filesystem'} 164 fake_labels = {'mesos_agent_isolation': 'filesystem'}
165 self.assertRaises(exception.InvalidParameterValue, 165 self.assertRaises(exception.InvalidParameterValue,
166 attr_validator.validate_labels_isolation, 166 attr_validator.validate_labels_isolation,
167 fake_labels) 167 fake_labels)
diff --git a/magnum/tests/unit/conductor/handlers/test_mesos_bay_conductor.py b/magnum/tests/unit/conductor/handlers/test_mesos_bay_conductor.py
index 2473499..e6c7295 100644
--- a/magnum/tests/unit/conductor/handlers/test_mesos_bay_conductor.py
+++ b/magnum/tests/unit/conductor/handlers/test_mesos_bay_conductor.py
@@ -40,11 +40,11 @@ class TestBayConductorWithMesos(base.TestCase):
40 'server_type': 'vm', 40 'server_type': 'vm',
41 'volume_driver': 'volume_driver', 41 'volume_driver': 'volume_driver',
42 'labels': {'rexray_preempt': 'False', 42 'labels': {'rexray_preempt': 'False',
43 'mesos_slave_isolation': 43 'mesos_agent_isolation':
44 'docker/runtime,filesystem/linux', 44 'docker/runtime,filesystem/linux',
45 'mesos_slave_image_providers': 'docker', 45 'mesos_agent_image_providers': 'docker',
46 'mesos_slave_executor_env_variables': '{}', 46 'mesos_agent_executor_env_variables': '{}',
47 'mesos_slave_work_dir': '/tmp/mesos/slave' 47 'mesos_agent_work_dir': '/tmp/mesos/agent'
48 }, 48 },
49 'master_lb_enabled': False, 49 'master_lb_enabled': False,
50 } 50 }
@@ -96,8 +96,8 @@ class TestBayConductorWithMesos(base.TestCase):
96 'dns_nameserver': 'dns_nameserver', 96 'dns_nameserver': 'dns_nameserver',
97 'server_image': 'image_id', 97 'server_image': 'image_id',
98 'master_flavor': 'master_flavor_id', 98 'master_flavor': 'master_flavor_id',
99 'slave_flavor': 'flavor_id', 99 'agent_flavor': 'flavor_id',
100 'number_of_slaves': 1, 100 'number_of_agents': 1,
101 'number_of_masters': 1, 101 'number_of_masters': 1,
102 'http_proxy': 'http_proxy', 102 'http_proxy': 'http_proxy',
103 'https_proxy': 'https_proxy', 103 'https_proxy': 'https_proxy',
@@ -115,10 +115,10 @@ class TestBayConductorWithMesos(base.TestCase):
115 'tenant_name': 'admin', 115 'tenant_name': 'admin',
116 'domain_name': 'domainname', 116 'domain_name': 'domainname',
117 'rexray_preempt': 'False', 117 'rexray_preempt': 'False',
118 'mesos_slave_executor_env_variables': '{}', 118 'mesos_agent_executor_env_variables': '{}',
119 'mesos_slave_isolation': 'docker/runtime,filesystem/linux', 119 'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
120 'mesos_slave_work_dir': '/tmp/mesos/slave', 120 'mesos_agent_work_dir': '/tmp/mesos/agent',
121 'mesos_slave_image_providers': 'docker' 121 'mesos_agent_image_providers': 'docker'
122 } 122 }
123 self.assertEqual(expected, definition) 123 self.assertEqual(expected, definition)
124 self.assertEqual(['environments/no_master_lb.yaml'], env_files) 124 self.assertEqual(['environments/no_master_lb.yaml'], env_files)
@@ -145,7 +145,7 @@ class TestBayConductorWithMesos(base.TestCase):
145 expected = { 145 expected = {
146 'ssh_key_name': 'keypair_id', 146 'ssh_key_name': 'keypair_id',
147 'external_network': 'external_network_id', 147 'external_network': 'external_network_id',
148 'number_of_slaves': 1, 148 'number_of_agents': 1,
149 'number_of_masters': 1, 149 'number_of_masters': 1,
150 'cluster_name': 'bay1', 150 'cluster_name': 'bay1',
151 'trustee_domain_id': self.mock_keystone.trustee_domain_id, 151 'trustee_domain_id': self.mock_keystone.trustee_domain_id,
@@ -159,10 +159,10 @@ class TestBayConductorWithMesos(base.TestCase):
159 'tenant_name': 'admin', 159 'tenant_name': 'admin',
160 'domain_name': 'domainname', 160 'domain_name': 'domainname',
161 'rexray_preempt': 'False', 161 'rexray_preempt': 'False',
162 'mesos_slave_isolation': 'docker/runtime,filesystem/linux', 162 'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
163 'mesos_slave_executor_env_variables': '{}', 163 'mesos_agent_executor_env_variables': '{}',
164 'mesos_slave_work_dir': '/tmp/mesos/slave', 164 'mesos_agent_work_dir': '/tmp/mesos/agent',
165 'mesos_slave_image_providers': 'docker' 165 'mesos_agent_image_providers': 'docker'
166 } 166 }
167 self.assertEqual(expected, definition) 167 self.assertEqual(expected, definition)
168 self.assertEqual(['environments/no_master_lb.yaml'], env_files) 168 self.assertEqual(['environments/no_master_lb.yaml'], env_files)
@@ -187,8 +187,8 @@ class TestBayConductorWithMesos(base.TestCase):
187 'dns_nameserver': 'dns_nameserver', 187 'dns_nameserver': 'dns_nameserver',
188 'server_image': 'image_id', 188 'server_image': 'image_id',
189 'master_flavor': 'master_flavor_id', 189 'master_flavor': 'master_flavor_id',
190 'slave_flavor': 'flavor_id', 190 'agent_flavor': 'flavor_id',
191 'number_of_slaves': 1, 191 'number_of_agents': 1,
192 'number_of_masters': 1, 192 'number_of_masters': 1,
193 'http_proxy': 'http_proxy', 193 'http_proxy': 'http_proxy',
194 'https_proxy': 'https_proxy', 194 'https_proxy': 'https_proxy',
@@ -206,10 +206,10 @@ class TestBayConductorWithMesos(base.TestCase):
206 'tenant_name': 'admin', 206 'tenant_name': 'admin',
207 'domain_name': 'domainname', 207 'domain_name': 'domainname',
208 'rexray_preempt': 'False', 208 'rexray_preempt': 'False',
209 'mesos_slave_executor_env_variables': '{}', 209 'mesos_agent_executor_env_variables': '{}',
210 'mesos_slave_isolation': 'docker/runtime,filesystem/linux', 210 'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
211 'mesos_slave_work_dir': '/tmp/mesos/slave', 211 'mesos_agent_work_dir': '/tmp/mesos/agent',
212 'mesos_slave_image_providers': 'docker' 212 'mesos_agent_image_providers': 'docker'
213 } 213 }
214 self.assertEqual(expected, definition) 214 self.assertEqual(expected, definition)
215 self.assertEqual(['environments/with_master_lb.yaml'], env_files) 215 self.assertEqual(['environments/with_master_lb.yaml'], env_files)
@@ -235,8 +235,8 @@ class TestBayConductorWithMesos(base.TestCase):
235 'dns_nameserver': 'dns_nameserver', 235 'dns_nameserver': 'dns_nameserver',
236 'server_image': 'image_id', 236 'server_image': 'image_id',
237 'master_flavor': 'master_flavor_id', 237 'master_flavor': 'master_flavor_id',
238 'slave_flavor': 'flavor_id', 238 'agent_flavor': 'flavor_id',
239 'number_of_slaves': 1, 239 'number_of_agents': 1,
240 'number_of_masters': 2, 240 'number_of_masters': 2,
241 'http_proxy': 'http_proxy', 241 'http_proxy': 'http_proxy',
242 'https_proxy': 'https_proxy', 242 'https_proxy': 'https_proxy',
@@ -254,10 +254,10 @@ class TestBayConductorWithMesos(base.TestCase):
254 'tenant_name': 'admin', 254 'tenant_name': 'admin',
255 'domain_name': 'domainname', 255 'domain_name': 'domainname',
256 'rexray_preempt': 'False', 256 'rexray_preempt': 'False',
257 'mesos_slave_executor_env_variables': '{}', 257 'mesos_agent_executor_env_variables': '{}',
258 'mesos_slave_isolation': 'docker/runtime,filesystem/linux', 258 'mesos_agent_isolation': 'docker/runtime,filesystem/linux',
259 'mesos_slave_work_dir': '/tmp/mesos/slave', 259 'mesos_agent_work_dir': '/tmp/mesos/agent',
260 'mesos_slave_image_providers': 'docker' 260 'mesos_agent_image_providers': 'docker'
261 } 261 }
262 self.assertEqual(expected, definition) 262 self.assertEqual(expected, definition)
263 self.assertEqual(['environments/with_master_lb.yaml'], env_files) 263 self.assertEqual(['environments/with_master_lb.yaml'], env_files)
@@ -281,7 +281,7 @@ class TestBayConductorWithMesos(base.TestCase):
281 def test_poll_node_count(self): 281 def test_poll_node_count(self):
282 mock_heat_stack, bay, poller = self.setup_poll_test() 282 mock_heat_stack, bay, poller = self.setup_poll_test()
283 283
284 mock_heat_stack.parameters = {'number_of_slaves': 1} 284 mock_heat_stack.parameters = {'number_of_agents': 1}
285 mock_heat_stack.stack_status = bay_status.CREATE_IN_PROGRESS 285 mock_heat_stack.stack_status = bay_status.CREATE_IN_PROGRESS
286 poller.poll_and_check() 286 poller.poll_and_check()
287 287
@@ -290,7 +290,7 @@ class TestBayConductorWithMesos(base.TestCase):
290 def test_poll_node_count_by_update(self): 290 def test_poll_node_count_by_update(self):
291 mock_heat_stack, bay, poller = self.setup_poll_test() 291 mock_heat_stack, bay, poller = self.setup_poll_test()
292 292
293 mock_heat_stack.parameters = {'number_of_slaves': 2} 293 mock_heat_stack.parameters = {'number_of_agents': 2}
294 mock_heat_stack.stack_status = bay_status.UPDATE_COMPLETE 294 mock_heat_stack.stack_status = bay_status.UPDATE_COMPLETE
295 self.assertRaises(loopingcall.LoopingCallDone, poller.poll_and_check) 295 self.assertRaises(loopingcall.LoopingCallDone, poller.poll_and_check)
296 296
diff --git a/magnum/tests/unit/conductor/test_monitors.py b/magnum/tests/unit/conductor/test_monitors.py
index 78f51b6..f938da9 100644
--- a/magnum/tests/unit/conductor/test_monitors.py
+++ b/magnum/tests/unit/conductor/test_monitors.py
@@ -262,7 +262,7 @@ class MonitorsTestCase(base.TestCase):
262 state_json = { 262 state_json = {
263 'leader': 'master@10.0.0.6:5050', 263 'leader': 'master@10.0.0.6:5050',
264 'pid': 'master@10.0.0.6:5050', 264 'pid': 'master@10.0.0.6:5050',
265 'slaves': [{ 265 'agents': [{
266 'resources': { 266 'resources': {
267 'mem': 100, 267 'mem': 100,
268 'cpus': 1, 268 'cpus': 1,
@@ -281,7 +281,7 @@ class MonitorsTestCase(base.TestCase):
281 state_json = { 281 state_json = {
282 'leader': 'master@10.0.0.6:5050', 282 'leader': 'master@10.0.0.6:5050',
283 'pid': 'master@1.1.1.1:5050', 283 'pid': 'master@1.1.1.1:5050',
284 'slaves': [] 284 'agents': []
285 } 285 }
286 self._test_mesos_monitor_pull_data(mock_url_get, state_json, 286 self._test_mesos_monitor_pull_data(mock_url_get, state_json,
287 0, 0, 0, 0) 287 0, 0, 0, 0)
diff --git a/magnum/tests/unit/drivers/test_template_definition.py b/magnum/tests/unit/drivers/test_template_definition.py
index 3ef4269..b2471a7 100644
--- a/magnum/tests/unit/drivers/test_template_definition.py
+++ b/magnum/tests/unit/drivers/test_template_definition.py
@@ -666,13 +666,13 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
666 mock_baymodel = mock.MagicMock() 666 mock_baymodel = mock.MagicMock()
667 mock_baymodel.tls_disabled = False 667 mock_baymodel.tls_disabled = False
668 rexray_preempt = mock_baymodel.labels.get('rexray_preempt') 668 rexray_preempt = mock_baymodel.labels.get('rexray_preempt')
669 mesos_slave_isolation = mock_baymodel.labels.get( 669 mesos_agent_isolation = mock_baymodel.labels.get(
670 'mesos_slave_isolation') 670 'mesos_agent_isolation')
671 mesos_slave_work_dir = mock_baymodel.labels.get('mesos_slave_work_dir') 671 mesos_agent_work_dir = mock_baymodel.labels.get('mesos_agent_work_dir')
672 mesos_slave_image_providers = mock_baymodel.labels.get( 672 mesos_agent_image_providers = mock_baymodel.labels.get(
673 'image_providers') 673 'image_providers')
674 mesos_slave_executor_env_variables = mock_baymodel.labels.get( 674 mesos_agent_executor_env_variables = mock_baymodel.labels.get(
675 'mesos_slave_executor_env_variables') 675 'mesos_agent_executor_env_variables')
676 mock_bay = mock.MagicMock() 676 mock_bay = mock.MagicMock()
677 mock_bay.uuid = '5d12f6fd-a196-4bf0-ae4c-1f639a523a52' 677 mock_bay.uuid = '5d12f6fd-a196-4bf0-ae4c-1f639a523a52'
678 del mock_bay.stack_id 678 del mock_bay.stack_id
@@ -696,12 +696,12 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
696 'tenant_name': 'admin', 696 'tenant_name': 'admin',
697 'domain_name': 'domainname', 697 'domain_name': 'domainname',
698 'rexray_preempt': rexray_preempt, 698 'rexray_preempt': rexray_preempt,
699 'mesos_slave_isolation': mesos_slave_isolation, 699 'mesos_agent_isolation': mesos_agent_isolation,
700 'mesos_slave_work_dir': mesos_slave_work_dir, 700 'mesos_agent_work_dir': mesos_agent_work_dir,
701 'mesos_slave_executor_env_variables': 701 'mesos_agent_executor_env_variables':
702 mesos_slave_executor_env_variables, 702 mesos_agent_executor_env_variables,
703 'mesos_slave_image_providers': mesos_slave_image_providers, 703 'mesos_agent_image_providers': mesos_agent_image_providers,
704 'slaves_to_remove': removal_nodes}} 704 'agents_to_remove': removal_nodes}}
705 mock_get_params.assert_called_once_with(mock_context, mock_baymodel, 705 mock_get_params.assert_called_once_with(mock_context, mock_baymodel,
706 mock_bay, **expected_kwargs) 706 mock_bay, **expected_kwargs)
707 707
@@ -709,7 +709,7 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
709 mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition() 709 mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition()
710 710
711 heat_param = mesos_def.get_heat_param(bay_attr='node_count') 711 heat_param = mesos_def.get_heat_param(bay_attr='node_count')
712 self.assertEqual('number_of_slaves', heat_param) 712 self.assertEqual('number_of_agents', heat_param)
713 713
714 heat_param = mesos_def.get_heat_param(bay_attr='master_count') 714 heat_param = mesos_def.get_heat_param(bay_attr='master_count')
715 self.assertEqual('number_of_masters', heat_param) 715 self.assertEqual('number_of_masters', heat_param)
@@ -718,7 +718,7 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
718 mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition() 718 mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition()
719 719
720 expected_api_address = 'updated_address' 720 expected_api_address = 'updated_address'
721 expected_node_addresses = ['ex_slave', 'address'] 721 expected_node_addresses = ['ex_agent', 'address']
722 expected_master_addresses = ['ex_master', 'address'] 722 expected_master_addresses = ['ex_master', 'address']
723 723
724 outputs = [ 724 outputs = [
@@ -733,10 +733,10 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
733 "output_key": "mesos_master"}, 733 "output_key": "mesos_master"},
734 {"output_value": ['any', 'output'], 734 {"output_value": ['any', 'output'],
735 "description": "No description given", 735 "description": "No description given",
736 "output_key": "mesos_slaves_private"}, 736 "output_key": "mesos_agents_private"},
737 {"output_value": expected_node_addresses, 737 {"output_value": expected_node_addresses,
738 "description": "No description given", 738 "description": "No description given",
739 "output_key": "mesos_slaves"}, 739 "output_key": "mesos_agents"},
740 ] 740 ]
741 mock_stack = mock.MagicMock() 741 mock_stack = mock.MagicMock()
742 mock_stack.to_dict.return_value = {'outputs': outputs} 742 mock_stack.to_dict.return_value = {'outputs': outputs}