From 9242131921a243b33e3f8e7ef8e33278e3f51344 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 22 Feb 2019 10:17:20 +0000 Subject: [PATCH 01/22] Add new IBM i system Add ccache dependency Add libstdc++-devel Add new IBM i system Add PASE_PATH to ibmi_start SBMJOB cleanup merge issue garbage Co-Authored-By: Kevin Adler fix ProdDava spelling FIXUP fixup ansible misspelling fixup CentOS conflict fixup! merge issues Get rid of IBM i manual steps for bootstrap Initial IBMi playbook Misc preparation for IBM i Remove QSECOFR IBM i RPM Repo from bootstrap task Restructure os condition for readability Rewrite ibmi_start.j2 to use SBMJOB instead of su set yum backend Split ibmi packages into separate lines for readability WIP - host vars WIP - one machine should be release? --- ansible/MANUAL_STEPS.md | 12 +++ ansible/ansible.cfg | 4 + .../test-iinthecloud-ibmi72-ppc64_be-1 | 3 + ansible/inventory.yml | 7 ++ ansible/playbooks/jenkins/worker/create.yml | 2 +- ansible/roles/baselayout/tasks/main.yml | 26 +++++- ansible/roles/baselayout/vars/main.yml | 19 +++++ ansible/roles/java-base/tasks/main.yml | 6 ++ ansible/roles/jenkins-worker/tasks/main.yml | 79 ++++++++++++++++++- .../tasks/partials/tap2junit/ibmi.yml | 9 +++ .../tasks/partials/tap2junit/pip.yml | 2 +- .../jenkins-worker/templates/ibmi_start.j2 | 19 +++++ ansible/roles/jenkins-worker/vars/main.yml | 6 ++ .../package-upgrade/tasks/partials/yum.yml | 2 + ansible/roles/package-upgrade/vars/main.yml | 2 +- jenkins/scripts/select-compiler.sh | 6 ++ 16 files changed, 195 insertions(+), 9 deletions(-) create mode 100644 ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 create mode 100644 ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml create mode 100644 ansible/roles/jenkins-worker/templates/ibmi_start.j2 diff --git a/ansible/MANUAL_STEPS.md b/ansible/MANUAL_STEPS.md index 402a5e8e1..30b9d308c 100644 --- a/ansible/MANUAL_STEPS.md +++ b/ansible/MANUAL_STEPS.md @@ -479,3 +479,15 @@ After these steps are performed and the Pi's are running, Ansible can be run to [Setting up a Windows Host]: https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html [newer Ansible configuration]: https://github.com/nodejs/build/tree/master/ansible [stand-alone]: https://github.com/nodejs/build/tree/master/setup/windows + +## IBMi + +Ansible 2.7.6 is required. + +There isn't a system start service on IBMi -- the machine should not be +rebooted, and after ansible is run, jenkins needs to be started with +jenkins-start.sh, as the iojs user. + +XXX how do people become the iojs user? Probably pre-ansible the +`nodejs_build_test` user's keys need installing as the nodejs and iojs user on +the target box. diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 613c4c5e1..5736e9a8f 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -37,6 +37,10 @@ ansible_python_interpreter = /usr/bin/python3 [hosts:ibm] become_method = sudo +[hosts:iinthecloud] +ansible_become = false +ansible_python_interpreter = /QOpenSys/pkgs/bin/python2 + [hosts:marist] ansible_become = false ansible_python_interpreter = /NODEJS2/python-2017-04-12-py27/python27/bin/python diff --git a/ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 b/ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 new file mode 100644 index 000000000..048e39446 --- /dev/null +++ b/ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 @@ -0,0 +1,3 @@ +--- +secret: "SECRET" +server_jobs: "4" diff --git a/ansible/inventory.yml b/ansible/inventory.yml index 8ea9278d2..e81281446 100644 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -38,6 +38,9 @@ hosts: aix71-ppc64_be-1: {ip: 129.33.196.199, user: b9s010a} rhel7-s390x-1: {ip: 148.100.86.101, user: linux1} + - iinthecloud: + ibmi72-ppc64_be-1: {ip: 65.183.160.62, user: nodejs} + - joyent: smartos15-x64-2: {ip: 165.225.148.139} smartos17-x64-2: {ip: 165.225.149.208} @@ -181,6 +184,10 @@ hosts: macos10.14-x64-1: {ip: 199.7.167.99, port: 8822, user: administrator} macos10.14-x64-2: {ip: 199.7.167.100, port: 8824, user: administrator} + - iinthecloud: + ibmi72-ppc64_be-1: {ip: 65.183.160.52, user: nodejs} + ibmi72-ppc64_be-2: {ip: 65.183.160.59, user: nodejs} + - rackspace: centos7-x64-1: {ip: 119.9.27.82} debian8-x64-1: {ip: 23.253.109.216} diff --git a/ansible/playbooks/jenkins/worker/create.yml b/ansible/playbooks/jenkins/worker/create.yml index f226354c0..24302b455 100644 --- a/ansible/playbooks/jenkins/worker/create.yml +++ b/ansible/playbooks/jenkins/worker/create.yml @@ -84,7 +84,7 @@ - "!test-ibm-ubuntu1804-x64-1" tasks: - name: remove node and npm packages - when: not os|startswith("win") and not os|startswith("zos") + when: not os|startswith("win") and not os|startswith("zos") and not os|startswith("ibmi") package: name: "{{ package }}" state: absent diff --git a/ansible/roles/baselayout/tasks/main.yml b/ansible/roles/baselayout/tasks/main.yml index d18df07ba..a702e3626 100644 --- a/ansible/roles/baselayout/tasks/main.yml +++ b/ansible/roles/baselayout/tasks/main.yml @@ -17,7 +17,7 @@ - name: set hostname when: not os|startswith("smartos") and not os|startswith("zos") - and not os|startswith("macos") and not os|startswith("aix") + and not os|startswith("macos") and not os|startswith("aix") and not os|startswith("ibmi") hostname: name="{{ safe_hostname }}" - name: Set hostname to inventory_hostname macOS @@ -73,7 +73,7 @@ state: absent - name: install packages - when: not os|startswith("zos") and not os|startswith("macos") + when: not os|startswith("zos") and not os|startswith("macos") and not os|startswith("ibmi") package: name="{{ package }}" state=present loop_control: loop_var: package @@ -84,6 +84,28 @@ - "{{ packages[os|stripversion]|default('[]') }}" - "{{ common_packages|default('[]') }}" +- name: install packages IBMi + when: os|startswith("ibmi") + yum: name="{{ package }}" state=present use_backend=yum + loop_control: + loop_var: package + with_items: + # ansible doesn't like empty lists + - "{{ packages[os]|default('[]') }}" + - "{{ packages[os|stripversion]|default('[]') }}" + - "{{ common_packages|default('[]') }}" + +- name: install packages IBMi + when: os|startswith("ibmi") + yum: name="{{ package }}" state=present use_backend=yum + loop_control: + loop_var: package + with_items: + # ansible doesn't like empty lists + - "{{ packages[os]|default('[]') }}" + - "{{ packages[os|stripversion]|default('[]') }}" + - "{{ common_packages|default('[]') }}" + - name: install packages (macos) when: os|startswith("macos") become_user: administrator diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 969dde9ac..586a22c41 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -57,6 +57,25 @@ packages: { 'bash,cmake,gcc-c++,gcc6-c++,tar,unzip,git,make,sudo', ], + # @jgorzins - this works, but @rvagg says doing it as a concatenated string + # as above is _significantly_ faster to execute + ibmi: [ + 'autoconf', + 'automake', + 'ca-certificates-mozilla', + 'ccache', + 'coreutils-gnu', + 'gcc', + 'gcc-cplusplus', + 'gcc-cpp', + 'git', + 'libstdcplusplus-devel', + 'openssl-devel >= 1.1.1', + 'python2-pip', + 'sed-gnu', + 'zlib-devel', + ], + debian7: [ 'gcc-4.8,g++-4.8,sudo', ], diff --git a/ansible/roles/java-base/tasks/main.yml b/ansible/roles/java-base/tasks/main.yml index 6c2004208..831409b85 100644 --- a/ansible/roles/java-base/tasks/main.yml +++ b/ansible/roles/java-base/tasks/main.yml @@ -115,6 +115,12 @@ register: java_exists when: os|startswith("aix") +- name: check if java is installed IBMi + stat: + path: /QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/bin/java + register: java_exists + when: os|startswith("ibmi") + - name: download java AIX get_url: url: https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jre_ppc64_aix_hotspot_8u192b12.tar.gz diff --git a/ansible/roles/jenkins-worker/tasks/main.yml b/ansible/roles/jenkins-worker/tasks/main.yml index 68dbf1f2e..ca5b62dcc 100644 --- a/ansible/roles/jenkins-worker/tasks/main.yml +++ b/ansible/roles/jenkins-worker/tasks/main.yml @@ -25,18 +25,23 @@ when: jobs_env is undefined - name: create group - when: not os|startswith("zos") + when: not os|startswith("zos") and not os|startswith("ibmi") group: name="{{ server_user }}" - name: create user - when: "not os|startswith('zos')" + when: "not os|startswith('zos') and not os|startswith('ibmi')" user: name: "{{ server_user }}" group: "{{ server_user }}" shell: "{{ bash_path[os|stripversion]|default('/bin/bash') }}" +- name: create user for ibmi + when: os|startswith("ibmi") + command: "/QOpenSys/usr/bin/system 'CRTUSRPRF USRPRF({{ server_user }}) PASSWORD(*none)'" + ignore_errors: true + - name: add ::1 to /etc/hosts for ipv6 compat - when: not os|startswith("zos") + when: not os|startswith("zos") and not os|startswith("ibmi") lineinfile: dest: /etc/hosts state: present @@ -46,12 +51,21 @@ file: path="{{ home }}/{{ server_user }}/tmp" state=directory - name: set NODE_TEST_DIR permission and owner + when: not os|startswith("ibmi") file: path: "{{ home }}/{{ server_user }}/tmp" owner: "{{ server_user }}" group: "{{ server_user }}" mode: 0755 +# group has very different meaning on IBMi, only set to the build user +- name: set NODE_TEST_DIR permission and owner IBMi + when: os|startswith("ibmi") + file: + path: "{{ home }}/{{ server_user }}/tmp" + owner: "{{ server_user }}" + mode: 0755 + - name: run raspberry pi jenkins-worker setup when: "inventory_hostname|regex_search('-arm(v6l|v7l|64)_pi')" include: "{{ role_path }}/tasks/partials/raspberry-pi.yml" @@ -133,6 +147,59 @@ command: systemctl restart iptables when: "'rhel7-s390x' in inventory_hostname" +- name: Check if SU is installed on IBMi + when: os|startswith("ibmi") + stat: + path: /QOpenSys/pkgs/bin/su + register: su_exists + +- name: git clone su on ibmi + git: + repo: https://github.com/ThePrez/IBMiOSS-utils.git + dest: /tmp/IBMiOSS-utils + when: su_exists.stat.exists == False and os|startswith("ibmi") + +- name: copy su into /QOpenSys/pkgs/bin IBMi + copy: + src: /tmp/IBMiOSS-utils/su + dest: /QOpenSys/pkgs/bin/su + remote_src: true + when: su_exists.stat.exists == False and os|startswith("ibmi") + +- name: copy su-setup into /QOpenSys/pkgs/bin IBMi + copy: + src: /tmp/IBMiOSS-utils/su-setup + dest: /QOpenSys/pkgs/bin/su-setup + remote_src: true + when: su_exists.stat.exists == False and os|startswith("ibmi") + +- name: Check if SU is installed on IBMi + when: os|startswith("ibmi") + stat: + path: /QOpenSys/pkgs/bin/su + register: su_exists + +# FIXME rewrite jenkins start to use ssh or SBMJOB, so su is not needed. +- name: git clone su on ibmi + git: + repo: https://github.com/ThePrez/IBMiOSS-utils.git + dest: /tmp/IBMiOSS-utils + when: su_exists.stat.exists == False and os|startswith("ibmi") + +- name: copy su into /QOpenSys/pkgs/bin IBMi + copy: + src: /tmp/IBMiOSS-utils/su + dest: /QOpenSys/pkgs/bin/su + remote_src: true + when: su_exists.stat.exists == False and os|startswith("ibmi") + +- name: copy su-setup into /QOpenSys/pkgs/bin IBMi + copy: + src: /tmp/IBMiOSS-utils/su-setup + dest: /QOpenSys/pkgs/bin/su-setup + remote_src: true + when: su_exists.stat.exists == False and os|startswith("ibmi") + - name: download slave.jar when: not os|startswith("zos") get_url: @@ -313,7 +380,11 @@ name: java-base - name: enable jenkins at startup - general - when: not os|startswith("zos") and not os|startswith("macos") and not os|startswith("aix") + when: + - not os|startswith("aix") + - not os|startswith("ibmi") + - not os|startswith("macos") + - not os|startswith("zos") service: name=jenkins state=restarted enabled=yes - name: Unload org.nodejs.osx.jenkins.plist from launchctl diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml new file mode 100644 index 000000000..00f5147f4 --- /dev/null +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml @@ -0,0 +1,9 @@ +--- + +# +# install tap2junit ibmi +# + +- name: install tap2junit + pip: name=tap2junit state=present + executable: pip2 diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml index 58d907a87..d9d9c60cf 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml @@ -5,4 +5,4 @@ # - name: install tap2junit - pip: name=tap2junit state=present \ No newline at end of file + pip: name=tap2junit state=present diff --git a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 new file mode 100644 index 000000000..311faf56e --- /dev/null +++ b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 @@ -0,0 +1,19 @@ +#!/QOpenSys/pkgs/bin/bash +SBMJOB_OPTS="JOB(JENKINS_CI) USER(IOJS)" + +export PATH=/QOpenSys/pkgs/lib/ccache:/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin +export PASE_PATH=$PATH +export JENKS_HOME={{ home }}/{{ server_user }} +export NODE_COMMON_PIPE="$HOME/test.pipe" +export NODE_TEST_DIR="$HOME/tmp" +export JOBS=4 +export OSTYPE=ibmi +export QIBM_USE_DESCRIPTOR_STDIO=N + +unset LC_ALL + +export START_CMD="{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} -jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp >{{ home }}/{{ server_user }}/jenkins.log 2>&1 " + +echo $START_CMD + +exec /QOpenSys/usr/bin/system -kpiveO "SBMJOB CMD(CALL PGM(QP2SHELL2) PARM('/QOpenSys/usr/bin/sh' '-c' 'echo starting Jenkins slave && cd $JENKS_HOME && env && exec $START_CMD')) CPYENVVAR(*YES) PRTDEV(*USRPRF) ALWMLTTHD(*YES) $SBMJOB_OPTS" diff --git a/ansible/roles/jenkins-worker/vars/main.yml b/ansible/roles/jenkins-worker/vars/main.yml index 76844c6d1..5d744cbed 100644 --- a/ansible/roles/jenkins-worker/vars/main.yml +++ b/ansible/roles/jenkins-worker/vars/main.yml @@ -9,6 +9,7 @@ init: { centos6: 'centos6', debian: 'debian7', freebsd: 'freebsd', + ibmi: 'ibmi72', macos: 'macos', rhel7: 'rhel7', systemd: ['centos7', 'debian8', 'debian9', 'debian10', 'fedora', 'ubuntu1604', 'ubuntu1804'], @@ -69,6 +70,10 @@ jenkins_init: { dest: '{{ home }}/{{ server_user }}/start.sh', src: 'zos_start.j2' }, + ibmi: { + dest: '{{ home }}/{{ server_user }}/jenkins-start.sh', + src: 'ibmi_start.j2' + }, } # if you fail here, it means it cant map your os or os family to a init system @@ -86,6 +91,7 @@ needs_monit: [ java_path: { 'aix71': '/home/iojs/jdk8u192-b12-jre/bin/java', 'aix72': '/home/iojs/jdk8u192-b12-jre/bin/java', + 'ibmi72': '/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/bin/java', 'macos10.10': 'java', 'macos10.11': 'java', 'macos10.12': 'java', diff --git a/ansible/roles/package-upgrade/tasks/partials/yum.yml b/ansible/roles/package-upgrade/tasks/partials/yum.yml index 5556d23fa..f4cd2c5c8 100644 --- a/ansible/roles/package-upgrade/tasks/partials/yum.yml +++ b/ansible/roles/package-upgrade/tasks/partials/yum.yml @@ -6,3 +6,5 @@ - name: upgrade installed packages yum: name=* state=latest +# XXX might have needed `use_backend=yum` at end of last line, but prob +# not, was a workaround for a fixed path problem diff --git a/ansible/roles/package-upgrade/vars/main.yml b/ansible/roles/package-upgrade/vars/main.yml index c2efea3a1..186cfcb34 100644 --- a/ansible/roles/package-upgrade/vars/main.yml +++ b/ansible/roles/package-upgrade/vars/main.yml @@ -5,7 +5,7 @@ # pm: { - 'yum': ['centos', 'rhel7', 'aix'], + 'yum': ['centos', 'rhel7', 'aix', 'ibmi'], 'apt': ['debian', 'ubuntu'], 'dnf': 'fedora', 'pkg': 'freebsd', diff --git a/jenkins/scripts/select-compiler.sh b/jenkins/scripts/select-compiler.sh index b221ca776..203592562 100644 --- a/jenkins/scripts/select-compiler.sh +++ b/jenkins/scripts/select-compiler.sh @@ -22,6 +22,7 @@ if [ "$DONTSELECT_COMPILER" != "DONT" ]; then *aix* ) SELECT_ARCH=AIXPPC ;; *x64* ) SELECT_ARCH=X64 ;; *arm64* ) SELECT_ARCH=ARM64 ;; + *ibmi72* ) SELECT_ARCH=IBMI72 ;; esac fi @@ -89,6 +90,11 @@ elif [ "$SELECT_ARCH" = "S390X" ]; then echo "Compiler set to $COMPILER_LEVEL" fi +elif [ "$SELECT_ARCH" = "IBMI72" ]; then + echo "Setting compiler for Node version $NODEJS_MAJOR_VERSION on IBMI72" + export PATH="/QOpenSys/pkgs/lib/ccache:$PATH" + echo "Compiler left as system default (6.3)" + elif [ "$SELECT_ARCH" = "AIXPPC" ]; then case $NODE_NAME in *aix72* ) From 43498edb9cc928f7754bdc813e77aba1b1ee9fac Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Tue, 12 May 2020 15:01:03 -0700 Subject: [PATCH 02/22] fixup! Add new IBM i system --- ansible/roles/package-upgrade/tasks/partials/yum.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/package-upgrade/tasks/partials/yum.yml b/ansible/roles/package-upgrade/tasks/partials/yum.yml index f4cd2c5c8..54768ec05 100644 --- a/ansible/roles/package-upgrade/tasks/partials/yum.yml +++ b/ansible/roles/package-upgrade/tasks/partials/yum.yml @@ -5,6 +5,6 @@ # - name: upgrade installed packages - yum: name=* state=latest + yum: name=* state=latest use_backend=yum # XXX might have needed `use_backend=yum` at end of last line, but prob # not, was a workaround for a fixed path problem From fe606a4800aea945f8741b623e25eef599c80971 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Tue, 12 May 2020 21:30:28 -0500 Subject: [PATCH 03/22] Add "creates" arg for IOJS usr creation --- ansible/roles/jenkins-worker/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/jenkins-worker/tasks/main.yml b/ansible/roles/jenkins-worker/tasks/main.yml index ca5b62dcc..c236360bc 100644 --- a/ansible/roles/jenkins-worker/tasks/main.yml +++ b/ansible/roles/jenkins-worker/tasks/main.yml @@ -38,7 +38,8 @@ - name: create user for ibmi when: os|startswith("ibmi") command: "/QOpenSys/usr/bin/system 'CRTUSRPRF USRPRF({{ server_user }}) PASSWORD(*none)'" - ignore_errors: true + args: + creates: "/QSYS.LIB/IOJS.USRPRF" - name: add ::1 to /etc/hosts for ipv6 compat when: not os|startswith("zos") and not os|startswith("ibmi") From 45ce2cb76368a707e0b8175258e95521889ca99e Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Tue, 12 May 2020 21:40:02 -0500 Subject: [PATCH 04/22] fixup tap2junit executable --- .../roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml index 00f5147f4..edab7e25c 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml @@ -5,5 +5,7 @@ # - name: install tap2junit - pip: name=tap2junit state=present - executable: pip2 + pip: + name: tap2junit + state: present + executable: /QOpenSys/pkgs/bin/pip2 From 7ac058b880d0c24488b6e0a2dff0bf36d847f98c Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Tue, 12 May 2020 21:45:16 -0500 Subject: [PATCH 05/22] Switch to Python 3 --- ansible/ansible.cfg | 2 +- ansible/roles/baselayout/vars/main.yml | 2 +- ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 5736e9a8f..2cceadc3a 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -39,7 +39,7 @@ become_method = sudo [hosts:iinthecloud] ansible_become = false -ansible_python_interpreter = /QOpenSys/pkgs/bin/python2 +ansible_python_interpreter = /QOpenSys/pkgs/bin/python3 [hosts:marist] ansible_become = false diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 586a22c41..4a2ce18ef 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -71,7 +71,7 @@ packages: { 'git', 'libstdcplusplus-devel', 'openssl-devel >= 1.1.1', - 'python2-pip', + 'python3-pip', 'sed-gnu', 'zlib-devel', ], diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml index edab7e25c..3909b07a2 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml @@ -8,4 +8,4 @@ pip: name: tap2junit state: present - executable: /QOpenSys/pkgs/bin/pip2 + executable: /QOpenSys/pkgs/bin/pip3 From 752f36bb578729dac30b23d502394815da5195a5 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Tue, 12 May 2020 21:50:07 -0500 Subject: [PATCH 06/22] Remove IBM i "su" --- ansible/roles/jenkins-worker/tasks/main.yml | 53 --------------------- 1 file changed, 53 deletions(-) diff --git a/ansible/roles/jenkins-worker/tasks/main.yml b/ansible/roles/jenkins-worker/tasks/main.yml index c236360bc..e019cbd0f 100644 --- a/ansible/roles/jenkins-worker/tasks/main.yml +++ b/ansible/roles/jenkins-worker/tasks/main.yml @@ -148,59 +148,6 @@ command: systemctl restart iptables when: "'rhel7-s390x' in inventory_hostname" -- name: Check if SU is installed on IBMi - when: os|startswith("ibmi") - stat: - path: /QOpenSys/pkgs/bin/su - register: su_exists - -- name: git clone su on ibmi - git: - repo: https://github.com/ThePrez/IBMiOSS-utils.git - dest: /tmp/IBMiOSS-utils - when: su_exists.stat.exists == False and os|startswith("ibmi") - -- name: copy su into /QOpenSys/pkgs/bin IBMi - copy: - src: /tmp/IBMiOSS-utils/su - dest: /QOpenSys/pkgs/bin/su - remote_src: true - when: su_exists.stat.exists == False and os|startswith("ibmi") - -- name: copy su-setup into /QOpenSys/pkgs/bin IBMi - copy: - src: /tmp/IBMiOSS-utils/su-setup - dest: /QOpenSys/pkgs/bin/su-setup - remote_src: true - when: su_exists.stat.exists == False and os|startswith("ibmi") - -- name: Check if SU is installed on IBMi - when: os|startswith("ibmi") - stat: - path: /QOpenSys/pkgs/bin/su - register: su_exists - -# FIXME rewrite jenkins start to use ssh or SBMJOB, so su is not needed. -- name: git clone su on ibmi - git: - repo: https://github.com/ThePrez/IBMiOSS-utils.git - dest: /tmp/IBMiOSS-utils - when: su_exists.stat.exists == False and os|startswith("ibmi") - -- name: copy su into /QOpenSys/pkgs/bin IBMi - copy: - src: /tmp/IBMiOSS-utils/su - dest: /QOpenSys/pkgs/bin/su - remote_src: true - when: su_exists.stat.exists == False and os|startswith("ibmi") - -- name: copy su-setup into /QOpenSys/pkgs/bin IBMi - copy: - src: /tmp/IBMiOSS-utils/su-setup - dest: /QOpenSys/pkgs/bin/su-setup - remote_src: true - when: su_exists.stat.exists == False and os|startswith("ibmi") - - name: download slave.jar when: not os|startswith("zos") get_url: From 3b28da3a1f327822d1412d1b952af0774344179b Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Tue, 12 May 2020 19:51:39 -0700 Subject: [PATCH 07/22] fixup! fixup! Add new IBM i system --- ansible/roles/baselayout/vars/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 4a2ce18ef..73efd45f8 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -70,7 +70,7 @@ packages: { 'gcc-cpp', 'git', 'libstdcplusplus-devel', - 'openssl-devel >= 1.1.1', + 'openssl-devel', 'python3-pip', 'sed-gnu', 'zlib-devel', From ffd154e82cfaa86ca0b3020e38dc6223fd7349c0 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Tue, 12 May 2020 22:17:25 -0500 Subject: [PATCH 08/22] Back to Python 2 for now --- ansible/ansible.cfg | 2 +- ansible/roles/baselayout/vars/main.yml | 2 +- ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg index 2cceadc3a..5736e9a8f 100644 --- a/ansible/ansible.cfg +++ b/ansible/ansible.cfg @@ -39,7 +39,7 @@ become_method = sudo [hosts:iinthecloud] ansible_become = false -ansible_python_interpreter = /QOpenSys/pkgs/bin/python3 +ansible_python_interpreter = /QOpenSys/pkgs/bin/python2 [hosts:marist] ansible_become = false diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 73efd45f8..8b5405ec1 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -71,7 +71,7 @@ packages: { 'git', 'libstdcplusplus-devel', 'openssl-devel', - 'python3-pip', + 'python2-pip', 'sed-gnu', 'zlib-devel', ], diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml index 3909b07a2..edab7e25c 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ibmi.yml @@ -8,4 +8,4 @@ pip: name: tap2junit state: present - executable: /QOpenSys/pkgs/bin/pip3 + executable: /QOpenSys/pkgs/bin/pip2 From 119327433263df0518f60311eb8f3b7ae5970e6e Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Tue, 12 May 2020 22:31:56 -0500 Subject: [PATCH 09/22] Remove repeated "install packages IBMi" --- ansible/roles/baselayout/tasks/main.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ansible/roles/baselayout/tasks/main.yml b/ansible/roles/baselayout/tasks/main.yml index a702e3626..418b38c08 100644 --- a/ansible/roles/baselayout/tasks/main.yml +++ b/ansible/roles/baselayout/tasks/main.yml @@ -95,17 +95,6 @@ - "{{ packages[os|stripversion]|default('[]') }}" - "{{ common_packages|default('[]') }}" -- name: install packages IBMi - when: os|startswith("ibmi") - yum: name="{{ package }}" state=present use_backend=yum - loop_control: - loop_var: package - with_items: - # ansible doesn't like empty lists - - "{{ packages[os]|default('[]') }}" - - "{{ packages[os|stripversion]|default('[]') }}" - - "{{ common_packages|default('[]') }}" - - name: install packages (macos) when: os|startswith("macos") become_user: administrator From 7a6819c7cae76184f598b937f4ae3b22e2b25607 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Wed, 13 May 2020 10:36:26 -0500 Subject: [PATCH 10/22] Use QSH instead of QP2SHELL2 to have descriptors set up, check if job already running --- ansible/roles/jenkins-worker/templates/ibmi_start.j2 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 index 311faf56e..24fea0d17 100644 --- a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 +++ b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 @@ -1,5 +1,6 @@ #!/QOpenSys/pkgs/bin/bash -SBMJOB_OPTS="JOB(JENKINS_CI) USER(IOJS)" +CIJOBNAME="JENKINS_CI" +SBMJOB_OPTS="JOB($CIJOBNAME) USER(IOJS)" export PATH=/QOpenSys/pkgs/lib/ccache:/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin export PASE_PATH=$PATH @@ -12,8 +13,14 @@ export QIBM_USE_DESCRIPTOR_STDIO=N unset LC_ALL +if [[ $(/QOpenSys/usr/bin/system "WRKACTJOB JOB($CIJOBNAME)" | grep -i $CIJOBNAME | wc -l) != "1" ]] +then + echo "Job already running" + exit 1 +fi + export START_CMD="{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} -jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp >{{ home }}/{{ server_user }}/jenkins.log 2>&1 " echo $START_CMD -exec /QOpenSys/usr/bin/system -kpiveO "SBMJOB CMD(CALL PGM(QP2SHELL2) PARM('/QOpenSys/usr/bin/sh' '-c' 'echo starting Jenkins slave && cd $JENKS_HOME && env && exec $START_CMD')) CPYENVVAR(*YES) PRTDEV(*USRPRF) ALWMLTTHD(*YES) $SBMJOB_OPTS" +exec /QOpenSys/usr/bin/system -v -kpiveO "SBMJOB CMD(QSH CMD('echo starting Jenkins slave && cd $JENKS_HOME && env && exec $START_CMD')) CPYENVVAR(*YES) PRTDEV(*USRPRF) ALWMLTTHD(*YES) $SBMJOB_OPTS" From 43303f88f37882ca242c64fc46c2369d504d50e9 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Wed, 13 May 2020 10:40:26 -0500 Subject: [PATCH 11/22] fixup QIBM_USE_DESCRIPTOR_STDIO --- ansible/roles/jenkins-worker/templates/ibmi_start.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 index 24fea0d17..f4552abaa 100644 --- a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 +++ b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 @@ -9,7 +9,7 @@ export NODE_COMMON_PIPE="$HOME/test.pipe" export NODE_TEST_DIR="$HOME/tmp" export JOBS=4 export OSTYPE=ibmi -export QIBM_USE_DESCRIPTOR_STDIO=N +export QIBM_USE_DESCRIPTOR_STDIO=Y unset LC_ALL From 590e1a29b39a8fe50aac1c9387aff2e4bb990df3 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Thu, 14 May 2020 11:31:33 -0500 Subject: [PATCH 12/22] set os400.stdio.convert Java property --- ansible/roles/jenkins-worker/templates/ibmi_start.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 index f4552abaa..5a7a57e29 100644 --- a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 +++ b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 @@ -19,7 +19,7 @@ then exit 1 fi -export START_CMD="{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} -jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp >{{ home }}/{{ server_user }}/jenkins.log 2>&1 " +export START_CMD="{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} -Dos400.stdio.convert=N -jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp >{{ home }}/{{ server_user }}/jenkins.log 2>&1 " echo $START_CMD From 782c9a8ec263d3596a674f6cda9fcabd7fd4c763 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Tue, 19 May 2020 09:37:52 -0500 Subject: [PATCH 13/22] Add manual steps for IBM i --- ansible/MANUAL_STEPS.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/ansible/MANUAL_STEPS.md b/ansible/MANUAL_STEPS.md index 30b9d308c..ab001cdd6 100644 --- a/ansible/MANUAL_STEPS.md +++ b/ansible/MANUAL_STEPS.md @@ -480,14 +480,33 @@ After these steps are performed and the Pi's are running, Ansible can be run to [newer Ansible configuration]: https://github.com/nodejs/build/tree/master/ansible [stand-alone]: https://github.com/nodejs/build/tree/master/setup/windows -## IBMi +## IBM i Ansible 2.7.6 is required. There isn't a system start service on IBMi -- the machine should not be rebooted, and after ansible is run, jenkins needs to be started with -jenkins-start.sh, as the iojs user. +jenkins-start.sh. This will submit the job under the iojs user -XXX how do people become the iojs user? Probably pre-ansible the -`nodejs_build_test` user's keys need installing as the nodejs and iojs user on -the target box. +The following manual steps must be done to set + +### Install open source ecosystem +See http://ibm.biz/ibmi-rpms (see "Installation" section) + +## Set global PATH to use Open Source Ecosystem +Edit `/QOpenSys/etc/profile` to contain: +``` +PATH=/QOpenSys/pkgs/bin:$PATH +export PATH +``` +This can be done by running the following commands from a shell: +``` +echo 'PATH=/QOpenSys/pkgs/bin:$PATH' >> /QOpenSys/etc/profile +echo 'export PATH' >> /QOpenSys/etc/profile +``` + +## Use bash as the default shell (maintainer convenience only) +``` +yum install chsh +chsh -s /QOpenSys/pkgs/bin/bash +``` From 5779d6ee0ed13942bff5d81174331419bf468393 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Fri, 15 May 2020 08:58:37 -0500 Subject: [PATCH 14/22] Fix $HOME issue for ccache --- ansible/roles/jenkins-worker/templates/ibmi_start.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 index 5a7a57e29..09b3d8446 100644 --- a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 +++ b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 @@ -10,6 +10,7 @@ export NODE_TEST_DIR="$HOME/tmp" export JOBS=4 export OSTYPE=ibmi export QIBM_USE_DESCRIPTOR_STDIO=Y +export HOME=/home/IOJS unset LC_ALL From fe07569d2571f6fd40e8b636f3ffdf6bc08a03fc Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Fri, 15 May 2020 12:09:52 -0500 Subject: [PATCH 15/22] fixup! $JENKS_HOME/$HOME setting --- ansible/roles/jenkins-worker/templates/ibmi_start.j2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 index 09b3d8446..08df232e2 100644 --- a/ansible/roles/jenkins-worker/templates/ibmi_start.j2 +++ b/ansible/roles/jenkins-worker/templates/ibmi_start.j2 @@ -4,13 +4,12 @@ SBMJOB_OPTS="JOB($CIJOBNAME) USER(IOJS)" export PATH=/QOpenSys/pkgs/lib/ccache:/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin export PASE_PATH=$PATH -export JENKS_HOME={{ home }}/{{ server_user }} +export HOME={{ home }}/{{ server_user }} export NODE_COMMON_PIPE="$HOME/test.pipe" export NODE_TEST_DIR="$HOME/tmp" export JOBS=4 export OSTYPE=ibmi export QIBM_USE_DESCRIPTOR_STDIO=Y -export HOME=/home/IOJS unset LC_ALL @@ -24,4 +23,4 @@ export START_CMD="{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} -Dos4 echo $START_CMD -exec /QOpenSys/usr/bin/system -v -kpiveO "SBMJOB CMD(QSH CMD('echo starting Jenkins slave && cd $JENKS_HOME && env && exec $START_CMD')) CPYENVVAR(*YES) PRTDEV(*USRPRF) ALWMLTTHD(*YES) $SBMJOB_OPTS" +exec /QOpenSys/usr/bin/system -v -kpiveO "SBMJOB CMD(QSH CMD('echo starting Jenkins slave && cd $HOME && env && exec $START_CMD')) CPYENVVAR(*YES) PRTDEV(*USRPRF) ALWMLTTHD(*YES) $SBMJOB_OPTS" From 85246c21d58e9b2561ff96c7bc4521d72090fa8a Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 19 May 2020 14:09:10 +0100 Subject: [PATCH 16/22] fixup! Add new IBM i system --- ansible/roles/baselayout/vars/main.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 8b5405ec1..bf1f85564 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -57,23 +57,8 @@ packages: { 'bash,cmake,gcc-c++,gcc6-c++,tar,unzip,git,make,sudo', ], - # @jgorzins - this works, but @rvagg says doing it as a concatenated string - # as above is _significantly_ faster to execute ibmi: [ - 'autoconf', - 'automake', - 'ca-certificates-mozilla', - 'ccache', - 'coreutils-gnu', - 'gcc', - 'gcc-cplusplus', - 'gcc-cpp', - 'git', - 'libstdcplusplus-devel', - 'openssl-devel', - 'python2-pip', - 'sed-gnu', - 'zlib-devel', + 'autoconf,automake,ca-certificates-mozilla,ccache,cmake,coreutils-gnu,gcc,gcc-cplusplus,gcc-cpp,git,libstdcplusplus-devel,m4-gnu,openssl-devel,python2-pip,sed-gnu,zlib-devel', ], debian7: [ From 3bb367699cfad004a6ffc0d43e91b76c4bf4c1b2 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Wed, 20 May 2020 10:33:15 -0400 Subject: [PATCH 17/22] fixup! Add new IBM i system --- ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 diff --git a/ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 b/ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 deleted file mode 100644 index 048e39446..000000000 --- a/ansible/host_vars/test-iinthecloud-ibmi72-ppc64_be-1 +++ /dev/null @@ -1,3 +0,0 @@ ---- -secret: "SECRET" -server_jobs: "4" From 34727976e9b7d1cf1a61f3b945192a860fbd5571 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Thu, 21 May 2020 12:56:36 -0500 Subject: [PATCH 18/22] Update comment with more detail on use_backend issue Co-authored-by: Sam Roberts --- ansible/roles/package-upgrade/tasks/partials/yum.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/package-upgrade/tasks/partials/yum.yml b/ansible/roles/package-upgrade/tasks/partials/yum.yml index 54768ec05..3420656d8 100644 --- a/ansible/roles/package-upgrade/tasks/partials/yum.yml +++ b/ansible/roles/package-upgrade/tasks/partials/yum.yml @@ -7,4 +7,5 @@ - name: upgrade installed packages yum: name=* state=latest use_backend=yum # XXX might have needed `use_backend=yum` at end of last line, but prob -# not, was a workaround for a fixed path problem +# If difficulty recognizing yum is encountered, see https://github.com/ansible/ansible/pull/69484, it is possible +# to apply that patch manually to a local install of ansible (if necessary). From 91fb0a94141fe1c9ff6a78962266311b79f69734 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Thu, 21 May 2020 12:57:00 -0500 Subject: [PATCH 19/22] Remove defunct comment Co-authored-by: Sam Roberts --- ansible/roles/package-upgrade/tasks/partials/yum.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/package-upgrade/tasks/partials/yum.yml b/ansible/roles/package-upgrade/tasks/partials/yum.yml index 3420656d8..712c03b9c 100644 --- a/ansible/roles/package-upgrade/tasks/partials/yum.yml +++ b/ansible/roles/package-upgrade/tasks/partials/yum.yml @@ -6,6 +6,5 @@ - name: upgrade installed packages yum: name=* state=latest use_backend=yum -# XXX might have needed `use_backend=yum` at end of last line, but prob # If difficulty recognizing yum is encountered, see https://github.com/ansible/ansible/pull/69484, it is possible # to apply that patch manually to a local install of ansible (if necessary). From a1a8ea717c9ac2e344c09c8c061ebc861e55a7cd Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Thu, 21 May 2020 12:57:41 -0500 Subject: [PATCH 20/22] Remove redundant "manual steps" phrase Co-authored-by: Sam Roberts --- ansible/MANUAL_STEPS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/MANUAL_STEPS.md b/ansible/MANUAL_STEPS.md index ab001cdd6..d03317bf8 100644 --- a/ansible/MANUAL_STEPS.md +++ b/ansible/MANUAL_STEPS.md @@ -488,7 +488,6 @@ There isn't a system start service on IBMi -- the machine should not be rebooted, and after ansible is run, jenkins needs to be started with jenkins-start.sh. This will submit the job under the iojs user -The following manual steps must be done to set ### Install open source ecosystem See http://ibm.biz/ibmi-rpms (see "Installation" section) From 43f7fec155c434b3c42ca64d95c05e88f1abf814 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Thu, 21 May 2020 13:12:41 -0500 Subject: [PATCH 21/22] Cleanup IBM i manual steps --- ansible/MANUAL_STEPS.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/ansible/MANUAL_STEPS.md b/ansible/MANUAL_STEPS.md index d03317bf8..2f09daff4 100644 --- a/ansible/MANUAL_STEPS.md +++ b/ansible/MANUAL_STEPS.md @@ -24,7 +24,7 @@ * [SmartOS](#smartos) * [Raspberry Pi](#raspberry-pi) * [NFS boot](#nfs-boot) - +* [IBM i](#ibm-i) ## Adding firewall entries for Jenkins workers @@ -482,17 +482,23 @@ After these steps are performed and the Pi's are running, Ansible can be run to ## IBM i -Ansible 2.7.6 is required. - There isn't a system start service on IBMi -- the machine should not be rebooted, and after ansible is run, jenkins needs to be started with -jenkins-start.sh. This will submit the job under the iojs user +`jenkins-start.sh`. This will submit the job under the iojs user. If the +job is already running, the `jenkins-start.sh` script will not start +another job. ### Install open source ecosystem See http://ibm.biz/ibmi-rpms (see "Installation" section) -## Set global PATH to use Open Source Ecosystem +### Create Nodejs user's home directory +``` +mkdir -p /home/NODEJS +chown -R nodejs /home/NODEJS +``` + +### Set global PATH and .bashrc to use Open Source Ecosystem Edit `/QOpenSys/etc/profile` to contain: ``` PATH=/QOpenSys/pkgs/bin:$PATH @@ -503,9 +509,17 @@ This can be done by running the following commands from a shell: echo 'PATH=/QOpenSys/pkgs/bin:$PATH' >> /QOpenSys/etc/profile echo 'export PATH' >> /QOpenSys/etc/profile ``` +After that is completed, copy to the `.bashrc` file for the nodejs user +`cp /QOpenSys/etc/profile /home/NODEJS/.bashrc` -## Use bash as the default shell (maintainer convenience only) +### Use bash as the default shell (maintainer convenience only) ``` yum install chsh chsh -s /QOpenSys/pkgs/bin/bash ``` + +### Install Ansible version 2.7.6 + +Ansible 2.7.6 is required, until the resolution of [this issue](https://github.com/ansible/ansible/issues/64031). + +`pip3 install ansible==2.7.6` From 7841b2031ba9fecc2acc207f4a33f9e326ac9ff8 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski Date: Thu, 21 May 2020 13:43:27 -0500 Subject: [PATCH 22/22] Remove Ansible 2.7.6 requirement for ibmi --- ansible/MANUAL_STEPS.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ansible/MANUAL_STEPS.md b/ansible/MANUAL_STEPS.md index 2f09daff4..bccceba29 100644 --- a/ansible/MANUAL_STEPS.md +++ b/ansible/MANUAL_STEPS.md @@ -517,9 +517,3 @@ After that is completed, copy to the `.bashrc` file for the nodejs user yum install chsh chsh -s /QOpenSys/pkgs/bin/bash ``` - -### Install Ansible version 2.7.6 - -Ansible 2.7.6 is required, until the resolution of [this issue](https://github.com/ansible/ansible/issues/64031). - -`pip3 install ansible==2.7.6`