Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: archive old setup scripts #1505

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions backup/archived-machine-setup/centos5/host_vars/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
iojs-*-centos5-*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions doc/reference-setup-scripts/aix61/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# io.js Build AIX61 Setup

For setting up an AIX 61 box

```text
Host test-ibm-aix61-ppc64-1:18822
HostName cloud.siteox.com
User root
Port 18822
```

Note that these hostnames are also used in the *ansible-inventory* file. The IP addresses will need to be updated each time the servers are reprovisioned.

To set up a host, run:

```text
$ ansible-playbook -i ../ansible-inventory ansible-playbook.yaml
```

**Users**: The ansible-vars.yaml file contains a list of users who's GitHub public keys are pulled and placed into authorized_keys for both root and iojs users. This file should be updates when new users are added to the build project who are able to help maintain the containerized builds.
41 changes: 41 additions & 0 deletions doc/reference-setup-scripts/aix61/ansible-playbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
- hosts: iojs-aix61

remote_user: root

tasks:

- include_vars: ansible-vars.yaml
tags: vars

- name: Shells | Add /bin/bash to valid shells
script: resources/add_bash.sh creates=/etc/security/login.cfg.old
tags: user

- name: User | Add {{ server_user }} user
user: name="{{ server_user }}" shell=/bin/bash
tags: user

- name: Jenkins | Download Jenkins slave.jar
get_url: url=https://ci.nodejs.org/jnlpJars/slave.jar dest=/home/{{ server_user }}/slave.jar validate_certs=no
tags: jenkins

- name: Jenkins | Copy S20jenkins
copy: src=./resources/S20jenkins dest=/etc/rc.d/rc2.d mode=0755
tags: jenkins

- name: Jenkins | Copy certs required to access jenkins/git
copy: src=./resources/ca-bundle.crt dest=/home/{{ server_user }}/ca-bundle.crt
tags: jenkins

- name: Jenkins | Copy server user to jenkins.service
replace: dest=/etc/rc.d/rc2.d/S20jenkins regexp="\{\{user\}\}" replace="{{ server_user }}"
tags: jenkins

- name: Jenkins | Copy secrets to jenkins.service
replace: dest=/etc/rc.d/rc2.d/S20jenkins regexp="\{\{secret\}\}" replace="{{ server_secret }}"
tags: jenkins

- name: Jenkins | Copy server ids to jenkins.service
replace: dest=/etc/rc.d/rc2.d/S20jenkins regexp="\{\{id\}\}" replace="{{ inventory_hostname }}"
tags: jenkins
2 changes: 2 additions & 0 deletions doc/reference-setup-scripts/aix61/ansible-vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
server_user: iojs
195 changes: 195 additions & 0 deletions doc/reference-setup-scripts/aix61/manualBootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
NOTE: dependencies on AIX seem to make it hard to get the order correct
so the scripts install-xxx.sh currently need to be run more than
once and after some small number of runs (2-3) all of the required
modules will be installed.


## Increase the size of the /opt and / filesystems

```bash
chfs -a size=+1300000 /opt
chfs -a size=+250000 /
```

## Install required packages

#### curl, unzip

Download and scp to the machine:
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/curl/curl-7.44.0-2.aix6.1.ppc.rpm
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/unzip/unzip-6.0-3.aix6.1.ppc.rpm

```bash
rpm -e git # If necessary
rpm -e curl # If necessary
rpm -ivh curl-7.44.0-2.aix6.1.ppc.rpm
rpm -i unzip-6.0-3.aix6.1.ppc.rpm
```

#### gcc

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

```bash
gcc-c++-4.8.5-1.aix6.1.ppc.rpm-with-deps.zip
unzip gcc-c++-4.8.5-1.aix6.1.ppc.rpm-with-deps.zip
sh install-gcc-rpm.sh
```

#### git

```bash
LIBPATH=/usr/lib curl --insecure -O https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/git/git-2.8.1-1.aix6.1.ppc.rpm
rpm -ivh git-2.8.1-1.aix6.1.ppc.rpm
```

#### openssl, openssh

Download and scp to the machine:
https://www-01.ibm.com/marketing/iwm/iwm/web/reg/pick.do?source=aixbp&lang=en_US

```bash
# Copy into directory fixup
cd fixup
tar -xvf OpenSSH_6.0.0.6202.tar.Z
tar -xvf openssl-1.0.2.800.tar.Z
# Copy contents of OpenSSH_6.0.0.6202 openssl-1.0.2.800 to fixup dir.
inutoc .

emgr -r -L IV80743m9a (if necessary)
emgr -r -L IV83169m9a (if necessary)

installp -Y -qaXgd . openssl openssh
```

#### gettext, java, make

