Skip to content

Commit 9df1fc4

Browse files
Ash Crippssam-github
Ash Cripps
authored andcommitted
Reprovision s390x machines (#2083)
* ansible: update playbooks for new s390x machines * Remove symbolic link + turn devtoolset install to manual * ansible: Rename every reference of rhel72 -> rhel7
1 parent 6bcc28e commit 9df1fc4

File tree

15 files changed

+48
-104
lines changed

15 files changed

+48
-104
lines changed

ansible/ansible.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ ansible_python_interpreter = /usr/local/bin/python
3434
[hosts:fedora30]
3535
ansible_python_interpreter = /usr/bin/python3
3636

37+
[hosts:ibm]
38+
become_method = sudo
39+
3740
[hosts:marist]
3841
ansible_become = false
3942
ansible_python_interpreter = /NODEJS2/python-2017-04-12-py27/python27/bin/python

ansible/inventory.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ hosts:
3636

3737
- ibm:
3838
aix71-ppc64_be-1: {ip: 129.33.196.199, user: b9s010a}
39+
rhel7-s390x-1: {ip: 148.100.86.101, user: linux1}
3940

4041
- joyent:
4142
smartos15-x64-2: {ip: 165.225.148.139}
@@ -61,8 +62,6 @@ hosts:
6162
- softlayer:
6263
centos6-x64-1: {ip: 169.62.77.228}
6364

64-
- linuxonecc:
65-
rhel72-s390x-1: {ip: 148.100.110.65}
6665

6766
- packetnet:
6867
centos7-arm64-1: {ip: 147.75.104.218}
@@ -98,6 +97,10 @@ hosts:
9897
- ibm:
9998
aix71-ppc64_be-1: {ip: 129.33.196.197, user: b9s010a}
10099
aix71-ppc64_be-2: {ip: 129.33.196.198, user: b9s010a}
100+
rhel7-s390x-1: {ip: 148.100.86.21, user: linux1}
101+
rhel7-s390x-2: {ip: 148.100.86.117, user: linux1}
102+
rhel7-s390x-3: {ip: 148.100.86.28, user: linux1}
103+
rhel7-s390x-4: {ip: 148.100.86.94, user: linux1}
101104

102105
- joyent:
103106
smartos15-x64-3: {ip: 165.225.148.128}
@@ -115,11 +118,7 @@ hosts:
115118
- marist:
116119
zos13-s390x-1: {ip: 148.100.36.133, user: Unix1}
117120
zos13-s390x-2: {ip: 148.100.36.134, user: Unix1}
118-
119-
- linuxonecc:
120-
rhel72-s390x-1: {ip: 148.100.110.63}
121-
rhel72-s390x-2: {ip: 148.100.110.64}
122-
rhel72-s390x-3: {ip: 148.100.110.153}
121+
123122

124123
- mininodes:
125124
ubuntu1604-arm64_odroid_c2-1: {ip: 70.167.220.147}

ansible/playbooks/jenkins/worker/create.yml

-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@
2828
- name: check if secret is properly set
2929
fail:
3030
failed_when: not secret
31-
# Requires `additional_drive: /dev/dasdb1` to be in the ansible/host_vars/HOST
32-
# file, where HOST is the full ansible host name.
33-
- name: check if additional_drive is properly set
34-
fail:
35-
failed_when: not additional_drive
36-
when: "'rhel72-s390x' in inventory_hostname"
3731

3832
environment: '{{remote_env}}'
3933

ansible/roles/baselayout/tasks/main.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
shell: coreadm -i /home/iojs/cores/core.%f.%p -e process -d global
4343

4444
- name: disable sftp
45+
when: not "'rhel7-s390x' in inventory_hostname"
4546
notify: restart sshd
4647
lineinfile: state=absent dest="{{ ssh_config }}" regexp=^Subsystem(\s+)sftp
4748

@@ -56,7 +57,7 @@
5657
skip: true
5758

5859
- name: check for a recent enough ccache
59-
when: os in ccache_no_binpkg or 'rhel72-s390x' in inventory_hostname
60+
when: os in ccache_no_binpkg or 'rhel7-s390x' in inventory_hostname
6061
stat: path="{{ binary_dest }}"
6162
register: has_ccache
6263

@@ -175,7 +176,7 @@
175176
line: '127.0.1.1 {{safe_hostname}}'
176177

177178
- name: run ccache installer
178-
when: os == "rhel72" and arch == "s390x" and not has_ccache.stat.exists
179+
when: os == "rhel7" and arch == "s390x" and not has_ccache.stat.exists
179180
include: ccache.yml
180181
static: false
181182
vars:

ansible/roles/baselayout/vars/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ packages: {
8686
'python@2,python,ccache'
8787
],
8888

89-
rhel72: [
89+
rhel7: [
9090
'gcc-c++,sudo,git,zip,unzip',
9191
],
9292

ansible/roles/java-base/vars/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ packages: {
1313
'fedora': 'java-1.8.0-openjdk-headless',
1414
'freebsd': 'openjdk8-jre',
1515
'macos': 'adoptopenjdk-openjdk8',
16-
'rhel72': 'java-1.8.0-openjdk',
16+
'rhel7': 'java-1.8.0-openjdk',
1717
'smartos': 'openjdk8',
1818
'ubuntu': 'openjdk-8-jre-headless',
1919
'ubuntu1404': 'oracle-java8-installer',

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

-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@
22

33
#
44
# this role depends on java-base
5-
#
6-
7-
dependencies:
8-
- { 'role': 'gcc', when: os|startswith("rhel7") }

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

+1-76
Original file line numberDiff line numberDiff line change
@@ -28,63 +28,13 @@
2828
when: not os|startswith("zos")
2929
group: name="{{ server_user }}"
3030

31-
- name: User | create file system on larger disk
32-
filesystem:
33-
fstype: ext4
34-
dev: "{{ additional_drive }}"
35-
when: "'rhel72-s390x' in inventory_hostname"
36-
37-
- name: User | ensure larger disk is mounted
38-
mount:
39-
name: /data
40-
src: "{{ additional_drive }}"
41-
fstype: ext4
42-
state: mounted
43-
when: "'rhel72-s390x' in inventory_hostname"
44-
4531
- name: create user
46-
when: "not os|startswith('zos') and not 'rhel72-s390x' in inventory_hostname"
32+
when: "not os|startswith('zos')"
4733
user:
4834
name: "{{ server_user }}"
4935
group: "{{ server_user }}"
5036
shell: "{{ bash_path[os|stripversion]|default('/bin/bash') }}"
5137

52-
- name: create user for rhel72-s390x
53-
user:
54-
name: "{{ server_user }}"
55-
group: "{{ server_user }}"
56-
home: "/data/{{server_user }}"
57-
shell: "{{ bash_path[os|stripversion]|default('/bin/bash') }}"
58-
when: "'rhel72-s390x' in inventory_hostname"
59-
60-
- name: create symbolic link for home directory on rhel72-s390x
61-
file:
62-
src: "/data/{{ server_user }}"
63-
dest: "/home/{{ server_user }}"
64-
state: link
65-
when: "'rhel72-s390x' in inventory_hostname"
66-
67-
# devtools6_s390x_src should be defined in the host_vars file to be one of
68-
# current hosts that has set RPMs already (in /data/devtoolset-6-s390x-rpms/).
69-
# Example:
70-
# devtools6_s390x_src: test-linuxonecc-rhel72-s390x-1
71-
- name: copy devtools-6 to control host
72-
local_action: command rsync -ar {{ devtools6_s390x_src }}:/data/devtoolset-6-s390x-rpms/ /tmp/devtoolset-6-s390x-rpms/
73-
when: "'rhel72-s390x' in inventory_hostname"
74-
75-
- name: copy devtools-6 to remote host
76-
synchronize:
77-
src: /tmp/devtoolset-6-s390x-rpms/
78-
dest: /data/devtoolset-6-s390x-rpms/
79-
recursive: true
80-
when: "'rhel72-s390x' in inventory_hostname"
81-
82-
- name: install devtools-6 on remote host
83-
shell: yum install -y /data/devtoolset-6-s390x-rpms/*
84-
async: 3600
85-
poll: 10
86-
when: "'rhel72-s390x' in inventory_hostname"
87-
8838
- name: add ::1 to /etc/hosts for ipv6 compat
8939
when: not os|startswith("zos")
9040
lineinfile:
@@ -123,31 +73,6 @@
12373
- "{{ role_path }}/tasks/partials/tap2junit/pip.yml"
12474
skip: true
12575

126-
- name: Firewall | add rule to allow accepting multicast
127-
lineinfile:
128-
dest: /etc/sysconfig/iptables
129-
insertafter: ":OUTPUT ACCEPT.*]"
130-
line: "-A INPUT -m pkttype --pkt-type multicast -j ACCEPT"
131-
when: "'rhel72-s390x' in inventory_hostname"
132-
133-
- name: Firewall | add basic rule to allow communication locally
134-
lineinfile:
135-
dest: /etc/sysconfig/iptables
136-
insertafter: ":OUTPUT ACCEPT.*]"
137-
line: "-A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -j ACCEPT"
138-
when: "'rhel72-s390x' in inventory_hostname"
139-
140-
- name: Firewall | add additional rule to allow communication from 127.0.0.2
141-
lineinfile:
142-
dest: /etc/sysconfig/iptables
143-
insertafter: ":OUTPUT ACCEPT.*]"
144-
line: "-A INPUT -s 127.0.0.2/32 -d 127.0.0.1/32 -j ACCEPT"
145-
when: "'rhel72-s390x' in inventory_hostname"
146-
147-
- name: Firewall | make the new firewall rules take effect
148-
command: systemctl restart iptables
149-
when: "'rhel72-s390x' in inventory_hostname"
150-
15176
- name: download slave.jar
15277
when: not os|startswith("zos")
15378
get_url:

ansible/roles/jenkins-worker/tasks/partials/tap2junit/rhel72.yml renamed to ansible/roles/jenkins-worker/tasks/partials/tap2junit/rhel7.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
#
4-
# rhel72: python2.7 is default
4+
# rhel7: python2.7 is default
55
#
66

77
- name: install required packages

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ init: {
1010
debian: 'debian7',
1111
freebsd: 'freebsd',
1212
macos: 'macos',
13-
rhel72: 'rhel72',
13+
rhel7: 'rhel7',
1414
systemd: ['centos7', 'debian8', 'debian9', 'debian10', 'fedora', 'ubuntu1604', 'ubuntu1804'],
1515
svc: 'smartos',
1616
upstart: ['ubuntu12', 'ubuntu1404'],
@@ -48,7 +48,7 @@ jenkins_init: {
4848
src: 'openrc.initd.j2',
4949
mode: '0755'
5050
},
51-
rhel72: {
51+
rhel7: {
5252
dest: '/usr/lib/systemd/system/jenkins.service',
5353
src: 'systemd.service.j2',
5454
mode: '0644'

ansible/roles/package-upgrade/vars/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
pm: {
8-
'yum': ['centos', 'rhel72', 'aix'],
8+
'yum': ['centos', 'rhel7', 'aix'],
99
'apt': ['debian', 'ubuntu'],
1010
'dnf': 'fedora',
1111
'pkg': 'freebsd',

doc/node-test-commit-matrix.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ This is assumed correct as of the date of last commit. If you notice a discrepan
112112
- debian9-docker-armv7 (Node >= 10)
113113
- ubuntu1604-arm64
114114
- **node-test-commit-linuxone**
115-
- rhel72-s390x (Node >= 6)
115+
- rhel7-s390x (Node >= 6)
116116
- **node-test-commit-aix**
117117
- aix61-ppc64 (Node >= 6)
118118
- **node-test-commit-arm-fanned**

doc/non-ansible-configuration-notes.md

+26
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ An NFS root server can be separate from NFS boot server, and could be different
150150
* The ext4 partition of the Raspbian image file (second partition, not the boot FAT partition) should be extracted into this root directory.
151151
* `etc/fstab` in the root directory should be edited to make it NFS compatible. Remove the existing `/boot` and `/` entries and replace them with:
152152
153+
```
154+
153155
```
154156
/dev/mmcblk0p1 /mnt/mmcblk0p1 vfat defaults 0 0
155157
NFS_ROOT_SERVER_IP:PATH_TO_SHARED_CCACHE_DIRECTORY /home/iojs/.ccache nfs4 rw,exec,async,noauto 0 0
@@ -279,6 +281,30 @@ Notes:
279281
```
280282
281283
284+
## rhel7-s390x
285+
286+
### devtoolset-6 install
287+
288+
First copy the rpms from a machine that already has them
289+
290+
```
291+
scp -r test-ibm-rhel7-s390x-1:/data/devtoolset-6-s390x-rpms/ ~/devtoolset-6-s390x-rpms
292+
```
293+
294+
Then copy them over to the target machine
295+
296+
```
297+
scp -r ~/devtoolset-6-s390x-rpms {target host}:~/devtoolset-6-s390x-rpms/
298+
```
299+
300+
Then install the rpms
301+
302+
```
303+
yum install -y devtoolset-6-s390x-rpms/*
304+
```
305+
306+
307+
282308
[`ansible.intro_windows`]: http://docs.ansible.com/ansible/intro_windows.html
283309
[newer Ansible configuration]: https://github.com/nodejs/build/tree/master/ansible
284310
[stand-alone]: https://github.com/nodejs/build/tree/master/setup/windows

jenkins/pipelines/llnode-pipeline.jenkinsfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ properties([
77
string(name: 'NODE_VERSIONS', defaultValue: 'v6 v8 v9 v10 nightly canary', description: 'Space separated list of NODE_VERSIONS to pass to llnode-continuous-integration.'),
88
string(name: 'LLDB_VERSIONS', defaultValue: '3.9 4.0 5.0 6.0', description: 'Space separated list of LLDB_VERSIONS to pass to llnode-continuous-integration.'),
99
string(name: 'MACHINES', defaultValue: 'all', description: '''Can be "all" or a space-separated list of nodes, eg:
10-
debian8-64 fedora22 fedora23 osx1010 ppcle-ubuntu1404 ubuntu1204-64 ubuntu1404-64 ubuntu1604-64 rhel72-s390x aix61-ppc64 ppcbe-ubuntu1404 smartos16-64 smartos15-64 win10 win2012r2'''),
10+
debian8-64 fedora22 fedora23 osx1010 ppcle-ubuntu1404 ubuntu1204-64 ubuntu1404-64 ubuntu1604-64 rhel7-s390x aix61-ppc64 ppcbe-ubuntu1404 smartos16-64 smartos15-64 win10 win2012r2'''),
1111
]),
1212
])
1313

tools/build-p-ssh-hosts.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ grep -- 'digitalocean' hosts/all > hosts/digitalocean
2525
grep -- 'infra-' hosts/all > hosts/infra
2626
grep -- 'joyent' hosts/all > hosts/joyent
2727
grep -- 'release-' hosts/all > hosts/release
28-
grep -- 'rhel72-s390x' hosts/all > hosts/rhel72-s390x
28+
grep -- 'rhel7-s390x' hosts/all > hosts/rhel7-s390x
2929
grep -- 'smartos' hosts/all > hosts/smartos
3030
grep -- 'softlayer' hosts/all > hosts/softlayer
3131
grep -- 'test-' hosts/all > hosts/test

0 commit comments

Comments
 (0)