From 0b976dd02421a181674acc837127ac741ccfccea Mon Sep 17 00:00:00 2001 From: John O Loughlin Date: Fri, 16 Feb 2018 15:29:58 +0000 Subject: Migrate install.sh script to ansible Ansible scripts to install yardstick. These scripts will take a few options: INSTALLATION_MODE : Container or Baremetal YARDSTICK_DIR: Location of Yardstick directory VIRTUAL_ENVIRONMENT: Should a virtual environment be used NSB_DIR: Location of NSB directory JIRA: YARDSTICK-1126 Change-Id: I4a13e07e96650ffd971dfb18472f2563cfd51aa9 Signed-off-by: John O Loughlin --- ansible/install.yaml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ansible/install.yaml (limited to 'ansible/install.yaml') diff --git a/ansible/install.yaml b/ansible/install.yaml new file mode 100644 index 000000000..afffbede2 --- /dev/null +++ b/ansible/install.yaml @@ -0,0 +1,42 @@ +--- +- hosts: localhost + + vars: + arch_amd64: "amd64" + arch_arm64: "arm64" + inst_mode_container: "container" + inst_mode_baremetal: "baremetal" + ubuntu_archive: + amd64: "http://archive.ubuntu.com/ubuntu/" + arm64: "http://ports.ubuntu.com/ubuntu-ports/" + installation_mode: "{{ INSTALLATION_MODE | default('baremetal') }}" + yardstick_dir: "{{ YARDSTICK_DIR | default('/home/opnfv/repos/yardstick') }}" + virtual_environment: "{{ VIRTUAL_ENVIRONMENT | default(False) }}" + nsb_dir: "{{ NSB_DIR | default('/opt/nsb_bin/') }}" + + pre_tasks: + + - name: Create NSB binaries directory, accesible to any user + file: + path: "{{ nsb_dir }}" + state: directory + owner: root + mode: 0777 + + roles: + - add_repos_jumphost + - install_dependencies_jumphost + - install_yardstick + - configure_uwsgi + - configure_nginx + - download_trex + - install_trex + - configure_rabbitmq + + post_tasks: + + - service: + name: nginx + state: restarted + + - shell: uwsgi -i /etc/yardstick/yardstick.ini -- cgit 1.2.3-korg