```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
rpm -e gettext
rpm -hUv gettext-0.19.7-1.aix6.1.ppc.rpm

Java7r1_64.jre.7.1.0.200.tar.gz
gunzip Java7r1_64.jre.7.1.0.200.tar.gz
tar -xvf Java7r1_64.jre.7.1.0.200.tar
installp -agXYd . Java71_64.jre 2>&1 | tee installp.log

LIBPATH=/usr/lib curl --insecure -O http://www.oss4aix.org/download/everything/RPMS/make-3.82-1.aix5.3.ppc.rpm
rpm -i make-3.82-1.aix5.3.ppc.rpm
```

#### libtool

Download and scp to the machine:
http://www.bullfreeware.com/affichage.php?id=1458#
http://www.bullfreeware.com/affichage.php?id=2048

```bash
unzip 3149libtool-2.2.7b-1.aix6.1.ppc.rpm-with-deps
m4-1.4.17-1.aix6.1.ppc.rpm
sh install-libtool-rpm.sh
```

#### pip

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

## Install ccache

Install ccache based on these instructions ./setup/ansible-tasks/ccache.yaml,
we should update that script so that it can be used on AIX as well.
Install on the new linux machines did not seem to work so use cp and chmod instead.

```bash
mkdir tmp
cd tmp
LIBPATH=/usr/lib curl --insecure -O https://www.samba.org/ftp/ccache/ccache-3.2.7.tar.gz
gunzip ccache-3.2.7.tar.gz
tar -xvf ccache-3.2.7.tar
cd ccache-3.2.7
./configure
gmake
mkdir /opt/freeware/bin/ccache
cp ccache /opt/freeware/bin/ccache/
chmod 755 /opt/freeware/bin/ccache/ccache

ln -s /opt/freeware/bin/ccache/ccache /opt/freeware/bin/ccache/cc
ln -s /opt/freeware/bin/ccache/ccache /opt/freeware/bin/ccache/g++
ln -s /opt/freeware/bin/ccache/ccache /opt/freeware/bin/ccache/gcc
cd ../..
rm -rf tmp
```

## Add ::1 to /etc/hosts

```bash
echo "::1 localhost" >>/etc/hosts
```

## Enable the AHA fs

Add the following to /etc/filesystems:

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

and then:

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

We also apply a disk IO optimization which instructs AIX to start writing dirty
pages earlier and not wait for the sync demon:

```bash
ioo -o j2_maxRandomWrite=32
```

## Run ansible script to complete base configuration

See [the README](./README.md) for instructions

## Edit /etc/inetd.conf

Comment out default inbound services such as TELNET, FTP, RLOGIN, TALK etc. and
then reload the configuration with:

```bash
refresh -s inetd
```

The only remaining services should be:

```
daytime stream tcp nowait root internal
time stream tcp nowait root internal
daytime dgram udp wait root internal
time dgram udp wait root internal
caa_cfg stream tcp6 nowait root /usr/sbin/clusterconf clusterconf >>/var/adm/ras/clusterconf.log 2>&1
wsmserver stream tcp nowait root /usr/websm/bin/wsmserver wsmserver -start
xmquery dgram udp6 wait root /usr/bin/xmtopas xmtopas -p3
```


## Install the 6.3.x compiler

* log into the machine
* su - iojs
* copy these two files into /home/iojs
* https://ci.nodejs.org/downloads/aix/V2-gcc-6.3.0-1.tar.gz
* https://ci.nodejs.org/downloads/aix/gmake-dep.tar.gz
* gunzip the 2 files
* untar the 2 files


29 changes: 29 additions & 0 deletions doc/reference-setup-scripts/aix61/resources/S20jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/ksh

##################################################
# name: S20jenkins
# purpose: script that will start or stop jenkins
##################################################


case "$1" in
start )
su - {{user}} -c 'ulimit -c 0; \
export jenkins_log_file="/home/{{user}}/jenkins_console.log"
export PATH=/opt/freeware/bin/ccache:/usr/java71_64/jre/bin:$PATH; \
export HOME=/home/{{user}}; \
export NODE_TEST_DIR=$HOME/tmp; \
export NODE_COMMON_PIPE="$HOME/test.pipe"; \
export OSTYPE=AIX61; \
export GIT_SSL_CAINFO="$HOME/ca-bundle.crt"; \
export SSL_CERT_FILE="$HOME/ca-bundle.crt"; \
java -Xmx128m -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30 -jar "$HOME/slave.jar" \
-secret {{secret}} \
-jnlpUrl https://ci.nodejs.org/computer/{{id}}/slave-agent.jnlp >$jenkins_log_file 2>&1 &'
;;
stop )
;;
* )
echo "Usage: $0 (start | stop)"
exit 1
esac
13 changes: 13 additions & 0 deletions doc/reference-setup-scripts/aix61/resources/add_bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cp /etc/security/login.cfg /etc/security/login.cfg.old
awk '\
{if ($1 == "shells") \
if (index($0, "/bin/bash")==0) \
{ \
gsub(/shells = /, "shells = /bin/bash,", $0); \
print $0; \
} \
else print $0; \
else print $0} \
' /etc/security/login.cfg > /etc/security/login.cfg.new
rm /etc/security/login.cfg
mv /etc/security/login.cfg.new /etc/security/login.cfg
Loading