aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/orchestrator
AgeCommit message (Collapse)AuthorFilesLines
2018-08-20Make security group configurable - dovetailrexlee87761-56/+65
Make sercurity group can be configured via the context. The format would be: context: name: demo image: yardstick-image flavor: yardstick-flavor user: ubuntu security_group: rules: - remote_ip_prefix: "0.0.0.0/0" protocol: "tcp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "udp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "icmp" JIRA: YARDSTICK-1360 Change-Id: I00c45767ee2d70b790590e824599d5a4c274bced Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-08-09Bugfix: pylint fix for yardstick/orchestrator/heat.py (no-value-for-parameter)rexlee87761-7/+3
Problem op_utils.get_volume_id takes 2 arguments and only pass 1. This would cause tc006 fail! volume_id = op_utils.get_volume_id(volume_name) it will cause: Running pylint... You can speed this up by running it on 'HEAD~[0-9]' (e.g. HEAD~0, this change only)... Using config file /home/opnfv/repos/yardstick/.pylintrc ************* Module yardstick.orchestrator.heat E:235,20: No value for argument 'volume_name' in function call (no-value-for-parameter) To Do It doesn't need to call get_volume_id here, just use heat get_resource would be enough. This fix should work with tc006 test case. JIRA: YARDSTICK-1371 Change-Id: I913ffd085f742ae4464dbcc4269719e2c50e37b5 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-07-31Merge "Check for network already created k8"Emma Foley1-1/+1
2018-07-24kubernetes_utils: avoid 404 error code in delete_network()Mytnyk, Volodymyr1-1/+1
JIRA: YARDSTICK-1316 Change-Id: I792c873b42aba80be62ff7a93f6d02ea89e42356 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-23Merge "kubernetes_utils: avoid 404 error code in ↵Rodolfo Alonso Hernandez1-1/+1
delete_custom_resource_definition()"
2018-07-23Merge "kubernetes_utils: avoid 404 error code in delete_service()"Rodolfo Alonso Hernandez1-1/+1
2018-07-20kubernetes_utils: avoid 404 error code in delete_custom_resource_definition()Mytnyk, Volodymyr1-1/+1
JIRA: YARDSTICK-1317 Change-Id: I2dc924334199761d63dce9aebe9ce200ca0fddf8 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-20Check for network already created k8John O Loughlin1-1/+1
When creating a network the host should be checked to see if the network is already created. If the required network is already there it should be used. JIRA: YARDSTICK-1315 Change-Id: I09b114a728364ee56397af70cc48f1b7904f06cc Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-19Add "stdin" and "tty" parameters to Kubernetes containerRodolfo Alonso Hernandez1-0/+6
JIRA: YARDSTICK-1330 Change-Id: I05303a1d0783421472883806f97441dd63f7f740 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-19kubernetes_utils: avoid 404 error code in delete_service()Mytnyk, Volodymyr1-1/+1
JIRA: YARDSTICK-1321 Change-Id: Id0f3a5d93f11674fd3908a7f5cf7214afcfa3600 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-19Accept strings and lists as container "args" and "commands"Rodolfo Alonso Hernandez1-3/+13
Accept strings and list of strings as "args" and "commands" in a Kubernetes container. JIRA: YARDSTICK-1329 Change-Id: I56470741072fb7f9a62d695c51fcb0cc3f3ff1b9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-19Merge "Add "imagePullPolicy" parameter in Kubernetes container"Rodolfo Alonso Hernandez1-0/+6
2018-07-19Add "imagePullPolicy" parameter in Kubernetes containerRodolfo Alonso Hernandez1-0/+6
The configuration parameter "imagePullPolicy" defines how Kubernetes retrieves de image. By default, Kubernetes will always try to pull the latest image from the repository [1]. Three possible arguments are accepted: - Always - IfNotPresent - Never Example of Kubernetes pod definition: containers: - name: vcmts-pktgen-pod-0 image: openretriever/yardstick imagePullPolicy: IfNotPresent Example of Yardstick definition: context: name: k8syardstick type: Kubernetesservers: vnf: image: openretriever/yardstick imagePullPolicy: IfNotPresent [1] https://kubernetes.io/docs/concepts/containers/images/ JIRA: YARDSTICK-1328 Change-Id: I83bfb01670eef22218b1affd7d37af14e32a622e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-19Kubernetes NodePort must have 'name' if multiple createdRodolfo Alonso Hernandez1-6/+18
In Kubernetes context, service NodePort can contain more than one port defined. Actually, by default port SSH (22) is always created. If more than one port is defined in the service template, 'name' parameter is mandatory. Names must be lowercase, containing alphanumeric characters or '-'. Verification regex used by Kubernetes: [a-z0-9]([-a-z0-9]*[a-z0-9])? JIRA: YARDSTICK-1324 Change-Id: I82791761d8eae24196c2f16aee9900af28d44c57 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-13Add interface and network information to Kubernetes contextRodolfo Alonso Hernandez1-1/+10
Add to "Kubernetes" context the "interfaces" information when retrieving a server. This information is needed for NSPerf test cases. The interface information comes from the resource controller network list. Each replication controller will have one port per network defined. JIRA: YARDSTICK-1303 Change-Id: Ifb0e17df295c042a643128c705a93876af999bad Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-10Merge "Add network elements as a dict in Kubernetes context"Rodolfo Alonso Hernandez1-5/+6
2018-07-10Add "tolerations" parameter in Kubernetes contextRodolfo Alonso Hernandez1-1/+17
This new parameter, "torelations", is applied to pods and allow (but not require) the pods to schedule onto node with matching tains [1]. Example of "tolerations" definition in a Kubernetes pod: spec: containers: [...] tolerations: - key: <key defined in the taint> value: <key value to match with the taint> effect: <effect in case of match> operator: <matching operator> - key: ... Example of "tolerations" definition in a Yardstick test case: context: type: Kubernetes servers: host: containers: [...] tolerations: - key: ... value: ... effect: ... operator: ... NOTE: if any toleration is defined, a default one will be applied in order to allow any replication controller to create the pods in any Kubernetes node. This default toleration is defined as: spec: tolerations: - operator: "Exists" [1] https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ JIRA: YARDSTICK-1254 Change-Id: I32fb9c7086b4218c323218738057f634eb6ffff4 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-10Add "ports" parameters in Kubernetes contextJohn O'Loughlin1-1/+12
This new parameter, "ports", will allow the user to automatically to add port variables in a pod definition: context: type: Kubernetes servers: host: image: ... commands: ... ports: - containerPort: <port value> # Mandatory hostIP: <host IP> # Optional hostPort: <host port> # Optional name: <port name> # Optional protocol: <protocol name> # Optional The port type and the definition must be one of the supported ones in Kubernetes [1]. Container port definition, V1 API, Kubernetes Python library v6.0.0 [2] [1] https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/ [2] https://github.com/kubernetes-client/python/blob/6.0.0/kubernetes/client/models/v1_container_port.py JIRA: YARDSTICK-1183 Change-Id: I3673dbeec8d380cb2f8b1dacf6c25c7cdbc37e28 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-10Add "restartPolicy" parameter in Kubernetes policyJohn O Loughlin1-1/+7
This new parameter, "restartPolicy", will allow define the restart policy per pod. Example of yaml definition in Kubernetes: apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: - name: db ... restartPolicy: Always # Possible values: "Always", "OnFailure" and "Never" Example of definition in a Yardstick context: context: type: Kubernetes servers: host: containers: - name: ... restartPolicy: Always # Default value: "Always" Restart policy [1]. [1] https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy JIRA: YARDSTICK-1175 Change-Id: Id4317b909f98422e89d6d4553e8cfb0e1f593355 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-06Add network elements as a dict in Kubernetes contextRodolfo Alonso Hernandez1-5/+6
Like in Heat context, network elements should be defined in a dictionary, using the network name as the entry key. Previous implementation: context: networks: - name: ... plugin: ... args: ... New implementation: context: networks: net_name_1: plugin: ... args: ... net_name_2: ... JIRA: YARDSTICK-1160 Change-Id: I786b06555af509440604305e2c3c2c9fe521bef8 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-06Add "resources" parameter in Kubernetes contextJohn O Loughlin1-0/+7
This new parameter, "resources", will allow the user to automatically add resources in a pod definition per container. Example of yaml definition in Kubernetes: apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: - name: db image: mysql resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" Example of definition in a Yardstick context: context: type: Kubernetes servers: host: resources: # There are two possible keys in this dict: # "requests" and "limits". limits: <dictionary> requests: <dictionary> Resources in containers [1]. [1] https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ JIRA:YARDSTICK-1171 Change-Id: I163d72d9d3e88b538fca73eb4dbf38613aa23ff4 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-06Add "env" parameter in Kubernetes contextJohn O Loughlin1-0/+6
This new parameter, "env", will allow the user to automatically to add environment variables in a pod definition Example of definition in a context: context: type: Kubernetes servers: host: image: ... commands: ... env: - <variable name>: <variable value> - <variable name>: <variable value> The volume type and the definition must be one of the supported ones in Kubernetes [1]. [1] https://kubernetes.io/docs/concepts/storage/volumes/#types-of-volumes JIRA: YARDSTICK-1161 Change-Id: Icf372a98c090063f10c9217755519ab92ba9b0ba Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-06-14Create user defined "NodePort" services per podRodolfo Alonso Hernandez1-20/+37
This feature will give the user the ability to create user defined "NodePort" services per pod, a part from the default SSH port created, by default, for each pod created. Example of Kubernetes yaml definition: apiVersion: v1 kind: Servicemeta data: name: pod-1-service-nodeport spec: type: NodePort ports: - name: web port: 80 targetPort: 8888 nodePort: 33333 clusterIP: 10.254.0.8 selector: app: pod-1 Example of Yardstick test case definition: context: type: Kubernetes servers: host: containers: - image: ... securityContext: allowPrivilegeEscalation: false - image: ... node_ports: - port: <port number> # Mandatory name: <port name> # Optional targetPort: <port name> # Optional, default: targetPort=port nodePort: <port number> # Optional, assigned by Kubernetes Kubernetes service, type "NodePort" [1] [1] https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport JIRA: YARDSTICK-1181 Change-Id: Ia7730e4569d5526d573402a98c27d55c5c82cdef Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Change "KubernetesObject" class name to "ReplicationController"Rodolfo Alonso Hernandez1-6/+5
The class name "KubernetesObject" is not accurate. This class holds the definition of a Kubernetes replication controller. The suggested name is therefore "ReplicationControllerObject". JIRA: YARDSTICK-1180 Change-Id: I9ee9228f9528cb779e54a9bc178760b6e24c85c2 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Specify the networks to be used per podRodolfo Alonso Hernandez1-1/+18
If CRD "Network" is defined and network items are created, each pod (server) can have access to one or several networks. This is defined in the metadata section, as "annotations.networks" [1]. Example of Kubernetes pod definition with networks: apiVersion: v1 kind: Pod metadata: name: test-pod annotations: networks: '[{"name": "flannel"}]' Example of Yardstick server definition with networks: context: type: Kubernetes servers: host: containers: - name: ... networks: - flannel # These names must be defined in # context.networks ... networks: - name: flannel plugin: flannel Kubernetes annotations [2]. [1]https://github.com/intel/multus-cni/tree/b9446232cdf4f1b6f2bea583291973cc97e963f4#configuring-multus-to-use-kubeconfig-and-a-default-network [2]https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ JIRA: YARDSTICK-1178 Change-Id: I6e7b4bacf10810833ec733c14d44e5db613675e3 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add new Kubernetes resource kind: "Network"Rodolfo Alonso Hernandez1-4/+95
Add a new Kubernetes resource kind: "Network" [1] [2] Kubernetes network plugins (alpha definition): [3] Network definition example in Kubernetes: apiVersion: "kubernetes.com/v1" kind: Network metadata: name: flannel plugin: flannel args: '[ {delegate": {"isDefaultGateway": true}} ]' Proposed Kubernetes context network definition: context: networks: - name: flannel plugin: flannel args: (string) - name: sriov_upload plugin: sriov args: (string) [1]https://builders.intel.com/docs/networkbuilders/multiple-network-interfaces-in-kubernetes-application-note.pdf [2]http://cdn.opensourcecloud.cn/zt/k8s/01.pdf [3]https://kubernetes.io/docs/concepts/cluster-administration/network-plugins/ JIRA: YARDSTICK-1160 Change-Id: I71a49ac14e3d28ded91d2ed3cd9cc527e40303f7 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add new Kubernetes resource kind: "CustomResourceDefinition"Rodolfo Alonso Hernandez1-0/+45
Custom resource definition example in Kubernetes: apiVersion: "apiextensions.k8s.io/v1beta" kind: CustomResourceDefinition metadata: name: networks.kubernetes.com spec: group: kubernetes.com version: v1 scope: Namespaced names: plural: networks singular: network kind: Network Proposed Kubernetes context network definition: context: custom_resources:     - name: network        # name of the resource (singular)       version: v1          # optional, "v1" by default       scope: Namespaced    # optional, "Namespaced" by default From this definition, we will extract the Kubernetes parameters: - metadata.name: custom_resources.name + "s" + context_name + ".com" - spec.group: context_name + ".com" - spec.scope: custom_resources.scope - spec.version: custom_resources.version - spec.names.plural: custom_resources.name + "s" - spec.names.singular: custom_resources.name - spec.names.kind: custom_resources.name with first capital letter [1] https://kubernetes.io/docs/concepts/api-extension/custom-resources/ JIRA: YARDSTICK-1163 Change-Id: If8980dc3f6ddf9c6949bf15be8011aa98482ddc9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add "securityContext" parameter in Kubernetes contextRodolfo Alonso Hernandez1-5/+17
This new parameter, "securityContext", will allow the user to define the privilege and access control settings for a pod or a container [1]. Example of "securityContext" definition in the pod (if only one container is defined): context:   type: Kubernetes   servers:     host:       image: ...       securityContext:         runAsUser: 1000         fsGroup: 2000  Example of "securityContext" definition in the pod and the container (if several containers are defined):      context:   type: Kubernetes   servers:     host:       securityContext:         runAsUser: 1000         fsGroup: 2000        containers:         - image: ...           securityContext:             allowPrivilegeEscalation: false         - image: ... [1] https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ JIRA: YARDSTICK-1156 Change-Id: I597a300c68cd834522a284b1cca0faa918493342 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Define several containers per pod in a replication controllerRodolfo Alonso Hernandez1-34/+53
Add the ability to define not only one but many containers per pod in a replication controller descriptor. This feature must be backwards compatible; all current test cases using the "single container" server definition must be accepted. Example of single container pod definition: context: type: Kubernetes servers: host: image: ... commands: ... volumes: - name: volume1 # mandatory <volume type definition> # mandatory Example of several container pod definition: context: type: Kubernetes servers: host: containers: # if this key is present, all container specific parameters (image, commands, args, volumeMounts, etc.) must be defined per container - image: ... commands: ... - image: ... commands: ... volumes: - name: volume1 # mandatory <volume type definition> # mandatory NOTE: other parameters, like "volumes" or "nodeSelector", are common to all containers in the pod. JIRA: YARDSTICK-1155 Change-Id: Ib95668c68e9c09e6de3f1aa41c903cc52e6809ad Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add "volumeMounts" parameter in Kubernetes contextRodolfo Alonso Hernandez1-23/+35
This new parameter, "volumeMounts", will allow the user to automatically create new volumes mounted inside the container. Example of Kubernetes context definition: context: type: Kubernetes servers: host: volumeMounts: - name: volume1 # mandatory mountPath: /dev/hugepages # mandatory readOnly: True # optional, default=False JIRA: YARDSTICK-1151 Change-Id: Ic00b45e6d603a9f85e3f0e25becdf0bce14e637c Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add "volumes" parameter in Kubernetes contextRodolfo Alonso Hernandez1-19/+35
This new parameter, "volumes", will allow the user to automatically create new volumes. Example of Kubernetes context definition: context: type: Kubernetes servers: host: image: ... commands: ... volumes: - name: volume1 # mandatory <volume type definition> # mandatory The volume type and the definition must be one of the supported ones in Kubernetes [1]. [1] https://kubernetes.io/docs/concepts/storage/volumes/#types-of-volumes JIRA: YARDSTICK-1152 Change-Id: I44a91c605f047de4f286407e28fb5aa2e921b00a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-09Avoid "volumeMounts" with "configMap" fixed permissionsRodolfo Alonso Hernandez1-1/+1
To access to the container without using a password, the jumphost RSA public key is copied to each container, using "volumeMounts" defined as "configMap", to /root/.ssh/authorized_keys. To work properly, the following permissions must be set: - /root/.ssh: 700 - /root/.ssh/authorized_keys: 600 Because of [1][2], the mounted folders have fixed permissions and cannot be modified. [1]https://groups.google.com/forum/#!topic/kubernetes-dev/eTnfMJSqmaM [2]https://github.com/kubernetes/kubernetes/issues/28317 JIRA: YARDSTICK-1149 Change-Id: I821064da56699c5b4f509d233c33e55af119fd56 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-03Add "os_cloud_config" as a new context flag parameterRodolfo Alonso Hernandez1-7/+10
This new parameter will contain the OpenStack cloud specific configuration used by Shade client. This new flag is used only in Heat context. By default, this new parameter (dict) will contain this content: 'os_cloud_config': {'verify': False} This field will be used by HeatStack [1] to create a Shade cloud. Shade retrieves, if not defined, the OpenStack configuration from "os_client_config". This configuration is used to generate the cloud configuration, which is the description of the OpenStackCloud returned. The default parameter defined, "verify", refers to the related bug. By default, in case of using SSL certificate it will not be verified. [1] https://github.com/opnfv/yardstick/blob/b338d3091bb0beb89d4ad9f7c144f43a31a19a74/yardstick/orchestrator/heat.py#L47 JIRA: YARDSTICK-1139 Change-Id: I875a7018401b84e51dab775b8194174645d27e06 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-27restore Heat stack failure logs for CIRoss Brattain1-0/+9
We need to see what Heat failures occured so that we can debug CI failures. The only way to do this seems to be to use the private event_utils.get_events function to query for all failures Also since we had a failure go ahead and dump the Heat template that failed. Sample output: 2018-03-25 23:50:08,765 [INFO] yardstick.orchestrator.heat heat.py:629 Creating stack 'yardstick-460ed969' START 2018-03-25 23:50:21,932 [ERROR] yardstick.orchestrator.heat heat.py:644 Resource CREATE failed: BadRequest: resources.yardstick-460ed969-xe1: Invalid input for operation: physical_network 'nosuch' unknown for flat provider network. Neutron server returns request_ids: ['req-6f981f1e-a9e2-4114-af84-1ee528aed51b'] 2018-03-25 23:50:21,933 [ERROR] yardstick.orchestrator.heat heat.py:644 BadRequest: resources.yardstick-460ed969-xe1: Invalid input for operation: physical_network 'nosuch' unknown for flat provider network. Neutron server returns request_ids: ['req-6f981f1e-a9e2-4114-af84-1ee528aed51b'] 2018-03-25 23:50:21,972 [ERROR] yardstick.orchestrator.heat heat.py:645 {'description': '\n' 'All referred generated resources are prefixed with the ' 'template\n' 'name (i.e. yardstick-460ed969).\n', 'heat_template_version': '2013-05-23', 'outputs': {'trafficgen_1.yardstick-460ed969': {'description': 'VM UUID', 'value': {'get_resource': 'trafficgen_1.yardstick-460ed969'}}, 'trafficgen_1.yardstick-460ed969-fip': {'description': 'floating ' 'ip ' JIRA: YARDSTICK-998 Change-Id: Ia8f4e5ba7e280fb9086519680d5ee90a2b442e6b Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-03-06Merge "Enable heat context to support existing network"Jack Chan1-8/+14
2018-03-01Merge "Add methods to get an existing stack"Ross Brattain1-5/+22
2018-03-01Merge "Use context name instead of key_uuid"Ross Brattain1-8/+2
2018-03-01Add methods to get an existing stackEmma Foley1-5/+22
* Add yardstick/orchestrator/heat.py:HeatStack.get * Add yardstick/benchmark/contexts/heay.py:HeatContext.retrieve_existing_stack JIRA: YARDSTICK-886 Change-Id: I6974b79a25f98066a49b1bc8ccd11383e7962091 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-03-01Use context name instead of key_uuidEmma Foley1-8/+2
context.key_uuid is only used as a suffix for the key files. There is already a unique ID associated with a the context; the context name includes a task ID, which is a UUID. This patch sets context.key_uuid to to context.name instead of generating a separate UUID As a result, get_short_key_uuid() is not needed. JIRA: YARDSTICK-1028 Change-Id: Id175061d6cfe23a068bb3d12ce176c1f176e8236 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-02-27add egress security rulesmting1-1/+30
JIRA: YARDSTICK-1034 Change-Id: I613b8bff669fceeb0c7c59dec2b6f1ab22b09247 Signed-off-by: mting <dianfeng.du@ericsson.com>
2018-02-27Enable heat context to support existing networkrexlee87761-8/+14
JIRA: YARDSTICK-970 Change-Id: I593af4b3a30e52521e3d77fd84bec16ab4733483 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-02-15Workaround to fix Heat stack deletion bug in ShadeRodolfo Alonso Hernandez1-1/+8
There is a bug in Shade, in the function "event_utils.poll_for_events". While Shade is waiting for the Heat stack to be deleted, retrieves periodically the status of this Heat stack. When the stack is deleted, the function "get_stack" [1] returns None; then L90 tries to access to a key of this None object. [1]https://github.com/openstack-infra/shade/blob/e5bcb705c5b32334cdc1dd9807126298c87b0622/shade/_heat/event_utils.py#L89-L90 Shade function JIRA: YARDSTICK-1015 Change-Id: I56ea853be41bfd7f63e094d7a3696d97ba078ba4 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-12Heatstack create: fix str/bytes error in NamedTemporaryFile.write()Ross Brattain1-1/+1
we need to use jsonutils.dump_as_bytes for NamedTemporaryFile.write() 2018-02-11 19:15:01,366 [INFO] yardstick.orchestrator.heat heat.py:563 Creating stack 'yardstick-4359f33e' START 2018-02-11 19:15:01,935 [ERROR] yardstick.benchmark.contexts.heat heat.py:317 stack failed Traceback (most recent call last): File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/benchmark/contexts/heat.py", line 313, in deploy timeout=self.heat_timeout) File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/orchestrator/heat.py", line 567, in create stack.create(self._template, self.heat_parameters, block, timeout) File "/home/rbbratta/yardstick-upstream/yardstick/yardstick/orchestrator/heat.py", line 56, in create template_file.write(jsonutils.dumps(template)) File "/home/rbbratta/yardstick_venv3/lib/python3.5/tempfile.py", line 622, in func_wrapper return func(*args, **kwargs) TypeError: a bytes-like object is required, not 'str' JIRA: YARDSTICK-1005 Change-Id: I504f23b86119b62f3aea5b83a445b97bf810220c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-02-09Replace "python-heatclient" with "shade" clientRodolfo Alonso Hernandez1-144/+67
Replaced "python-heatclient" with "shade" client. The "python-heatclient" library is removed from requirements file. "shade" client version 1.22.2 is the required one for OpenStack Pike release. shade is the recommended client to interact with OpenStack clouds [1] [1] https://github.com/openstack-infra/shade JIRA: YARDSTICK-880 Change-Id: Ibbdfc42a543d2d9ed4cf70d78de3de8cbecd0076 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-11-10Merge "Heat: add availability_zone"Ross Brattain1-5/+6
2017-11-09Addition of IPv6 icpm, udp and tcp to Neutron Security GroupDanielMartinBuckley1-2/+15
When creating a Neutron security group for a heat template. Add IPv6 security group rules to access the resouces. Change-Id: I0b541dfe400121e35908a70778665ee1576f0622 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2017-11-01Heat: add availability_zoneRoss Brattain1-5/+6
Users would like to ensure placement of VMs on specific compute nodes so that the measurements are meaningful. Examples: Measure network performance in different scenarios (VMs in same host, in different hosts, across fabric, across tenants) Example: context: name: yardstick placement_groups: pgrp1: policy: "availability" servers: tg_0: floating_ip: true placement: "pgrp1" availability_zone: "zone2" vnf_0: floating_ip: true placement: "pgrp1" availability_zone: "zone1" Change-Id: I28a757c25ae3f5b3571ab3edd82d51ceba32c302 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-09-26Merge "Add nodeSelector to enable selecting the desired Kubernetes running ↵Rex Lee1-1/+9
node when creating containers for Kubernetes context"
2017-09-21Add service in kubernetes contextchenjiankun1-1/+32
JIRA: YARDSTICK-803 Currently kubernetes test case can only run in master node. We need to support it run in jump server. So I add service and use nodePort type. Then we can login the pod using nodePort. Change-Id: Ia7900d263f1c5323f132435addec27ad10547ef9 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-09-21Add nodeSelector to enable selecting the desiredTrevor Tao1-1/+9
Kubernetes running node when creating containers for Kubernetes context For example, a yaml file may looks like: servers: host: image: xxx command: /bin/bash nodeSelector: xxx: yyy Synchronously change the unit test for this function Change-Id: If74c9dad9b1a70395bb79f34708a0fde04e7e650 Signed-off-by: Trevor Tao <trevor.tao@arm.com>