Skip to content

Commit fb3cf9f

Browse files
committed
Support AIX7.2 build machines
1 parent 8f8d0ae commit fb3cf9f

File tree

6 files changed

+273
-17
lines changed

6 files changed

+273
-17
lines changed

ansible/inventory.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ hosts:
144144
win10-arm64-2: { vs: '2017' }
145145

146146
- osuosl:
147+
# secret for -1 was compromised, do not use -1 name
148+
aix72-ppc64_be-2: {ip: 140.211.9.30}
147149
aix61-ppc64_be-1: {ip: 140.211.9.101}
148150
aix61-ppc64_be-2: {ip: 140.211.9.100}
149151
aix61-ppc64_be-3: {ip: 140.211.9.77}
Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,35 @@
1-
#!/bin/sh
2-
export HOME={{ home }}/{{ server_user }}
3-
export NODE_TEST_DIR="$HOME/tmp"
4-
export JOBS="{{ jobs_env }}"
1+
#!/bin/ksh
52

6-
export OSTYPE=aix
7-
export ARCH=ppc64
8-
export DESTCPU=ppc64
3+
##################################################
4+
# name: S20jenkins
5+
# purpose: script that will start or stop jenkins
6+
##################################################
97

10-
{{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} \
11-
-jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} \
12-
-jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp
8+
9+
# (@sam-github) Purpose of java in PATH unknown, since an explicit path to
10+
# java is used to run jenkins.
11+
case "$1" in
12+
start )
13+
su - {{server_user}} -c '\
14+
ulimit -c 0; \
15+
ulimit -d unlimited; \
16+
ulimit -m unlimited; \
17+
export TERM=ansi; \
18+
export jenkins_log_file="/home/{{server_user}}/jenkins_console.log"; \
19+
export PATH=/home/{{server_user}}/jdk8u192-b12-jre/jre/bin:$PATH; \
20+
export HOME=/home/{{server_user}}; \
21+
export NODE_TEST_DIR=$HOME/tmp; \
22+
export NODE_COMMON_PIPE="$HOME/test.pipe"; \
23+
export OSTYPE=AIX72; \
24+
export GIT_SSL_CAINFO="$HOME/ca-bundle.crt"; \
25+
export SSL_CERT_FILE="$HOME/ca-bundle.crt"; \
26+
/home/{{server_user}}/jdk8u192-b12-jre/bin/java -Xmx128m -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30 -jar "$HOME/slave.jar" \
27+
-secret {{secret}} \
28+
-jnlpUrl {{jenkins_url}}/computer/{{inventory_hostname}}/slave-agent.jnlp >$jenkins_log_file 2>&1 &'
29+
;;
30+
stop )
31+
;;
32+
* )
33+
echo "Usage: $0 (start | stop)"
34+
exit 1
35+
esac

