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

ansible: add RHEL 8 x64 instances #2886

Merged
merged 2 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions ansible/group_vars/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ jenkins_url: "https://ci-release.nodejs.org"
jenkins_worker_jar: "https://ci.nodejs.org/jnlpJars/slave.jar"
server_user: "iojs"
home: "/home"
git_reference_path: "{{ home }}/{{ server_user }}/.ccache/node.shared.reference"
remote_env: {}
1 change: 1 addition & 0 deletions ansible/group_vars/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ jenkins_url: "https://ci.nodejs.org"
jenkins_worker_jar: "{{ jenkins_url }}/jnlpJars/slave.jar"
server_user: iojs
home: "/home"
git_reference_path: "{{ home }}/{{ server_user }}/git/io.js.reference"
remote_env: {}
13 changes: 5 additions & 8 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ hosts:
server_jobs: 6
rhel7-s390x-1: {ip: 148.100.86.101, user: linux1}
rhel8-s390x-1: {ip: 148.100.84.27, user: linux1}
rhel8-x64-1: {ip: 169.62.77.228}
rhel8-x64-2: {ip: 50.97.245.10}

- iinthecloud:
ibmi73-ppc64_be-1: {ip: 65.183.160.62, user: nodejs}
Expand Down Expand Up @@ -100,12 +102,6 @@ hosts:
rvagg-debian10-armv6l_pi1p-1: {ip: 192.168.2.40, user: pi, alias: iojs-ns-pi1p-1 }
andineck-debian10-armv6l_pi1p-1: {ip: 192.168.2.41, user: pi, alias: iojs-ns-pi1p-2 }

- softlayer:
centos6-x64-1: {ip: 50.97.245.10}






- test:
Expand Down Expand Up @@ -157,6 +153,9 @@ hosts:
rhel8-s390x-2: {ip: 148.100.84.240, user: linux1, build_test_v8: yes}
rhel8-s390x-3: {ip: 148.100.84.56, user: linux1, build_test_v8: yes}
rhel8-s390x-4: {ip: 148.100.84.150, user: linux1, build_test_v8: yes}
rhel8-x64-1: {ip: 169.61.75.51, build_test_v8: yes}
rhel8-x64-2: {ip: 169.61.75.58, build_test_v8: yes}
rhel8-x64-3: {ip: 52.117.26.13, build_test_v8: yes}
ubuntu1804-x64-1: {ip: 52.117.26.14, alias: jenkins-workspace-6}
ubuntu1804-x64-2: {ip: 50.97.245.9}

Expand Down Expand Up @@ -361,8 +360,6 @@ hosts:
kahwee-debian10-arm64_pi3-1: {ip: 192.168.2.90, user: pi, alias: iojs-ns-pi3-11 }

- softlayer:
centos6-x64-1: {ip: 169.61.75.51}
centos6-x64-2: {ip: 169.61.75.58}
centos7-x64-1: {ip: 50.23.85.250}
debian9-x64-1: {ip: 169.60.150.88}
debian10-x64-1: {ip: 169.44.16.126}
Expand Down
8 changes: 8 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/rhel8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

# Red Hat Enterprise Linux 8

# Set the hostname as it will be used by subscription manager.
- name: gather facts
setup:

- name: set hostname
ansible.builtin.hostname:
name: "{{ inventory_hostname | regex_replace('_', '--') }}"

- name: register Red Hat subscription
community.general.redhat_subscription:
activationkey: "{{ type }}"
Expand Down
29 changes: 29 additions & 0 deletions ansible/roles/build-test-v8/tasks/partials/rhel8-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---

#
# Install packages for V8 builds.
#

# V8 builds still require Python 2.
- name: install packages required to build V8
ansible.builtin.dnf:
name: ['python2', 'python2-pip']
state: present

- name: update python package alternatives
community.general.alternatives:
link: /usr/bin/python
name: python
path: /usr/bin/python2

- name: install dependencies for V8 build tools (Python 2)
ansible.builtin.pip:
executable: pip2
name: ['httplib2', 'six']
state: present

- name: install dependencies for V8 build tools (Python 3)
ansible.builtin.pip:
executable: pip-3
name: ['httplib2', 'six']
state: present
7 changes: 5 additions & 2 deletions ansible/roles/java-base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@

- name: install java
when:
- java.rc > 0
- not os|startswith("zos")
- not os|startswith("macos")
notify:
- restart Jenkins
package:
name: "{{ java_package_name }}"
state: present
state: latest
use: "{{ os|startswith(\"ibmi\")|ternary(\"yum\", omit) }}"

- name: install java tap (macOS)
Expand Down Expand Up @@ -144,6 +145,8 @@
src: "/opt/{{ adoptopenjdk_unpacked.files[0].split('/')[0] }}/bin/java"
dest: "/usr/bin/java"
state: link
notify:
- restart Jenkins
when:
- use_adoptopenjdk == True
- update_adoptopenjdk == True
Expand Down
19 changes: 19 additions & 0 deletions ansible/roles/jenkins-worker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,25 @@
runAsciiBashExists.stat.exists == False
shell: "sh {{ home }}/{{ server_user }}/gen_runAsciiBash.sh"

# We should probably create a git reference repository for all hosts but
# limit for now to newer ones where we know we have enough disk space.
- name: create directory for git reference repository
ansible.builtin.file:
group: "{{ server_user }}"
owner: "{{ server_user }}"
path: "{{ git_reference_path | dirname }}"
state: directory
when: os == 'rhel8'

- name: create git reference repository
ansible.builtin.command:
chdir: "{{ git_reference_path | dirname }}"
cmd: git clone --mirror https://github.com/nodejs/node "{{ git_reference_path | basename }}"
creates: "{{ git_reference_path }}"
become: yes
become_user: "{{ server_user }}"
when: os == 'rhel8'

- name: render init script into place
notify: restart Jenkins
template:
Expand Down
3 changes: 3 additions & 0 deletions jenkins/scripts/VersionSelectorScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def buildExclusions = [
[ /^centos7-(arm)?(64)-gcc8/, anyType, lt(14) ], // 14.x: gcc8 builds start
[ /^centos6-32-gcc6/, releaseType, gte(10) ], // 32-bit linux for <10 only
[ /^centos7-64/, releaseType, lt(12) ],
[ /^centos7-64/, releaseType, gte(18) ],
[ /debian8-x86/, anyType, gte(10) ], // 32-bit linux for <10 only
[ /debian8/, anyType, gte(13) ],
[ /debian9/, anyType, gte(16) ],
Expand Down Expand Up @@ -129,6 +130,8 @@ def buildExclusions = [

// Source / headers / docs -------------------------------
[ /^centos7-release-sources$/, releaseType, lt(10) ],
[ /^centos7-release-sources$/, releaseType, gte(18) ],
[ /^rhel8-release-sources$/, releaseType, lt(18) ],

// -------------------------------------------------------
]
Expand Down