Skip to content

Commit

Permalink
Merge pull request adoptium#563 from joe-dekoning/openj9
Browse files Browse the repository at this point in the history
Initial modification for IBM playbook usage
  • Loading branch information
jdekonin authored and GitHub Enterprise committed Jun 27, 2019
2 parents f14bb34 + fcce6de commit ab99359
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
##########################
# ibm_variables #
##########################

Domain: IBM
Jenkins_Username: jenkins
Jenkins_User_SSHKey: /Vendor_Files/jenkins/id_rsa.pub
bootjdk: openj9

Jenkins_Win_Passwd: /Vendor_Files/jenkins/jenkins_win_passwd
Nagios_Monitoring: Disabled
Nagios_Plugins: Disabled
Security: Disabled
Slack_Notification: Disabled
Superuser_Account: Disabled
ansible_connection: ssh
ansible_port: 22

46 changes: 46 additions & 0 deletions ansible/playbooks/ibm_unix_playbook/ibm_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
###################################
# AdoptOpenJDK - Ansible Playbook #
###################################
- hosts: all
gather_facts: yes
tasks:
- block:
# Set standard variables
- name: Load IBM variable file
include_vars: group_vars/all/ibm_variables.yml
environment:
PATH: "/usr/local/bin:{{ ansible_env.PATH }}"

#########
# Roles #
#########
roles:
- gcc_7
- NVidia_Cuda_Toolkit_75
- ../AdoptOpenJDK_Unix_Playbook/roles/Debug
- ../AdoptOpenJDK_Unix_Playbook/roles/Version
- ../AdoptOpenJDK_Unix_Playbook/roles/Common
- ../AdoptOpenJDK_Unix_Playbook/roles/autoconf
- ../AdoptOpenJDK_Unix_Playbook/roles/curl
- ../AdoptOpenJDK_Unix_Playbook/roles/Jenkins_User # AdoptOpenJDK Infrastructure
- ../AdoptOpenJDK_Unix_Playbook/roles/freemarker # OpenJ9
- ../AdoptOpenJDK_Unix_Playbook/roles/ant # Testing
- ../AdoptOpenJDK_Unix_Playbook/roles/Ant-Contrib # Testing
- ../AdoptOpenJDK_Unix_Playbook/roles/GIT_Source
- ../AdoptOpenJDK_Unix_Playbook/roles/CPAN
- ../AdoptOpenJDK_Unix_Playbook/roles/cmake # OpenJ9 / OpenJFX
- ../AdoptOpenJDK_Unix_Playbook/roles/gmake
- ../AdoptOpenJDK_Unix_Playbook/roles/Docker # Testing
- ../AdoptOpenJDK_Unix_Playbook/roles/NVidia_Cuda_Toolkit # OpenJ9
- ../AdoptOpenJDK_Unix_Playbook/roles/Swap_File
- ../AdoptOpenJDK_Unix_Playbook/roles/Crontab
- ../AdoptOpenJDK_Unix_Playbook/roles/NTP_TIME
- ../AdoptOpenJDK_Unix_Playbook/roles/Python3_Source
- ../AdoptOpenJDK_Unix_Playbook/roles/ccache
- {role: ../AdoptOpenJDK_Unix_Playbook/roles/nasm, when: ansible_architecture == 'x86_64'} # OpenJ9
- ../AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk11 # JDK12 build bootstrap
- ../AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk12 # JDK13 build bootstrap
- ../AdoptOpenJDK_Unix_Playbook/roles/Protobuf
- ../AdoptOpenJDK_Unix_Playbook/roles/OpenSSL102 # OpenJ9
- ../AdoptOpenJDK_Unix_Playbook/roles/Clean_Up
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
when:
- (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14") or (ansible_distribution == "RedHat" or ansible_distribution == "CentOS")
- ansible_architecture == "x86_64"
tags: vendor_nvidia_cuda_toolkit
tags: nvidia_cuda_toolkit_75

- name: Download NVidia CUDA 7.5 toolkit
get_url:
Expand All @@ -23,15 +23,15 @@
- (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14") or (ansible_distribution == "RedHat" or ansible_distribution == "CentOS")
- ansible_architecture == "x86_64"
- cuda75_installed.stat.exists == False
tags: vendor_nvidia_cuda_toolkit
tags: nvidia_cuda_toolkit_75

- name: Install NVidia CUDA 7.5 toolkit
shell: sh /tmp/cuda_75_linux-run --silent --toolkit --override
when:
- (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14") or (ansible_distribution == "RedHat" or ansible_distribution == "CentOS")
- ansible_architecture == "x86_64"
- cuda75_installed.stat.exists == False
tags: vendor_nvidia_cuda_toolkit
tags: nvidia_cuda_toolkit_75

- name: Clean up downloaded packages
file:
Expand All @@ -44,4 +44,4 @@
- ansible_architecture == "x86_64"
- cuda75_installed.stat.exists == False
ignore_errors: yes
tags: vendor_nvidia_cuda_toolkit
tags: nvidia_cuda_toolkit_75
Original file line number Diff line number Diff line change
Expand Up @@ -48,67 +48,18 @@
- ansible_architecture == "x86_64"
- devtoolset7_installed.stat.exists == False
- devtoolset7_repo_installed.stat.exists == False
tags: vendor_gcc_7
tags: gcc_7

- name: Install devtoolset-7 packages
yum:
name: devtoolset-7-gcc-c++
state: installed
state: installed
when:
- ansible_distribution == "RedHat"
- ansible_architecture == "x86_64"
- devtoolset7_installed.stat.exists == False
tags: vendor_gcc_7

# Install at11 (IBMAdvanced Tools) on RHEL7 PPCLE
tags: gcc_7

- name: Check if IBMAdvanced Tools 11 is installed on RHEL7 PPCLE
stat:
path: /opt/at11.0
register: at11_installed
when:
- ansible_distribution == "RedHat"
- ansible_architecture == "ppc64le"
- ansible_distribution_major_version == "7"
tags: vendor_gcc_7

- name: Check if att11.0.repo exists
stat:
path: /etc/yum.repos.d/at11.0.repo
when:
- ansible_distribution == "RedHat"
- ansible_architecture == "ppc64le"
- ansible_distribution_major_version == "7"
- at11_installed.stat.exists == False
register: att11_repo_installed
tags: vendor_gcc_7

- name: Add att11 to yum repo
get_url:
url: "ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL7"
dest: /etc/yum.repos.d/at11.0.repo
timeout: 25
when:
- ansible_distribution == "RedHat"
- ansible_architecture == "ppc64le"
- ansible_distribution_major_version == "7"
- at11_installed.stat.exists == False
- att11_repo_installed.stat.exists == False
tags: vendor_gcc_7

- name: Install att11.0 packages
yum:
name: "{{ packages }}"
vars:
packages:
- environment-modules
- advance-toolchain-at11.0-runtime
- advance-toolchain-at11.0-devel
- advance-toolchain-at11.0-perf
state: installed
when:
- ansible_distribution == "RedHat"
- ansible_architecture == "ppc64le"
- ansible_distribution_major_version == "7"
- at11_installed.stat.exists == False
tags: vendor_gcc_7
- lineinfile:
path: ~/.bashrc
line: 'source /opt/rh/devtoolset-7/enable'

0 comments on commit ab99359

Please sign in to comment.