summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/baremetal_scale_out_ixia_correlated_test.yaml (renamed from ansible/multi_port_baremetal_ixia_correlated_test.yaml)5
-rw-r--r--ansible/baremetal_scale_out_ixia_correlated_test_templates.yml (renamed from ansible/multi_port_baremetal_ixia_correlated_test_templates.yml)36
-rw-r--r--ansible/multi_port_baremetal_ixia_test_templates.yml12
-rw-r--r--ansible/multi_port_baremetal_test_templates.yml12
-rw-r--r--ansible/roles/barometer_collectd/tasks/main.yaml40
-rw-r--r--ansible/roles/configure_rabbitmq/tasks/main.yml20
-rw-r--r--ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j25
-rw-r--r--ansible/roles/configure_rabbitmq/templates/user_definitions.json.j223
-rw-r--r--ansible/roles/docker/tasks/Debian.yml16
-rw-r--r--ansible/roles/install_dpdk/tasks/main.yml15
-rw-r--r--ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml2
11 files changed, 152 insertions, 34 deletions
diff --git a/ansible/multi_port_baremetal_ixia_correlated_test.yaml b/ansible/baremetal_scale_out_ixia_correlated_test.yaml
index 0d223181d..13f6fef15 100644
--- a/ansible/multi_port_baremetal_ixia_correlated_test.yaml
+++ b/ansible/baremetal_scale_out_ixia_correlated_test.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Intel Corporation. #
+# Copyright (c) 2018 Intel Corporation. #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -112,6 +112,7 @@
ip:
mgmt:
- '1.2.1.6/24'
+ - '1.2.1.7/24'
uplink:
- '152.16.100.10/24'
- '172.16.100.10/24'
@@ -127,6 +128,6 @@
- '00:00:00:9e:00:fb'
tasks:
- - include: multi_port_baremetal_ixia_correlated_test_templates.yml
+ - include: baremetal_scale_out_ixia_correlated_test_templates.yml
with_items: "{{ scale_out }}"
diff --git a/ansible/multi_port_baremetal_ixia_correlated_test_templates.yml b/ansible/baremetal_scale_out_ixia_correlated_test_templates.yml
index 6f73d8c01..11d3d4674 100644
--- a/ansible/multi_port_baremetal_ixia_correlated_test_templates.yml
+++ b/ansible/baremetal_scale_out_ixia_correlated_test_templates.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Intel Corporation. #
+# Copyright (c) 2018 Intel Corporation. #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -15,6 +15,10 @@
- set_fact:
num_vnfs: "{{ item }}"
+- file:
+ path: /etc/yardstick/nodes
+ state: directory
+
- debug:
var: num_vnfs
verbosity: 2
@@ -24,33 +28,33 @@
dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-{{ num_vnfs }}.yaml
- template:
- src: ../etc/yardstick/nodes/standalone/ixia_template.yaml
- dest: /etc/yardstick/nodes/ixia_{{ num_vnfs }}.yaml
+ src: ../etc/yardstick/nodes/standalone/ixia_correlated_template.yaml
+ dest: /etc/yardstick/nodes/ixia_correlated_{{ num_vnfs }}.yaml
- template:
- src: ../etc/yardstick/nodes/standalone/pod_bm_vnf.yaml
+ src: ../etc/yardstick/nodes/standalone/pod_bm_vnf_scale_out.yaml
dest: /etc/yardstick/nodes/pod_bm_vnf_{{num_vnfs}}.yaml
- template:
- src: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_udp_ixia_correlated_multi_port_template.yaml
- dest: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_udp_ixia_correlated_multi_port_{{ num_vnfs }}.yaml
+ src: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_udp_ixia_correlated_scale_out_template.yaml
+ dest: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_udp_ixia_correlated_scale_out_{{ num_vnfs }}.yaml
- template:
- src: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-correlated-multi-port.yaml
- dest: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-correlated-multi-port-{{ num_vnfs }}.yaml
+ src: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-correlated-scale-out.yaml
+ dest: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-correlated-scale-out-{{ num_vnfs }}.yaml
- template:
- src: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_udp_ixia_correlated_multi_port_template.yaml
- dest: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_udp_ixia_correlated_multi_port_{{num_vnfs}}.yaml
+ src: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_udp_ixia_correlated_scale_out_template.yaml
+ dest: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_udp_ixia_correlated_scale_out_{{num_vnfs}}.yaml
- template:
- src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-correlated-multi-port.yaml
- dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-correlated-multi-port-{{ num_vnfs }}.yaml
+ src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-correlated-scale-out.yaml
+ dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-correlated-scale-out-{{ num_vnfs }}.yaml
- template:
- src: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_udp_ixia_correlated_multi_port_template.yaml
- dest: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_udp_ixia_correlated_multi_port_{{num_vnfs}}.yaml
+ src: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_udp_ixia_correlated_scale_out_template.yaml
+ dest: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_udp_ixia_correlated_scale_out_{{num_vnfs}}.yaml
- template:
- src: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-ixia-correlated-multi-port.yaml
- dest: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-ixia-correlated-multi-port-{{ num_vnfs }}.yaml
+ src: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-ixia-correlated-scale-out.yaml
+ dest: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-ixia-correlated-scale-out-{{ num_vnfs }}.yaml
diff --git a/ansible/multi_port_baremetal_ixia_test_templates.yml b/ansible/multi_port_baremetal_ixia_test_templates.yml
index f2e04a2d1..832f025a1 100644
--- a/ansible/multi_port_baremetal_ixia_test_templates.yml
+++ b/ansible/multi_port_baremetal_ixia_test_templates.yml
@@ -15,6 +15,10 @@
- set_fact:
num_vnfs: "{{ item }}"
+- file:
+ path: /etc/yardstick/nodes
+ state: directory
+
- debug:
var: num_vnfs
verbosity: 2
@@ -25,15 +29,15 @@
- template:
src: ../etc/yardstick/nodes/standalone/ixia_template.yaml
- dest: /etc/yardstick/nodes/ixia_{{ num_vnfs }}.yaml
+ dest: /etc/yardstick/nodes/baremetal_ixia_{{ num_vnfs }}.yaml
- template:
src: ../etc/yardstick/nodes/standalone/pod_bm_vnf.yaml
dest: /etc/yardstick/nodes/pod_bm_vnf_{{num_vnfs}}.yaml
- template:
- src: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_template.yaml
- dest: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_{{ num_vnfs }}.yaml
+ src: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_ixia_template.yaml
+ dest: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_ixia_{{ num_vnfs }}.yaml
- template:
src: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-multi-port.yaml
@@ -45,7 +49,7 @@
- template:
src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-multi-port.yaml
- dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-multi-port-ixia-{{ num_vnfs }}.yaml
+ dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-multi-port-{{ num_vnfs }}.yaml
- template:
src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-scale-out.yaml
diff --git a/ansible/multi_port_baremetal_test_templates.yml b/ansible/multi_port_baremetal_test_templates.yml
index 4b905f8c7..2d0259364 100644
--- a/ansible/multi_port_baremetal_test_templates.yml
+++ b/ansible/multi_port_baremetal_test_templates.yml
@@ -15,6 +15,10 @@
- set_fact:
num_vnfs: "{{ item }}"
+- file:
+ path: /etc/yardstick/nodes
+ state: directory
+
- debug:
var: num_vnfs
verbosity: 2
@@ -40,8 +44,8 @@
dest: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-multi-port-{{ num_vnfs }}.yaml
- template:
- src: ../samples/vnf_samples/nsut/acl/tc_baremetal_vfw_rfc2544_template.yaml
- dest: ../samples/vnf_samples/nsut/acl/tc_baremetal_vfw_rfc2544_{{ num_vnfs }}.yaml
+ src: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_rfc2544_template.yaml
+ dest: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_rfc2544_{{ num_vnfs }}.yaml
- template:
src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-multi-port.yaml
@@ -52,8 +56,8 @@
dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-{{ num_vnfs }}.yaml
- template:
- src: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_vfw_rfc2544_template.yaml
- dest: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_vfw_rfc2544_{{ num_vnfs }}.yaml
+ src: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_rfc2544_template.yaml
+ dest: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_rfc2544_{{ num_vnfs }}.yaml
- template:
src: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-multi-port.yaml
diff --git a/ansible/roles/barometer_collectd/tasks/main.yaml b/ansible/roles/barometer_collectd/tasks/main.yaml
new file mode 100644
index 000000000..c06540c3f
--- /dev/null
+++ b/ansible/roles/barometer_collectd/tasks/main.yaml
@@ -0,0 +1,40 @@
+#Copyright 2018 OPNFV and Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+
+- name: Remove barometer-collectd container
+ docker_container:
+ name: barometer-collectd
+ state: absent
+
+- name: Remove barometer-collectd image
+ docker_image:
+ name: opnfv/barometer-collectd
+ state: absent
+
+- name: Prepare collectd container
+ docker_container:
+ name: barometer-collectd
+ image: opnfv/barometer-collectd
+ volumes:
+ - /opt/collectd/etc/collectd.conf.d/:/opt/collectd/etc/collectd.conf.d
+ - /var/run:/var/run
+ - /tmp:/tmp
+ - /var/lib/collectd:/var/lib/collectd
+ command: "/run_collectd.sh"
+ detach: yes
+ state: present
+ restart: no
+ privileged: yes
+ network_mode: host
diff --git a/ansible/roles/configure_rabbitmq/tasks/main.yml b/ansible/roles/configure_rabbitmq/tasks/main.yml
index 3ad60c1ea..4ff4222dc 100644
--- a/ansible/roles/configure_rabbitmq/tasks/main.yml
+++ b/ansible/roles/configure_rabbitmq/tasks/main.yml
@@ -12,6 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
+- name: Create rabbitmq configuration
+ template:
+ src: rabbitmq.config.j2
+ dest: /etc/rabbitmq/rabbitmq.config
+
+- name: Define user definitions file
+ template:
+ src: user_definitions.json.j2
+ dest: /etc/rabbitmq/definitions.json
+
- name: Restart rabbitmq
service:
name: rabbitmq-server
@@ -20,11 +30,5 @@
- name: rabbitmqctl start_app
shell: rabbitmqctl start_app
-- name: Configure rabbitmq
- rabbitmq_user:
- user: yardstick
- password: yardstick
- configure_priv: .*
- read_priv: .*
- write_priv: .*
- state: present
+- name: Enable management plugin
+ shell: rabbitmq-plugins enable rabbitmq_management
diff --git a/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2 b/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2
new file mode 100644
index 000000000..8f07edf5c
--- /dev/null
+++ b/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2
@@ -0,0 +1,5 @@
+ [
+ {rabbitmq_management, [
+ {load_definitions, "/etc/rabbitmq/definitions.json"}
+ ]}
+]. \ No newline at end of file
diff --git a/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2 b/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2
new file mode 100644
index 000000000..7c811f16d
--- /dev/null
+++ b/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2
@@ -0,0 +1,23 @@
+ {
+ "users": [{
+ "name": "yardstick",
+ "password_hash": "XHp9fBOE3vjTEf7ktiUBHqefW2g=",
+ "hashing_algorithm": "rabbit_password_hashing_sha256",
+ "tags": ""
+ }],
+ "vhosts": [{
+ "name": "/"
+ }],
+ "permissions": [{
+ "user": "yardstick",
+ "vhost": "/",
+ "configure": ".*",
+ "write": ".*",
+ "read": ".*"
+ }],
+ "parameters": [],
+ "policies": [],
+ "queues": [],
+ "exchanges": [],
+ "bindings": []
+}
diff --git a/ansible/roles/docker/tasks/Debian.yml b/ansible/roles/docker/tasks/Debian.yml
index 7f998de45..a03040d88 100644
--- a/ansible/roles/docker/tasks/Debian.yml
+++ b/ansible/roles/docker/tasks/Debian.yml
@@ -14,3 +14,19 @@
---
- name: Install docker.io
action: "{{ ansible_pkg_mgr }} name=docker.io state=present force=yes"
+
+ - name: Update package manager cache
+ tags:
+ - cache_update
+ package:
+ update_cache: yes
+
+ - name: Install python-pip
+ package:
+ name: python-pip
+ state: present
+
+ - name: Install docker-py
+ pip:
+ name: docker-py
+ state: present
diff --git a/ansible/roles/install_dpdk/tasks/main.yml b/ansible/roles/install_dpdk/tasks/main.yml
index f89a43cae..d1dc2900b 100644
--- a/ansible/roles/install_dpdk/tasks/main.yml
+++ b/ansible/roles/install_dpdk/tasks/main.yml
@@ -128,3 +128,18 @@
remote_src: yes
force: yes
mode: 0755
+
+- name: make vPE binary
+ command: make -j {{ ansible_processor_vcpus }}
+ args:
+ chdir: "{{ dpdk_path }}/examples/ip_pipeline"
+ environment:
+ RTE_SDK: "{{ dpdk_path }}"
+
+- name: Copy vPE to correct location
+ copy:
+ src: "{{ dpdk_path }}/examples/ip_pipeline/build/app/ip_pipeline"
+ dest: "{{ INSTALL_BIN_PATH }}/vPE_vnf"
+ remote_src: yes
+ force: yes
+ mode: 0755
diff --git a/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml b/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml
index 5f0dec643..84e1f9adf 100644
--- a/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml
+++ b/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml
@@ -55,3 +55,5 @@
- install_pmu_tools
- download_collectd
- install_collectd
+ - docker
+ - barometer_collectd