ansible/roles/jenkins-worker/vars/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
init: {
8-
aix: 'aix71',
8+
aix: ['aix71', 'aix72'],
99
centos5: 'centos5',
1010
centos6: 'centos6',
1111
debian: ['debian7', 'ubuntu1204'],
@@ -20,7 +20,7 @@ init: {
2020

2121
jenkins_init: {
2222
aix: {
23-
dest: '/etc/rc.d/rc2.d/Sjenkins',
23+
dest: '/etc/rc.d/rc2.d/S20jenkins',
2424
src: 'aix.rc2.j2',
2525
mode: '0555'
2626
},
@@ -92,6 +92,7 @@ needs_monit: [
9292
# some os'es needs different paths to java. add them here.
9393
java_path: {
9494
'aix71': '/home/iojs/jdk8u192-b12-jre/bin/java',
95+
'aix72': '/home/iojs/jdk8u192-b12-jre/bin/java',
9596
'macos10.10': 'java',
9697
'macos10.11': 'java',
9798
'macos10.12': 'java',

jenkins/scripts/select-compiler.sh

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/bash
22

3+
# Notes and warnings:
4+
# - ccache and CC: v8 builds (at least) depend on the ability to be able to do
5+
# `ln -s $CC some/place` (but only on some plaforms), so the
6+
# `export CC="ccache /a/gcc-version/cc"` idiom breaks those builds. The best
7+
# way to do ccache is to push `/path/to/gcc-version` on to the front of PATH,
8+
# then push a `/path/to/ccache/wrappers` in front of the compiler path.
9+
310
if [ "$DONTSELECT_COMPILER" != "DONT" ]; then
411
NODE_NAME=${NODE_NAME:-$HOSTNAME}
512
echo "Selecting compiler based on $NODE_NAME"
@@ -28,7 +35,7 @@ if [ "$SELECT_ARCH" = "PPC64LE" ]; then
2835
# Setup devtoolset-6, sets LD_LIBRARY_PATH, PATH, etc.
2936
. /opt/rh/devtoolset-6/enable
3037
echo "Compiler set to devtoolset-6"
31-
return
38+
return
3239
fi
3340
;;
3441
esac
@@ -73,16 +80,36 @@ elif [ "$SELECT_ARCH" = "S390X" ]; then
7380
fi
7481

7582
elif [ "$SELECT_ARCH" = "AIXPPC" ]; then
76-
# get node version
77-
echo "Setting compiler for Node version $NODEJS_MAJOR_VERSION on AIX"
83+
case $NODE_NAME in
84+
*aix72* )
85+
echo "Setting compiler for Node version $NODEJS_MAJOR_VERSION on AIX72"
86+
87+
if [ "$NODEJS_MAJOR_VERSION" -gt "9" ]; then
88+
export LIBPATH=/opt/gcc-6.3/lib/gcc/powerpc-ibm-aix7.2.0.0/6.3.0/pthread/ppc64:/opt/gcc-6.3/lib
89+
export PATH="/opt/ccache-3.7.4/libexec:/opt/gcc-6.3/bin:$PATH"
90+
export CC="gcc" CXX="g++" CXX_host="g++"
91+
echo "Compiler set to 6.3"
92+
return
93+
else
94+
echo "Compiler left as system default:" `g++ -dumpversion`
95+
return
96+
fi
97+
;;
98+
esac
99+
100+
echo "Setting compiler for Node version $NODEJS_MAJOR_VERSION on AIX61"
78101

79102
if [ "$NODEJS_MAJOR_VERSION" -gt "9" ]; then
80103
export LIBPATH=/home/iojs/gmake/opt/freeware/lib:/home/iojs/gcc-6.3.0-1/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/pthread/ppc64:/home/iojs/gcc-6.3.0-1/opt/freeware/lib
81104
export PATH="/home/iojs/gcc-6.3.0-1/opt/freeware/bin:$PATH"
82105
export CC="ccache `which gcc`" CXX="ccache `which g++`" CXX_host="ccache `which g++`"
106+
# TODO(sam-github): configure ccache by pushing /opt/freeware/bin/ccache on
107+
# front of PATH
83108
echo "Compiler set to 6.3"
84109
else
85110
export CC="ccache `which gcc`" CXX="ccache `which g++`" CXX_host="ccache `which g++`"
111+
# TODO(sam-github): configure ccache by pushing /opt/freeware/bin/ccache on
112+
# front of PATH
86113
echo "Compiler set to default at 4.8.5"
87114
fi
88115
fi

setup/aix61/manualBootstrap.md

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ chfs -a size=+1300000 /opt
1111
chfs -a size=+250000 /
1212
```
1313

14+
AIX72: unneeded: -1 and -2 and aix7-2 have different sizes, and 7.2 is big
15+
enough already:
16+
17+
6.1-1 6.1-2 7.2-2
18+
/opt: 3670016 x 512, 2228224 31457280
19+
/: 3538944 x 512, 3407872 4194304
20+
1421
## Install required packages
1522

23+
AIX72: unneeded, package were installed by yum
24+
1625
#### curl, unzip
1726

1827
Download and scp to the machine:
@@ -26,11 +35,13 @@ rpm -ivh curl-7.44.0-2.aix6.1.ppc.rpm
2635
rpm -i unzip-6.0-3.aix6.1.ppc.rpm
2736
```
2837

29-
#### gcc
38+
#### gcc 4.8.5 on AIX6.1
3039

3140
Download and scp to the machine:
3241
http://www.bullfreeware.com/affichage.php?id=2378
3342

43+
Note that install-gcc-rpm.sh is in setup/aix61/resources
44+
3445
```bash
3546
mkdir gcc
3647
cd gcc
@@ -45,6 +56,8 @@ rm -rf gcc
4556

4657
#### git-tools
4758

59+
AIX72: unneeded, installed with yum
60+
4861
```bash
4962
mkdir git-tools
5063
cd git-tools
@@ -59,13 +72,17 @@ rm -rf git-tools
5972

6073
#### git
6174

75+
AIX72: unneeded, installed with yum
76+
6277
```bash
6378
LIBPATH=/usr/lib curl --insecure -O https://ci.nodejs.org/downloads/aix/git-2.8.1-1.aix6.1.ppc.rpm
6479
rpm -ivh git-2.8.1-1.aix6.1.ppc.rpm --force
6580
```
6681

6782
#### openssl, openssh
6883

84+
AIX72: unneeded, installed with yum
85+
6986
Download and scp to the machine:
7087
https://www-01.ibm.com/marketing/iwm/iwm/web/reg/pick.do?source=aixbp&lang=en_US
7188

@@ -91,6 +108,8 @@ installp -Y -qaXgd . openssl openssh
91108

92109
#### gettext, java, make
93110

111+
AIX72: unneeded, installed by ansible in /home/iojs/
112+
94113
```bash
95114
LIBPATH=/usr/lib curl --insecure -O https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gettext/gettext-0.19.7-1.aix6.1.ppc.rpm
96115
rpm -e gettext
@@ -106,6 +125,8 @@ rpm -i make-3.82-1.aix5.3.ppc.rpm
106125

107126
#### libtool
108127

128+
AIX72: unneeded, should not be installed
129+
109130
Download and scp to the machine:
110131
http://www.bullfreeware.com/affichage.php?id=1458#
111132
http://www.bullfreeware.com/affichage.php?id=2048
@@ -127,20 +148,37 @@ rm -rf libtool
127148

128149
#### pip
129150

151+
AIX72: unneeded, installed with yum
152+
130153
```bash
131154
LIBPATH=/usr/lib curl https://bootstrap.pypa.io/get-pip.py | python
132155
ln -s /opt/freeware/bin/pip /usr/bin/pip
133156
```
134157

135158
#### tap2junit
136159

160+
AIX72:
161+
```
162+
python -m pip install --upgrade pip pipenv git+https://github.com/nodejs/tap2junit
163+
python3 -m pip install --upgrade pip pipenv git+https://github.com/nodejs/tap2junit
164+
ln -s /opt/freeware/bin/tap2junit /usr/bin/tap2junit
165+
```
166+
167+
Note: probably only the py3 was needed
168+
137169
```bash
138170
python -m pip install --upgrade pip pipenv git+https://github.com/nodejs/tap2junit.git
139171
ln -s /opt/freeware/bin/tap2junit /usr/bin/tap2junit
140172
```
141173

142174
## Install ccache
143175

176+
AIX72: TODO describe how to install with curl
177+
178+
The right way to do this is not with CC and CXX that have ccache in them,
179+
but by making sure that ccache is first in the path, and that following it
180+
in the PATH is the location of the selected compiler
181+
144182
Install ccache based on these instructions ./setup/ansible-tasks/ccache.yaml,
145183
we should update that script so that it can be used on AIX as well.
146184
Install on the new linux machines did not seem to work so use cp and chmod instead.
@@ -167,12 +205,16 @@ rm -rf tmp
167205

168206
## Add ::1 to /etc/hosts
169207

208+
AIX72: done with ansible, or already done
209+
170210
```bash
171211
echo "::1 localhost" >>/etc/hosts
172212
```
173213

174214
## Enable the AHA fs
175215

216+
For AIX 7.2 and 6.1, needed for the file watcher unit tests.
217+
176218
Add the following to /etc/filesystems:
177219

178220
```
@@ -190,6 +232,9 @@ mkdir /aha
190232
mount /aha
191233
```
192234

235+
AIX72: did not do ioo, not clear if it is needed, and looks like it would get
236+
lost on reboot.
237+
193238
We also apply a disk IO optimization which instructs AIX to start writing dirty
194239
pages earlier and not wait for the sync demon:
195240

@@ -199,6 +244,8 @@ ioo -o j2_maxRandomWrite=32
199244

200245
## Setup ramdisks
201246

247+
TODO(sam-github): use the rc script from AIX7.2
248+
202249
Clear old state, if its not a fresh install:
203250
```
204251
mv /home/iojs/build/tools /home/iojs/build.tools
@@ -252,12 +299,45 @@ crw------- 1 root system 36, 1 Jun 18 12:14 /dev/rramdisk1
252299
/dev/ramdisk1 /home/iojs/build jfs2 Jun 18 12:14 rw,log=/dev/ramdisk1
253300
```
254301

302+
AIX7.2: put below into /etc/rc.d/rc2.d/S19ramdisk:
303+
```bash
304+
#!/bin/ksh
305+
306+
##################################################
307+
# name: S19ramdisk
308+
# purpose: script to create and mount ramdisks
309+
##################################################
310+
311+
312+
case "$1" in
313+
start )
314+
mkramdisk 10000000
315+
echo yes | mkfs -V jfs2 -o log=INLINE /dev/ramdisk0
316+
mount -V jfs2 -o log=/dev/ramdisk0 /dev/ramdisk0 /ramdisk0
317+
chown iojs:staff /ramdisk0/
318+
mkramdisk 23000000
319+
echo yes | mkfs -V jfs2 -o log=INLINE /dev/ramdisk1
320+
mount -V jfs2 -o log=/dev/ramdisk1 /dev/ramdisk1 /home/iojs/build
321+
chown iojs:staff /home/iojs/build
322+
;;
323+
stop )
324+
;;
325+
* )
326+
echo "Usage: $0 (start | stop)"
327+
exit 1
328+
esac
329+
```
330+
331+
TODO(sam-github): use ansible to install the rc script
332+
255333
## Run ansible script to complete base configuration
256334
257335
See [the README](./README.md) for instructions
258336
259337
## Edit /etc/inetd.conf
260338
339+
AIX72: unneeded
340+
261341
Comment out default inbound services such as TELNET, FTP, RLOGIN, TALK etc. and
262342
then reload the configuration with:
263343
@@ -278,7 +358,7 @@ xmquery dgram udp6 wait root /usr/bin/xmtopas xmtopas -p3
278358
```
279359
280360
281-
## Install the 6.3.x compiler
361+
## gcc 6.3.x on AIX 6.1
282362
283363
```bash
284364
su - iojs
@@ -293,8 +373,24 @@ gunzip -d gmake-dep.tar.gz
293373
tar -xf gmake-dep.tar
294374
```
295375
376+
## gcc 6.3.x on AIX 7.2
377+
378+
```bash
379+
mkdir -p /opt/gcc-6.3 && cd /opt/gcc-6.3
380+
curl -L https://ci.nodejs.org/downloads/aix/gcc-6.3-aix7.2.ppc.tar.gz | /opt/freeware/bin/tar -xzf -
381+
```
382+
383+
## ccache 3.7.4 on AIX 7.2
384+
385+
```bash
386+
mkdir -p /opt/ccache-3.7.4 && cd /opt/ccache-3.7.4
387+
curl -L https://ci.nodejs.org/downloads/aix/ccache-3.7.4.aix7.2.ppc.tar.gz | /opt/freeware/bin/tar -xzf -
388+
```
389+
296390
## Install python3
297391
392+
AIX72: uneeded, installed by yum
393+
298394
```bash
299395
mkdir /tmp/i-files
300396
cd /tmp/i-files
@@ -315,3 +411,19 @@ If uninstallation is needed for some reason, the command is:
315411
```
316412
installp -u aixtools.python3
317413
```
414+
415+
## Install XL compilers
416+
417+
1. Download 16.1.0 packages from: https://testcase.boulder.ibm.com (username:
418+
xlcomp4, password: ask @mhdawson)
419+
2. scp them to target:/opt/ibm-xlc
420+
3. on target:
421+
```bash
422+
cd /opt/ibm-xlc
423+
uncompress 16.1.0.3-IBM-xlCcmp-AIX-FP003.tar.Z
424+
uncompress IBM_XL_C_CPP_V16.1.0.0_AIX.tar.Z
425+
installp -aXYgd ./usr/sys/inst.images -e /tmp/install.log all
426+
inutoc
427+
installp -aXgd ./ -e /tmp/install.log all
428+
```
429+
4. Find compilers in `/opt/IBM/xl[cC]/16.1.0/bin/`

0 commit comments

Comments
 (0)