From 443f72ec12b3b9c05b4f7a74972680e4a5358ca5 Mon Sep 17 00:00:00 2001 From: John Barboza Date: Fri, 5 Jan 2018 17:20:23 -0500 Subject: [PATCH] ubuntu 14.04 ppcle64 PR-URL: https://github.com/nodejs/build/pull/1075 Reviewed-By: Michael Dawson --- ansible/inventory.yml | 1 + ansible/roles/baselayout/vars/main.yml | 2 ++ ansible/roles/java-base/tasks/main.yml | 25 +++++++++++++++---- .../roles/jenkins-worker/templates/upstart.j2 | 5 ++++ 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ansible/inventory.yml b/ansible/inventory.yml index f24e40ab2..7d8508cd9 100644 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -136,6 +136,7 @@ hosts: ubuntu1404-ppc64_be-2: {ip: 140.211.168.75} ubuntu1404-ppc64_le-1: {ip: 140.211.168.106} ubuntu1404-ppc64_le-2: {ip: 140.211.168.94} + ubuntu1404-ppc64_le-3: {ip: 140.211.168.221, user: root} - rackspace: centos7-x64-1: {ip: 119.9.27.82} diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 8f4c26235..771f00f13 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -120,6 +120,8 @@ packages: { ubuntu1404: [ 'ntp', + 'g++-4.8', + 'gcc-4.8', 'g++-4.9', 'gcc-4.9', ] diff --git a/ansible/roles/java-base/tasks/main.yml b/ansible/roles/java-base/tasks/main.yml index 70fbf27b1..01bfe693c 100644 --- a/ansible/roles/java-base/tasks/main.yml +++ b/ansible/roles/java-base/tasks/main.yml @@ -5,11 +5,11 @@ # - name: install add-apt-repostory - when: os in ("ubuntu1204", "ubuntu1404") + when: os in ("ubuntu1204", "ubuntu1404") and arch != "ppc64" package: name=software-properties-common state=present - name: add webupd8 oracle java repository - when: os in ("ubuntu1204", "ubuntu1404") + when: os in ("ubuntu1204", "ubuntu1404") and arch != "ppc64" apt_repository: repo='ppa:webupd8team/java' - name: add webupd8team oracle java repository @@ -24,21 +24,36 @@ shell: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 - name: accept webupd8 oracle java 8 license - when: os in ("ubuntu1204", "ubuntu1404") or os == "debian8" + when: os in ("ubuntu1204", "ubuntu1404") and arch != "ppc64" or os == "debian8" debconf: name='oracle-java8-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select' - name: update packages + when: arch != "ppc64" include_role: name: package-upgrade +- name: download java + when: os in "ubuntu1404" and arch == "ppc64" + get_url: + url: https://github.com/AdoptOpenJDK/openjdk8-releases/releases/download/jdk8u144-b01/OpenJDK8_ppc64le_Linux_jdk8u144-b01.tar.gz + dest: /tmp/ + +- name: unarchive java + when: os in "ubuntu1404" and arch == "ppc64" + unarchive: + src: /tmp/OpenJDK8_ppc64le_Linux_jdk8u144-b01.tar.gz + remote_src: yes + dest: /home/iojs + tags: java + # if this fails you want to check in vars/main.yml and add package name # as appropriate -- try to use generic os family if available. - name: install java - when: not os|startswith("zos") + when: not os|startswith("zos") and arch != "ppc64" package: name="{{ java_package_name }}" state=present - name: install webupd8 oracle java 8 extras - when: os in ("ubuntu1204", "ubuntu1404") + when: os in ("ubuntu1204", "ubuntu1404") and arch != "ppc64" package: name="{{item}}" state=present with_items: - ca-certificates diff --git a/ansible/roles/jenkins-worker/templates/upstart.j2 b/ansible/roles/jenkins-worker/templates/upstart.j2 index cf24adb1a..1f49c2b81 100644 --- a/ansible/roles/jenkins-worker/templates/upstart.j2 +++ b/ansible/roles/jenkins-worker/templates/upstart.j2 @@ -23,6 +23,11 @@ setgid iojs setuid iojs script + + if [ $(uname -i) = "ppc64le" ]; then + export PATH=/home/iojs/jdk8u144-b01/bin:$PATH; + fi + exec java -Xmx{{ server_ram|default('128m') }} \ -jar /home/{{ server_user }}/slave.jar -secret {{ secret }} \ -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp