Sync up 'install.yaml' with 'nsb_setup.yml' 51/66051/2
authorStepan Andrushko <stepanx.andrushko@intel.com>
Mon, 24 Dec 2018 17:26:39 +0000 (19:26 +0200)
committerStepan Andrushko <stepanx.andrushko@intel.com>
Fri, 28 Dec 2018 13:41:43 +0000 (15:41 +0200)
Add support for barometer container. Add VM image to OpenStack.

JIRA: YARDSTICK-1573

Change-Id: I7946f080f93bb69b0380c9ea7f4d7e04cb284c15
Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
ansible/install.yaml
ansible/roles/install_dependencies_jumphost/tasks/Debian.yml

index 0c7ad7e..e60c148 100644 (file)
     - install_pmu_tools
     - download_collectd
     - install_collectd
+    - docker
+    - barometer_collectd
 
 
-- hosts: jumphost
+- name: Prepare to build VM
+  hosts: jumphost
   become: yes
   vars:
     img_prop_item: "{{ IMG_PROPERTY }}"
       when: installation_mode != inst_mode_container
 
 
-- hosts: chroot_image
+- name: Build VM in chroot
+  hosts: chroot_image
   connection: chroot
   become: yes
   vars:
       when: installation_mode != inst_mode_container
 
 
-- hosts: jumphost
+- name: Clear up after VM is built
+  hosts: jumphost
   become: yes
 
   tasks:
       when: installation_mode != inst_mode_container
 
 
-- name: start yardstick container on jumphost
+- hosts: jumphost
+  vars_files:
+    - yardstick_config.yml
+
+  roles:
+    - { role: convert_openrc, when: openrc_file is defined }
+
+
+- name: Add OpenStack variables, image
+  hosts: jumphost
+  vars_files:
+    - yardstick_config.yml
+  environment:
+    "{{ openrc }}"
+
+  roles:
+    - { role: clean_images, when: openrc_file is defined }
+    - { role: clean_flavors, when: openrc_file is defined }
+    - { role: create_samplevnfs_image, when: openrc_file is defined }
+
+
+- name: Start yardstick container on jumphost
   hosts: jumphost
 
   tasks:
-    - include_role:
+    - name: Install docker needed to pull Yardstick container
+      include_role:
         name: docker
       when: installation_mode == inst_mode_container_pull
 
index 6c3900d..a229cc1 100755 (executable)
     - ansible_distribution == 'Ubuntu'
     - ansible_distribution_major_version|int >= 17
 
+- name: Uninstall docker as it conflicts with docker-py
+  pip:
+    name:
+      - docker
+    state: absent
+
 - name: Install required docker-py module
   pip:
-    name: docker-py
+    name:
+      - docker-py
+      - shade
     state: latest
   environment: "{{ proxy_env }}"