Skip to content

Commit

Permalink
ansible: add new AIX7.1 machines to CI (#2056)
Browse files Browse the repository at this point in the history
* update the ansible vars file for missing packages that used to be added manually
* clean up and update aix manual steps for 7.2 and 7.1
* edit select-compiler.sh for aix 7.1
  • Loading branch information
Ash Cripps authored and sam-github committed Dec 7, 2019
1 parent 5003c6e commit 8592b5f
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 123 deletions.
283 changes: 163 additions & 120 deletions ansible/aix61-standalone/manualBootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,115 @@ chfs -a size=+250000 /
chfs -a size=917504 /tmp
```

AIX72: unneeded: -1 and -2 and aix7-2 have different sizes, and 7.2 is big
enough already:
For the systems without ramdisks `/home` needs to be set to the same size as `/home/iojs/build` would be on a ramdisk machine

6.1-1 6.1-2 7.2-2
/opt: 3670016 x 512, 2228224 31457280
/: 3538944 x 512, 3407872 4194304
```bash
chfs -a size=23000000 /home
```

## Edit SSH config

Add the following two lines to `/etc/ssh/sshd_config`:

```
PasswordAuthentication no
ChallengeResponseAuthentication no
```

## Remove failedlogin file

If /etc/security/failedlogin is growing without bounds on AIX6.1, remove
it with a cron job, use `crontab -e`, and add one line:
```sh
0 12 * * * /usr/bin/rm -f /etc/security/failedlogin
```

## Fix "Missing" shared objects

On the 7.1 machines we were facing this issues when yum installed packages were not able to find some of the shared objects they needed

```sh
bash-5.0$ gmake -v
exec(): 0509-036 Cannot load program gmake because of the following errors:
0509-022 Cannot load module /opt/freeware/lib/libintl.a(libintl.so.8).
0509-150 Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
0509-152 Member libiconv.so.2 is not found in archive
0509-022 Cannot load module make_64.
0509-150 Dependent module /opt/freeware/lib/libintl.a(libintl.so.8) could not be loaded.
0509-022 Cannot load module .
```

The fix is as following:

```sh
sudo rm /usr/lib/libiconv.a && sudo ln -s /opt/freeware/bin/libiconv.a /usr/lib
```

# AIX 7.2 Install

Most packages should be installed via ansible.

If there are any missing they should be installed via yum

What you do need to install manually is **ccache**


```bash
mkdir -p /opt/gcc-6.3 && cd /opt/gcc-6.3
curl -L https://ci.nodejs.org/downloads/aix/gcc-6.3-aix7.2.ppc.tar.gz | /opt/freeware/bin/tar -xzf -
```

## ccache 3.7.4 on AIX 7.2

```bash
mkdir -p /opt/ccache-3.7.4 && cd /opt/ccache-3.7.4
curl -L https://ci.nodejs.org/downloads/aix/ccache-3.7.4.aix7.2.ppc.tar.gz | /opt/freeware/bin/tar -xzf -
```

## Enable the AHA fs

For AIX 7 and 6.1, needed for the file watcher unit tests.

Add the following to /etc/filesystems:

```
/aha:
dev = /aha
vfs = ahafs
mount = true
vol = /aha
```

and then:

```bash
mkdir /aha
mount /aha
```

## Install XL compilers

1. Download 16.1.0 packages from: https://testcase.boulder.ibm.com (username:
xlcomp4, password: ask @mhdawson)
2. scp them to target:/opt/ibm-xlc
3. on target:
```bash
cd /opt/ibm-xlc
uncompress 16.1.0.3-IBM-xlCcmp-AIX-FP003.tar.Z
uncompress IBM_XL_C_CPP_V16.1.0.0_AIX.tar.Z
installp -aXYgd ./usr/sys/inst.images -e /tmp/install.log all
inutoc
installp -aXgd ./ -e /tmp/install.log all
```
4. Find compilers in `/opt/IBM/xl[cC]/16.1.0/bin/`




# AIX 6.1 Install

## Install required packages

AIX72: unneeded, package were installed by yum

#### curl, unzip

Expand Down Expand Up @@ -57,8 +156,6 @@ rm -rf gcc

#### git-tools

AIX72: unneeded, installed with yum

```bash
mkdir git-tools
cd git-tools
Expand All @@ -73,16 +170,13 @@ rm -rf git-tools

#### git

AIX72: unneeded, installed with yum

```bash
LIBPATH=/usr/lib curl --insecure -O https://ci.nodejs.org/downloads/aix/git-2.8.1-1.aix6.1.ppc.rpm
rpm -ivh git-2.8.1-1.aix6.1.ppc.rpm --force
```

#### openssl, openssh

AIX72: unneeded, installed with yum

Download and scp to the machine:
https://www-01.ibm.com/marketing/iwm/iwm/web/reg/pick.do?source=aixbp&lang=en_US
Expand All @@ -109,7 +203,6 @@ installp -Y -qaXgd . openssl openssh

#### gettext, java, make

AIX72: unneeded, installed by ansible in /home/iojs/

```bash
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
Expand All @@ -126,7 +219,6 @@ rpm -i make-3.82-1.aix5.3.ppc.rpm

#### libtool

AIX72: unneeded, should not be installed

Download and scp to the machine:
http://www.bullfreeware.com/affichage.php?id=1458#
Expand All @@ -149,32 +241,15 @@ rm -rf libtool

#### pip

AIX72: unneeded, installed with yum

```bash
LIBPATH=/usr/lib curl https://bootstrap.pypa.io/get-pip.py | python
ln -s /opt/freeware/bin/pip /usr/bin/pip
```

#### tap2junit

AIX72:
```
python -m pip install --upgrade pip pipenv git+https://github.com/nodejs/tap2junit
python3 -m pip install --upgrade pip pipenv git+https://github.com/nodejs/tap2junit
ln -s /opt/freeware/bin/tap2junit /usr/bin/tap2junit
```

Note: probably only the py3 was needed

```bash
python -m pip install --upgrade pip pipenv git+https://github.com/nodejs/tap2junit.git
ln -s /opt/freeware/bin/tap2junit /usr/bin/tap2junit
```

## Install ccache

AIX72: TODO describe how to install with curl

The right way to do this is not with CC and CXX that have ccache in them,
but by making sure that ccache is first in the path, and that following it
Expand Down Expand Up @@ -206,7 +281,6 @@ rm -rf tmp

## Add ::1 to /etc/hosts

AIX72: done with ansible, or already done

```bash
echo "::1 localhost" >>/etc/hosts
Expand Down Expand Up @@ -243,6 +317,64 @@ pages earlier and not wait for the sync demon:
ioo -o j2_maxRandomWrite=32
```

## gcc 6.3.x on AIX 6.1

```bash
su - iojs
cd /home/iojs

LIBPATH=/usr/lib curl -L --insecure -O https://ci.nodejs.org/downloads/aix/V2-gcc-6.3.0-1.tar.gz
gunzip -d V2-gcc-6.3.0-1.tar.gz
tar -xf V2-gcc-6.3.0-1.tar

LIBPATH=/usr/lib curl -L --insecure -O https://ci.nodejs.org/downloads/aix/gmake-dep.tar.gz
gunzip -d gmake-dep.tar.gz
tar -xf gmake-dep.tar
```


## Install python3

```bash
mkdir /tmp/i-files
cd /tmp/i-files
LIBPATH=/usr/lib curl -L --insecure -O https://ci.nodejs.org/downloads/aix/aixtools.python3.3.7.3.0.I
installp -d /tmp/i-files -L
installp -d /tmp/i-files -a aixtools.python3
```

Repeat the __pip__ and __tap2junit__ steps above but substitute __python3__ in the commands in place of
__python__. This is required because Python 2 and Python 3 have separate site-packages so that modules
installed on one are not automatically available on the other.

The archive was originally from http://www.aixtools.net/index.php/python3

Installation is into `/opt/bin`.

If uninstallation is needed for some reason, the command is:
```
installp -u aixtools.python3
```

## Install XL compilers

1. Download 16.1.0 packages from: https://testcase.boulder.ibm.com (username:
xlcomp4, password: ask @mhdawson)
2. scp them to target:/opt/ibm-xlc
3. on target:
```bash
cd /opt/ibm-xlc
uncompress 16.1.0.3-IBM-xlCcmp-AIX-FP003.tar.Z
uncompress IBM_XL_C_CPP_V16.1.0.0_AIX.tar.Z
installp -aXYgd ./usr/sys/inst.images -e /tmp/install.log all
inutoc
installp -aXgd ./ -e /tmp/install.log all
```
4. Find compilers in `/opt/IBM/xl[cC]/16.1.0/bin/`


# Final setup steps

## Setup ramdisks

TODO(sam-github): use the rc script from AIX7.2
Expand Down Expand Up @@ -357,92 +489,3 @@ caa_cfg stream tcp6 nowait root /usr/sbin/clusterconf clusterconf >>/var
wsmserver stream tcp nowait root /usr/websm/bin/wsmserver wsmserver -start
xmquery dgram udp6 wait root /usr/bin/xmtopas xmtopas -p3
```
## gcc 6.3.x on AIX 6.1
```bash
su - iojs
cd /home/iojs

LIBPATH=/usr/lib curl -L --insecure -O https://ci.nodejs.org/downloads/aix/V2-gcc-6.3.0-1.tar.gz
gunzip -d V2-gcc-6.3.0-1.tar.gz
tar -xf V2-gcc-6.3.0-1.tar

LIBPATH=/usr/lib curl -L --insecure -O https://ci.nodejs.org/downloads/aix/gmake-dep.tar.gz
gunzip -d gmake-dep.tar.gz
tar -xf gmake-dep.tar
```
## gcc 6.3.x on AIX 7.2
```bash
mkdir -p /opt/gcc-6.3 && cd /opt/gcc-6.3
curl -L https://ci.nodejs.org/downloads/aix/gcc-6.3-aix7.2.ppc.tar.gz | /opt/freeware/bin/tar -xzf -
```
## ccache 3.7.4 on AIX 7.2
```bash
mkdir -p /opt/ccache-3.7.4 && cd /opt/ccache-3.7.4
curl -L https://ci.nodejs.org/downloads/aix/ccache-3.7.4.aix7.2.ppc.tar.gz | /opt/freeware/bin/tar -xzf -
```
## Install python3
AIX72: uneeded, installed by yum
```bash
mkdir /tmp/i-files
cd /tmp/i-files
LIBPATH=/usr/lib curl -L --insecure -O https://ci.nodejs.org/downloads/aix/aixtools.python3.3.7.3.0.I
installp -d /tmp/i-files -L
installp -d /tmp/i-files -a aixtools.python3
```
Repeat the __pip__ and __tap2junit__ steps above but substitute __python3__ in the commands in place of
__python__. This is required because Python 2 and Python 3 have separate site-packages so that modules
installed on one are not automatically available on the other.
The archive was originally from http://www.aixtools.net/index.php/python3
Installation is into `/opt/bin`.
If uninstallation is needed for some reason, the command is:
```
installp -u aixtools.python3
```
## Install XL compilers
1. Download 16.1.0 packages from: https://testcase.boulder.ibm.com (username:
xlcomp4, password: ask @mhdawson)
2. scp them to target:/opt/ibm-xlc
3. on target:
```bash
cd /opt/ibm-xlc
uncompress 16.1.0.3-IBM-xlCcmp-AIX-FP003.tar.Z
uncompress IBM_XL_C_CPP_V16.1.0.0_AIX.tar.Z
installp -aXYgd ./usr/sys/inst.images -e /tmp/install.log all
inutoc
installp -aXgd ./ -e /tmp/install.log all
```
4. Find compilers in `/opt/IBM/xl[cC]/16.1.0/bin/`
## Edit SSH config
Add the following two lines to `/etc/ssh/sshd_config`:
```
PasswordAuthentication no
ChallengeResponseAuthentication no
```
## Remove failedlogin file
If /etc/security/failedlogin is growing without bounds on AIX6.1, remove
it with a cron job, use `crontab -e`, and add one line:
```sh
0 12 * * * /usr/bin/rm -f /etc/security/failedlogin
```
8 changes: 8 additions & 0 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ hosts:
centos6-x86-1: {ip: 162.243.248.28}
centos7-x64-1: {ip: 138.68.12.105}

- ibm:
aix71-ppc64_be-1: {ip: 129.33.196.199, user: b9s010a}

- joyent:
smartos15-x64-2: {ip: 165.225.148.139}
smartos17-x64-2: {ip: 165.225.149.208}
Expand Down Expand Up @@ -92,6 +95,10 @@ hosts:
ubuntu1804_docker-x64-2: {ip: 159.89.183.200}
ubuntu1804-x64-1: {ip: 178.128.181.213}

- ibm:
aix71-ppc64_be-1: {ip: 129.33.196.197, user: b9s010a}
aix71-ppc64_be-2: {ip: 129.33.196.198, user: b9s010a}

- joyent:
smartos15-x64-3: {ip: 165.225.148.128}
smartos15-x64-4: {ip: 165.225.149.91}
Expand Down Expand Up @@ -131,6 +138,7 @@ hosts:
win10-arm64-1: { vs: '2017' }
win10-arm64-2: { vs: '2017' }


- osuosl:
# secret for -1 was compromised, do not use -1 name
aix72-ppc64_be-2: {ip: 140.211.9.30}
Expand Down
Loading

0 comments on commit 8592b5f

Please sign in to comment.