aboutsummaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/build_yardstick_image.yml18
-rw-r--r--ansible/nsb_setup.yml6
-rwxr-xr-xansible/roles/install_dependencies/tasks/Debian.yml1
-rw-r--r--ansible/roles/install_image_dependencies/tasks/main.yml2
4 files changed, 24 insertions, 3 deletions
diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml
index 5f9158576..35d9da45e 100644
--- a/ansible/build_yardstick_image.yml
+++ b/ansible/build_yardstick_image.yml
@@ -87,6 +87,12 @@
- name: convert image to raw
command: "qemu-img convert {{ image_dest }} {{ raw_imgfile }}"
+ - name: resize image to allow for more VNFs
+ command: "qemu-img resize -f raw {{ raw_imgfile }} +2G"
+
+ - name: resize parition to allow for more VNFs
+ command: "parted -s -a optimal {{ raw_imgfile }} resizepart 1 100%"
+
- name: create mknod devices in chroot
command: "mknod -m 0660 /dev/loop{{ item }} b 7 {{ item }}"
args:
@@ -124,6 +130,18 @@
- set_fact:
image_fs_type: "{{ blkid_res.stdout.strip() }}"
+ - fail:
+ msg: "We only support ext4 image filesystems because we have to resize"
+ when: image_fs_type != "ext4"
+
+ - name: fsck the image filesystem
+ command: "e2fsck -y -f {{ image_first_partition_device }}"
+
+ - name: resize filesystem to full partition size
+ command: resize2fs {{ image_first_partition_device }}
+
+ - name: fsck the image filesystem
+ command: "e2fsck -y -f {{ image_first_partition_device }}"
- name: make tmp disposable fstab
command: mktemp --tmpdir fake_fstab.XXXXXXXXXX
diff --git a/ansible/nsb_setup.yml b/ansible/nsb_setup.yml
index 78cf87ec7..fcb518899 100644
--- a/ansible/nsb_setup.yml
+++ b/ansible/nsb_setup.yml
@@ -44,12 +44,14 @@
- name: Start yardstick container
docker_container:
name: yardstick
+ pull: yes
+ recreate: yes
image: opnfv/yardstick:latest
recreate: yes
state: started
restart_policy: always
- privileged: True
- interactive: True
+ privileged: yes
+ interactive: yes
volumes:
- "{{ openrc_file|default('/dev/null') }}:/etc/yardstick/openstack.creds:ro"
- /var/run/docker.sock:/var/run/docker.sock
diff --git a/ansible/roles/install_dependencies/tasks/Debian.yml b/ansible/roles/install_dependencies/tasks/Debian.yml
index 7a9911ebf..bba6fb13c 100755
--- a/ansible/roles/install_dependencies/tasks/Debian.yml
+++ b/ansible/roles/install_dependencies/tasks/Debian.yml
@@ -47,3 +47,4 @@
- uwsgi-plugin-python
- supervisor
- python-setuptools
+ - lsof
diff --git a/ansible/roles/install_image_dependencies/tasks/main.yml b/ansible/roles/install_image_dependencies/tasks/main.yml
index f3a3151c5..ffd30f33e 100644
--- a/ansible/roles/install_image_dependencies/tasks/main.yml
+++ b/ansible/roles/install_image_dependencies/tasks/main.yml
@@ -16,7 +16,7 @@
include: "{{ ansible_os_family }}.yml"
- name: Install core packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest"
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes"
register: pkg_mgr_results
retries: "{{ pkg_mgr_retries }}"
until: pkg_mgr_results|success