-
Notifications
You must be signed in to change notification settings - Fork 166
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 (initially s390x) #2859
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
|
||
# Red Hat Enterprise Linux 8 | ||
|
||
- name: install GPG key for EPEL 8 | ||
become: yes | ||
ansible.builtin.rpm_key: | ||
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8 | ||
state: present | ||
|
||
- name: install EPEL 8 | ||
ansible.builtin.dnf: | ||
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- name: restart iptables | ||
ansible.builtin.service: | ||
name: iptables | ||
state: restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
|
||
# Red Hat Enterprise Linux 8 on s390x (LinuxONE) | ||
|
||
- name: run common RHEL 8 tasks | ||
ansible.builtin.include_tasks: rhel8.yml | ||
|
||
- name: Firewall | install iptables-services | ||
ansible.builtin.dnf: | ||
name: iptables-services | ||
state: present | ||
|
||
- name: Firewall | enable iptables | ||
ansible.builtin.systemd: | ||
enabled: yes | ||
name: iptables | ||
|
||
- name: Firewall | remove firewalld | ||
ansible.builtin.dnf: | ||
name: firewalld | ||
state: absent | ||
|
||
- name: Firewall | add rule to allow accepting multicast | ||
lineinfile: | ||
dest: /etc/sysconfig/iptables | ||
insertafter: ":OUTPUT ACCEPT.*]" | ||
line: "-A INPUT -m pkttype --pkt-type multicast -j ACCEPT" | ||
notify: restart iptables | ||
|
||
- name: Firewall | add basic rule to allow communication locally | ||
lineinfile: | ||
dest: /etc/sysconfig/iptables | ||
insertafter: ":OUTPUT ACCEPT.*]" | ||
line: "-A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -j ACCEPT" | ||
notify: restart iptables | ||
|
||
- name: Firewall | add additional rule to allow communication from 127.0.0.2 | ||
lineinfile: | ||
dest: /etc/sysconfig/iptables | ||
insertafter: ":OUTPUT ACCEPT.*]" | ||
line: "-A INPUT -s 127.0.0.2/32 -d 127.0.0.1/32 -j ACCEPT" | ||
notify: restart iptables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
# Red Hat Enterprise Linux 8 | ||
|
||
- name: register Red Hat subscription | ||
community.general.redhat_subscription: | ||
activationkey: "{{ type }}" | ||
org_id: "{{ rh_org }}" | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
|
||
compiler: { | ||
'centos7': '. /opt/rh/devtoolset-8/enable', | ||
'rhel7': '. /opt/rh/devtoolset-8/enable', | ||
'rhel8': '. /opt/rh/gcc-toolset-11/enable' | ||
} | ||
|
||
gn_select_compiler: "{{ compiler[os]|default(compiler[os|stripversion])|default('true') }}" | ||
# Pin gn for now so we can still build older versions of V8 in Node.js 14. | ||
# Refs: https://github.com/nodejs/node/pull/40689#issuecomment-956303875 | ||
gn_version: 69ec4fc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
|
||
# | ||
# generic handlers for jenkins-worker | ||
# | ||
|
||
- name: restart Jenkins | ||
ansible.builtin.service: | ||
name: jenkins | ||
state: restarted | ||
when: | ||
- not os|startswith("aix") | ||
- not os|startswith("ibmi") | ||
- not os|startswith("macos") | ||
- not os|startswith("zos") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Host node-www | ||
HostName direct.nodejs.org | ||
User staging | ||
IdentityFile ~/.ssh/id_rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
argument_specs: | ||
main: | ||
short_description: Set up specific to hosts that build releases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
dependencies: | ||
- role: user-create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
|
||
# Set up release hosts to be able to upload to the staging server. | ||
# Requires access to the secrets repository. User should have already | ||
# been prompted for GPG credentials during the inventory load. | ||
|
||
- name: create .ssh directory | ||
ansible.builtin.file: | ||
dest: "{{ home }}/{{ server_user }}/.ssh" | ||
mode: "0700" | ||
owner: "{{ server_user }}" | ||
group: "{{ server_user }}" | ||
state: directory | ||
|
||
- name: copy key to access staging server | ||
ansible.builtin.copy: | ||
content: "{{ lookup('pipe', 'gpg -d ' + staging_key | quote) }}" | ||
dest: "{{ home }}/{{ server_user }}/.ssh/id_rsa" | ||
mode: "0600" | ||
owner: "{{ server_user }}" | ||
group: "{{ server_user }}" | ||
vars: | ||
staging_key: "{{ secrets_repo_root }}/build/release/staging_id_rsa_private.key" | ||
|
||
- name: write ssh_config | ||
ansible.builtin.copy: | ||
dest: "{{ home }}/{{ server_user }}/.ssh/config" | ||
src: "{{ role_path }}/files/ssh_config" | ||
mode: "0600" | ||
owner: "{{ server_user }}" | ||
group: "{{ server_user }}" | ||
|
||
- name: write known_hosts | ||
ansible.builtin.known_hosts: | ||
name: direct.nodejs.org | ||
key: "{{ lookup('pipe', 'gpg -d ' + known_hosts | quote) }}" | ||
path: "{{ home }}/{{ server_user }}/.ssh/known_hosts" | ||
state: present | ||
become: yes | ||
become_user: "{{ server_user }}" | ||
vars: | ||
known_hosts: "{{ secrets_repo_root }}/build/release/known_hosts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
|
||
# The path to the secrets repository. | ||
# See also `ansible/plugins/inventory/nodejs_yaml.py`. | ||
secrets_repo_root: "{{ lookup('env', 'NODE_BUILD_SECRETS')|default('../../../../../secrets', True) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to say it is automated, but the instructions lower down still say you need to copy over, those should probably say that for some platforms ansible may have already done this for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was debating whether to delete the manual steps but thought it would be useful to keep as a reference. I could rename the "Manual steps" twisty to "Previously used manual steps", or add a sentence saying "The following manual steps are now automated by the Ansible role and included for reference only."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open a follow up to clarify the wording.