Merge "Sahara auto_security_group parameter added"
This commit is contained in:
commit
045603928c
doc/samples/tasks/scenarios/sahara
create_and_delete_cluster.jsoncreate_and_delete_cluster.yamlcreate_scale_delete_cluster.jsoncreate_scale_delete_cluster.yaml
jobs
rally/benchmark
tests/unit/benchmark
@ -7,7 +7,8 @@
|
||||
},
|
||||
"node_count": 2,
|
||||
"plugin_name": "vanilla",
|
||||
"hadoop_version": "2.3.0"
|
||||
"hadoop_version": "2.3.0",
|
||||
"auto_security_group": true
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
|
@ -7,6 +7,7 @@
|
||||
node_count: 2
|
||||
plugin_name: "vanilla"
|
||||
hadoop_version: "2.3.0"
|
||||
auto_security_group: True
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 4
|
||||
|
@ -8,7 +8,8 @@
|
||||
"node_count": 2,
|
||||
"deltas": [1, -1, 1, -1],
|
||||
"plugin_name": "vanilla",
|
||||
"hadoop_version": "2.3.0"
|
||||
"hadoop_version": "2.3.0",
|
||||
"auto_security_group": true
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
|
@ -12,6 +12,7 @@
|
||||
- -1
|
||||
plugin_name: "vanilla"
|
||||
hadoop_version: "2.3.0"
|
||||
auto_security_group: True
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 4
|
||||
|
@ -54,7 +54,8 @@
|
||||
"flavor_id": "2",
|
||||
"node_count": 2,
|
||||
"plugin_name": "vanilla",
|
||||
"hadoop_version": "1.2.1"
|
||||
"hadoop_version": "1.2.1",
|
||||
"auto_security_group": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,3 +52,4 @@
|
||||
node_count: 2
|
||||
plugin_name: "vanilla"
|
||||
hadoop_version: "1.2.1"
|
||||
auto_security_group: True
|
||||
|
@ -54,7 +54,8 @@
|
||||
"flavor_id": "2",
|
||||
"node_count": 2,
|
||||
"plugin_name": "vanilla",
|
||||
"hadoop_version": "1.2.1"
|
||||
"hadoop_version": "1.2.1",
|
||||
"auto_security_group": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,3 +55,4 @@
|
||||
node_count: 2
|
||||
plugin_name: "vanilla"
|
||||
hadoop_version: "1.2.1"
|
||||
auto_security_group: True
|
||||
|
@ -42,7 +42,8 @@
|
||||
"flavor_id": "2",
|
||||
"node_count": 2,
|
||||
"plugin_name": "vanilla",
|
||||
"hadoop_version": "1.2.1"
|
||||
"hadoop_version": "1.2.1",
|
||||
"auto_security_group": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,3 +36,4 @@
|
||||
node_count: 2
|
||||
plugin_name: "vanilla"
|
||||
hadoop_version: "1.2.1"
|
||||
auto_security_group: True
|
||||
|
@ -43,7 +43,8 @@
|
||||
"flavor_id": "2",
|
||||
"node_count": 2,
|
||||
"plugin_name": "vanilla",
|
||||
"hadoop_version": "1.2.1"
|
||||
"hadoop_version": "1.2.1",
|
||||
"auto_security_group": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,3 +35,4 @@
|
||||
node_count: 2
|
||||
plugin_name: "vanilla"
|
||||
hadoop_version: "1.2.1"
|
||||
auto_security_group: True
|
||||
|
@ -66,6 +66,15 @@ class SaharaCluster(base.Context):
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"auto_security_group": {
|
||||
"type": "boolean",
|
||||
},
|
||||
"security_groups": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"node_configs": {
|
||||
"type": "object"
|
||||
},
|
||||
@ -121,6 +130,9 @@ class SaharaCluster(base.Context):
|
||||
neutron_net_id=neutron_net_id,
|
||||
volumes_per_node=self.config.get("volumes_per_node"),
|
||||
volumes_size=self.config.get("volumes_size", 1),
|
||||
auto_security_group=self.config.get("auto_security_group",
|
||||
True),
|
||||
security_groups=self.config.get("security_groups"),
|
||||
node_configs=self.config.get("node_configs"),
|
||||
cluster_configs=self.config.get("cluster_configs"),
|
||||
wait_active=False)
|
||||
|
@ -37,7 +37,8 @@ class SaharaClusters(utils.SaharaScenario):
|
||||
def create_and_delete_cluster(self, flavor, node_count, plugin_name,
|
||||
hadoop_version, floating_ip_pool=None,
|
||||
neutron_net=None, volumes_per_node=None,
|
||||
volumes_size=None, node_configs=None,
|
||||
volumes_size=None, auto_security_group=None,
|
||||
security_groups=None, node_configs=None,
|
||||
cluster_configs=None):
|
||||
"""Test the Sahara Cluster launch and delete commands.
|
||||
|
||||
@ -60,6 +61,12 @@ class SaharaClusters(utils.SaharaScenario):
|
||||
:param volumes_per_node: The number of Cinder volumes that will be
|
||||
attached to every cluster node
|
||||
:param volumes_size: The size of each Cinder volume in GB
|
||||
:param auto_security_group: Boolean value. If set to True Sahara will
|
||||
create a Security Group for each Node Group in the Cluster
|
||||
automatically.
|
||||
:param security_groups: The list of security groups that will be used
|
||||
while creating VMs. If auto_security_group is set to True this list
|
||||
can be left empty.
|
||||
:param node_configs: The configs dict that will be passed to each Node
|
||||
Group
|
||||
:param cluster_configs: The configs dict that will be passed to the
|
||||
@ -80,6 +87,8 @@ class SaharaClusters(utils.SaharaScenario):
|
||||
neutron_net_id=neutron_net,
|
||||
volumes_per_node=volumes_per_node,
|
||||
volumes_size=volumes_size,
|
||||
auto_security_group=auto_security_group,
|
||||
security_groups=security_groups,
|
||||
node_configs=node_configs,
|
||||
cluster_configs=cluster_configs)
|
||||
|
||||
@ -95,7 +104,9 @@ class SaharaClusters(utils.SaharaScenario):
|
||||
hadoop_version, deltas,
|
||||
floating_ip_pool=None, neutron_net_id=None,
|
||||
volumes_per_node=None, volumes_size=None,
|
||||
node_configs=None, cluster_configs=None):
|
||||
auto_security_group=None,
|
||||
security_groups=None, node_configs=None,
|
||||
cluster_configs=None):
|
||||
"""Test the Sahara Cluster launch, scale and delete commands.
|
||||
|
||||
This scenario launches a Hadoop cluster, waits until it becomes
|
||||
@ -122,6 +133,12 @@ class SaharaClusters(utils.SaharaScenario):
|
||||
:param volumes_per_node: The number of Cinder volumes that will be
|
||||
attached to every cluster node
|
||||
:param volumes_size: The size of each Cinder volume in GB
|
||||
:param auto_security_group: Boolean value. If set to True Sahara will
|
||||
create a Security Group for each Node Group in the Cluster
|
||||
automatically.
|
||||
:param security_groups: The list of security groups that will be used
|
||||
while creating VMs. If auto_security_group is set to True this list
|
||||
can be left empty.
|
||||
:param node_configs: The configs dict that will be passed to each Node
|
||||
Group
|
||||
:param cluster_configs: The configs dict that will be passed to the
|
||||
@ -142,6 +159,8 @@ class SaharaClusters(utils.SaharaScenario):
|
||||
neutron_net_id=neutron_net_id,
|
||||
volumes_per_node=volumes_per_node,
|
||||
volumes_size=volumes_size,
|
||||
auto_security_group=auto_security_group,
|
||||
security_groups=security_groups,
|
||||
node_configs=node_configs,
|
||||
cluster_configs=cluster_configs)
|
||||
|
||||
|
@ -179,7 +179,8 @@ class SaharaScenario(base.Scenario):
|
||||
def _launch_cluster(self, plugin_name, hadoop_version, flavor_id,
|
||||
image_id, node_count, floating_ip_pool=None,
|
||||
neutron_net_id=None, volumes_per_node=None,
|
||||
volumes_size=None, node_configs=None,
|
||||
volumes_size=None, auto_security_group=None,
|
||||
security_groups=None, node_configs=None,
|
||||
cluster_configs=None, wait_active=True):
|
||||
"""Creates a cluster and wait until it becomes Active.
|
||||
|
||||
@ -200,6 +201,12 @@ class SaharaScenario(base.Scenario):
|
||||
:param volumes_per_node: The number of Cinder volumes that will be
|
||||
attached to every cluster node
|
||||
:param volumes_size: The size of each Cinder volume in GB
|
||||
:param auto_security_group: Boolean value. If set to True Sahara will
|
||||
create a Security Group for each Node Group in the Cluster
|
||||
automatically.
|
||||
:param security_groups: The list of security groups that will be used
|
||||
while creating VMs. If auto_security_group is set to True this list
|
||||
can be left empty.
|
||||
:param node_configs: The configs dict that will be passed to each Node
|
||||
Group
|
||||
:param cluster_configs: The configs dict that will be passed to the
|
||||
@ -235,6 +242,14 @@ class SaharaScenario(base.Scenario):
|
||||
ng["volumes_per_node"] = volumes_per_node
|
||||
ng["volumes_size"] = volumes_size
|
||||
|
||||
if auto_security_group:
|
||||
for ng in node_groups:
|
||||
ng["auto_security_group"] = auto_security_group
|
||||
|
||||
if security_groups:
|
||||
for ng in node_groups:
|
||||
ng["security_groups"] = security_groups
|
||||
|
||||
if node_configs:
|
||||
LOG.debug("Adding Hadoop configs to Node Groups")
|
||||
for ng in node_groups:
|
||||
|
@ -94,6 +94,8 @@ class SaharaClusterTestCase(test.TestCase):
|
||||
neutron_net_id=None,
|
||||
volumes_per_node=None,
|
||||
volumes_size=1,
|
||||
auto_security_group=True,
|
||||
security_groups=None,
|
||||
node_configs=None,
|
||||
cluster_configs=None,
|
||||
wait_active=False
|
||||
@ -132,6 +134,8 @@ class SaharaClusterTestCase(test.TestCase):
|
||||
neutron_net_id=None,
|
||||
volumes_per_node=None,
|
||||
volumes_size=1,
|
||||
auto_security_groups=True,
|
||||
security_groups=None,
|
||||
node_configs=None,
|
||||
cluster_configs=None,
|
||||
wait_active=False
|
||||
|
@ -54,6 +54,8 @@ class SaharaClustersTestCase(test.TestCase):
|
||||
neutron_net_id=None,
|
||||
volumes_per_node=None,
|
||||
volumes_size=None,
|
||||
auto_security_group=None,
|
||||
security_groups=None,
|
||||
node_configs=None,
|
||||
cluster_configs=None)
|
||||
|
||||
@ -99,6 +101,8 @@ class SaharaClustersTestCase(test.TestCase):
|
||||
neutron_net_id=None,
|
||||
volumes_per_node=None,
|
||||
volumes_size=None,
|
||||
auto_security_group=None,
|
||||
security_groups=None,
|
||||
node_configs=None,
|
||||
cluster_configs=None)
|
||||
|
||||
|
@ -150,7 +150,9 @@ class SaharaUtilsTestCase(test.TestCase):
|
||||
"volumes_per_node": 5,
|
||||
"volumes_size": 10,
|
||||
"count": 1,
|
||||
"node_configs": {"HDFS": {"local_config": "local_value"}}
|
||||
"auto_security_group": True,
|
||||
"security_groups": ["g1", "g2"],
|
||||
"node_configs": {"HDFS": {"local_config": "local_value"}},
|
||||
}, {
|
||||
"name": "worker-ng",
|
||||
"flavor_id": "test_flavor",
|
||||
@ -159,7 +161,9 @@ class SaharaUtilsTestCase(test.TestCase):
|
||||
"volumes_per_node": 5,
|
||||
"volumes_size": 10,
|
||||
"count": 41,
|
||||
"node_configs": {"HDFS": {"local_config": "local_value"}}
|
||||
"auto_security_group": True,
|
||||
"security_groups": ["g1", "g2"],
|
||||
"node_configs": {"HDFS": {"local_config": "local_value"}},
|
||||
}
|
||||
]
|
||||
|
||||
@ -180,6 +184,8 @@ class SaharaUtilsTestCase(test.TestCase):
|
||||
floating_ip_pool="test_pool",
|
||||
volumes_per_node=5,
|
||||
volumes_size=10,
|
||||
auto_security_group=True,
|
||||
security_groups=["g1", "g2"],
|
||||
node_count=42,
|
||||
node_configs={"HDFS": {"local_config": "local_value"}}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user