From 599b56d0f30be5d747af3127b45e97c0b40eb0d7 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 19 Jun 2017 15:42:17 -0400 Subject: [PATCH] ansible: Add SLES nodes Signed-off-by: Michael Jeanson --- automation/ansible/hosts | 5 +++- automation/ansible/node-sles.yml | 8 +++++ .../ansible/roles/babeltrace/tasks/main.yml | 3 ++ .../roles/babeltrace/tasks/setup-Suse.yml | 4 +++ .../ansible/roles/babeltrace/vars/Suse.yml | 12 ++++++++ .../ansible/roles/common/tasks/main.yml | 3 ++ .../ansible/roles/common/tasks/setup-Suse.yml | 13 +++++++++ automation/ansible/roles/common/vars/Suse.yml | 29 +++++++++++++++++++ .../roles/cross-compilers/vars/Suse.yml | 10 +++++++ .../ansible/roles/liburcu/tasks/main.yml | 3 ++ .../roles/liburcu/tasks/setup-Suse.yml | 4 +++ .../ansible/roles/liburcu/vars/Suse.yml | 2 ++ .../roles/lttng-analyses/vars/Suse.yml | 5 ++++ .../roles/lttng-modules/tasks/main.yml | 3 ++ .../roles/lttng-modules/tasks/setup-Suse.yml | 4 +++ .../ansible/roles/lttng-modules/vars/Suse.yml | 6 ++++ .../ansible/roles/lttng-scope/vars/Suse.yml | 12 ++++++++ .../ansible/roles/lttng-tools/tasks/main.yml | 5 +++- .../roles/lttng-tools/tasks/setup-Suse.yml | 8 +++++ .../ansible/roles/lttng-tools/vars/Suse.yml | 9 ++++++ .../ansible/roles/lttng-ust/tasks/main.yml | 3 ++ .../roles/lttng-ust/tasks/setup-Suse.yml | 4 +++ .../ansible/roles/lttng-ust/vars/Suse.yml | 8 +++++ automation/ansible/site.retry | 1 + automation/ansible/site.yml | 1 + 25 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 automation/ansible/node-sles.yml create mode 100644 automation/ansible/roles/babeltrace/tasks/setup-Suse.yml create mode 100644 automation/ansible/roles/babeltrace/vars/Suse.yml create mode 100644 automation/ansible/roles/common/tasks/setup-Suse.yml create mode 100644 automation/ansible/roles/common/vars/Suse.yml create mode 100644 automation/ansible/roles/cross-compilers/vars/Suse.yml create mode 100644 automation/ansible/roles/liburcu/tasks/setup-Suse.yml create mode 100644 automation/ansible/roles/liburcu/vars/Suse.yml create mode 100644 automation/ansible/roles/lttng-analyses/vars/Suse.yml create mode 100644 automation/ansible/roles/lttng-modules/tasks/setup-Suse.yml create mode 100644 automation/ansible/roles/lttng-modules/vars/Suse.yml create mode 100644 automation/ansible/roles/lttng-scope/vars/Suse.yml create mode 100644 automation/ansible/roles/lttng-tools/tasks/setup-Suse.yml create mode 100644 automation/ansible/roles/lttng-tools/vars/Suse.yml create mode 100644 automation/ansible/roles/lttng-ust/tasks/setup-Suse.yml create mode 100644 automation/ansible/roles/lttng-ust/vars/Suse.yml create mode 100644 automation/ansible/site.retry diff --git a/automation/ansible/hosts b/automation/ansible/hosts index 733b6d8..f98ea85 100644 --- a/automation/ansible/hosts +++ b/automation/ansible/hosts @@ -103,7 +103,9 @@ ci-node-xenial-amd64-05-08 [node-standalone] ci-node-standalone-amd64-02 ci-node-standalone-amd64-03 -ci-node-alpine-amd64-03 + +[node-sles] +ci-node-sles12sp2-amd64-03-01 [node:children] node-i386 @@ -113,3 +115,4 @@ node-arm64 node-powerpc node-ppc64el node-standalone +node-sles diff --git a/automation/ansible/node-sles.yml b/automation/ansible/node-sles.yml new file mode 100644 index 0000000..8dcc86b --- /dev/null +++ b/automation/ansible/node-sles.yml @@ -0,0 +1,8 @@ +- hosts: node-sles + roles: + - common + - babeltrace + - liburcu + - lttng-ust + - lttng-tools + - lttng-modules diff --git a/automation/ansible/roles/babeltrace/tasks/main.yml b/automation/ansible/roles/babeltrace/tasks/main.yml index 430f324..2967331 100644 --- a/automation/ansible/roles/babeltrace/tasks/main.yml +++ b/automation/ansible/roles/babeltrace/tasks/main.yml @@ -17,3 +17,6 @@ - include: setup-Alpine.yml when: ansible_os_family == 'Alpine' + +- include: setup-Suse.yml + when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/babeltrace/tasks/setup-Suse.yml b/automation/ansible/roles/babeltrace/tasks/setup-Suse.yml new file mode 100644 index 0000000..33546fd --- /dev/null +++ b/automation/ansible/roles/babeltrace/tasks/setup-Suse.yml @@ -0,0 +1,4 @@ +--- +- name: Ensure babeltrace build dependencies are installed. + zypper: "name={{ item }} state=installed update_cache=yes" + with_items: "{{ babeltrace_packages }}" diff --git a/automation/ansible/roles/babeltrace/vars/Suse.yml b/automation/ansible/roles/babeltrace/vars/Suse.yml new file mode 100644 index 0000000..1fe841d --- /dev/null +++ b/automation/ansible/roles/babeltrace/vars/Suse.yml @@ -0,0 +1,12 @@ +--- +__babeltrace_packages: + - popt-devel + - uuid-devel + - python3-devel +# - python3-sphinx + - swig + - glib2-devel + - glib2-devel-static + - libdw-devel + - libelf-devel + - chrpath diff --git a/automation/ansible/roles/common/tasks/main.yml b/automation/ansible/roles/common/tasks/main.yml index 6e4253e..9a5107b 100644 --- a/automation/ansible/roles/common/tasks/main.yml +++ b/automation/ansible/roles/common/tasks/main.yml @@ -18,6 +18,9 @@ - include: setup-Alpine.yml when: ansible_os_family == 'Alpine' +- include: setup-Suse.yml + when: ansible_os_family == 'Suse' + - name: Remove ubuntu user user: name: ubuntu diff --git a/automation/ansible/roles/common/tasks/setup-Suse.yml b/automation/ansible/roles/common/tasks/setup-Suse.yml new file mode 100644 index 0000000..62ca568 --- /dev/null +++ b/automation/ansible/roles/common/tasks/setup-Suse.yml @@ -0,0 +1,13 @@ +--- +- name: Define common_patterns. + set_fact: + common_patterns: "{{ __common_patterns | list }}" + when: common_patterns is not defined + +- name: Ensure common patterns are installed. + zypper: "name={{ item }} type=pattern state=present update_cache=yes" + with_items: "{{ common_patterns }}" + +- name: Ensure common packages are installed. + zypper: "name={{ item }} type=package state=present update_cache=yes" + with_items: "{{ common_packages }}" diff --git a/automation/ansible/roles/common/vars/Suse.yml b/automation/ansible/roles/common/vars/Suse.yml new file mode 100644 index 0000000..b8bb717 --- /dev/null +++ b/automation/ansible/roles/common/vars/Suse.yml @@ -0,0 +1,29 @@ +--- +__common_patterns: + - base + - Minimal + - Basis-Devel + +__common_packages: + - openssh + - sudo + - java-1_8_0-openjdk-headless + - java-1_8_0-openjdk-devel + - git-core + - vim + - tree +# - htop + - automake + - autoconf + - libtool + - bison + - flex +# - libtap-harness-archive-perl +# - jq +# - cppcheck +# - cloc +# - python-virtualenv + - curl + - gettext-runtime + - libopenssl-devel + - psmisc diff --git a/automation/ansible/roles/cross-compilers/vars/Suse.yml b/automation/ansible/roles/cross-compilers/vars/Suse.yml new file mode 100644 index 0000000..7701f01 --- /dev/null +++ b/automation/ansible/roles/cross-compilers/vars/Suse.yml @@ -0,0 +1,10 @@ +--- +__cross_compilers_packages: + - gcc-aarch64-linux-gnu + - gcc-powerpc64le-linux-gnu + - gcc-arm-linux-gnueabihf + - gcc-powerpc-linux-gnu + - gcc-4.9-aarch64-linux-gnu + - gcc-4.9-powerpc64le-linux-gnu + - gcc-4.9-arm-linux-gnueabihf + - gcc-4.9-powerpc-linux-gnu diff --git a/automation/ansible/roles/liburcu/tasks/main.yml b/automation/ansible/roles/liburcu/tasks/main.yml index f33db15..6bceb9b 100644 --- a/automation/ansible/roles/liburcu/tasks/main.yml +++ b/automation/ansible/roles/liburcu/tasks/main.yml @@ -17,3 +17,6 @@ - include: setup-Alpine.yml when: ansible_os_family == 'Alpine' + +- include: setup-Suse.yml + when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/liburcu/tasks/setup-Suse.yml b/automation/ansible/roles/liburcu/tasks/setup-Suse.yml new file mode 100644 index 0000000..168dfa2 --- /dev/null +++ b/automation/ansible/roles/liburcu/tasks/setup-Suse.yml @@ -0,0 +1,4 @@ +--- +- name: Ensure liburcu build dependencies are installed. + zypper: "name={{ item }} state=installed update_cache=yes" + with_items: "{{ liburcu_packages }}" diff --git a/automation/ansible/roles/liburcu/vars/Suse.yml b/automation/ansible/roles/liburcu/vars/Suse.yml new file mode 100644 index 0000000..c597f60 --- /dev/null +++ b/automation/ansible/roles/liburcu/vars/Suse.yml @@ -0,0 +1,2 @@ +--- +__liburcu_packages: [] diff --git a/automation/ansible/roles/lttng-analyses/vars/Suse.yml b/automation/ansible/roles/lttng-analyses/vars/Suse.yml new file mode 100644 index 0000000..abb147f --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/vars/Suse.yml @@ -0,0 +1,5 @@ +--- +__lttng_analyses_packages: + - virtualenv + - python3-pyparsing + - python3-progressbar diff --git a/automation/ansible/roles/lttng-modules/tasks/main.yml b/automation/ansible/roles/lttng-modules/tasks/main.yml index 031a28b..3c7e0fd 100644 --- a/automation/ansible/roles/lttng-modules/tasks/main.yml +++ b/automation/ansible/roles/lttng-modules/tasks/main.yml @@ -18,6 +18,9 @@ - include: setup-Alpine.yml when: ansible_os_family == 'Alpine' +- include: setup-Suse.yml + when: ansible_os_family == 'Suse' + - name: checkout repo git: repo=git://git-mirror.internal.efficios.com/git/linux-all.git dest=/home/jenkins/gitcache/linux-stable.git diff --git a/automation/ansible/roles/lttng-modules/tasks/setup-Suse.yml b/automation/ansible/roles/lttng-modules/tasks/setup-Suse.yml new file mode 100644 index 0000000..9626061 --- /dev/null +++ b/automation/ansible/roles/lttng-modules/tasks/setup-Suse.yml @@ -0,0 +1,4 @@ +--- +- name: Ensure lttng-modules build dependencies are installed. + zypper: "name={{ item }} state=installed update_cache=yes" + with_items: "{{ lttng_modules_packages }}" diff --git a/automation/ansible/roles/lttng-modules/vars/Suse.yml b/automation/ansible/roles/lttng-modules/vars/Suse.yml new file mode 100644 index 0000000..7cd1bd1 --- /dev/null +++ b/automation/ansible/roles/lttng-modules/vars/Suse.yml @@ -0,0 +1,6 @@ +--- +__lttng_modules_packages: +# - kernel-wedge + - libelf-devel + - bc +# - gcc-4.9 diff --git a/automation/ansible/roles/lttng-scope/vars/Suse.yml b/automation/ansible/roles/lttng-scope/vars/Suse.yml new file mode 100644 index 0000000..cc01bab --- /dev/null +++ b/automation/ansible/roles/lttng-scope/vars/Suse.yml @@ -0,0 +1,12 @@ +--- +__lttng_scope_packages: + - openjdk-8-jdk + - openjfx + - metacity + - xfonts-100dpi + - xfonts-75dpi + - xfonts-scalable + - xfonts-cyrillic + - xvfb + - x11-apps + - imagemagick diff --git a/automation/ansible/roles/lttng-tools/tasks/main.yml b/automation/ansible/roles/lttng-tools/tasks/main.yml index e71273f..291f5b3 100644 --- a/automation/ansible/roles/lttng-tools/tasks/main.yml +++ b/automation/ansible/roles/lttng-tools/tasks/main.yml @@ -13,7 +13,7 @@ lttng_tools_packages_no_recommends: "{{ __lttng_tools_packages_no_recommends | list }}" when: - lttng_tools_packages_no_recommends is not defined - - ansible_os_family == 'Debian' + - ansible_os_family == 'Debian' or ansible_os_family == 'Suse' # Setup/install tasks. - include: setup-RedHat.yml @@ -24,3 +24,6 @@ - include: setup-Alpine.yml when: ansible_os_family == 'Alpine' + +- include: setup-Suse.yml + when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/lttng-tools/tasks/setup-Suse.yml b/automation/ansible/roles/lttng-tools/tasks/setup-Suse.yml new file mode 100644 index 0000000..f3a40cd --- /dev/null +++ b/automation/ansible/roles/lttng-tools/tasks/setup-Suse.yml @@ -0,0 +1,8 @@ +--- +- name: Ensure lttng-tools build dependencies are installed. + zypper: "name={{ item }} state=installed update_cache=yes" + with_items: "{{ lttng_tools_packages }}" + +- name: Ensure lttng-tools build dependencies are installed (no recommends). + zypper: "name={{ item }} state=installed disable_recommends=yes" + with_items: "{{ lttng_tools_packages_no_recommends }}" diff --git a/automation/ansible/roles/lttng-tools/vars/Suse.yml b/automation/ansible/roles/lttng-tools/vars/Suse.yml new file mode 100644 index 0000000..e08e01d --- /dev/null +++ b/automation/ansible/roles/lttng-tools/vars/Suse.yml @@ -0,0 +1,9 @@ +--- +__lttng_tools_packages: + - popt-devel + - libxml2-devel + - bash-completion + +__lttng_tools_packages_no_recommends: + - asciidoc + - xmlto diff --git a/automation/ansible/roles/lttng-ust/tasks/main.yml b/automation/ansible/roles/lttng-ust/tasks/main.yml index 6eab757..3899033 100644 --- a/automation/ansible/roles/lttng-ust/tasks/main.yml +++ b/automation/ansible/roles/lttng-ust/tasks/main.yml @@ -17,3 +17,6 @@ - include: setup-Alpine.yml when: ansible_os_family == 'Alpine' + +- include: setup-Suse.yml + when: ansible_os_family == 'Suse' diff --git a/automation/ansible/roles/lttng-ust/tasks/setup-Suse.yml b/automation/ansible/roles/lttng-ust/tasks/setup-Suse.yml new file mode 100644 index 0000000..39cdbf2 --- /dev/null +++ b/automation/ansible/roles/lttng-ust/tasks/setup-Suse.yml @@ -0,0 +1,4 @@ +--- +- name: Ensure lttng-ust build dependencies are installed. + zypper: "name={{ item }} state=installed update_cache=yes" + with_items: "{{ lttng_ust_packages }}" diff --git a/automation/ansible/roles/lttng-ust/vars/Suse.yml b/automation/ansible/roles/lttng-ust/vars/Suse.yml new file mode 100644 index 0000000..2ea9a25 --- /dev/null +++ b/automation/ansible/roles/lttng-ust/vars/Suse.yml @@ -0,0 +1,8 @@ +--- +__lttng_ust_packages: + - uuid-devel + - texinfo + - python3 + - log4j + - java-1_8_0-openjdk-headless + - java-1_8_0-openjdk-devel diff --git a/automation/ansible/site.retry b/automation/ansible/site.retry new file mode 100644 index 0000000..6429dab --- /dev/null +++ b/automation/ansible/site.retry @@ -0,0 +1 @@ +ci-node-sles12sp2-amd64-03-01 diff --git a/automation/ansible/site.yml b/automation/ansible/site.yml index ded07e2..35c1e1b 100644 --- a/automation/ansible/site.yml +++ b/automation/ansible/site.yml @@ -7,3 +7,4 @@ - include: node-i386.yml - include: node-amd64.yml - include: node-standalone.yml +- include: node-sles.yml -- 2.34.1