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

Fixes from Markdown and Yaml linters + spelling typos #1733

Merged
merged 10 commits into from
Dec 4, 2020
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: 'ansible'
assignees: ''

---
Please put the name of the software product (and affectred platforms if relevant) in the title of this issue
Please put the name of the software product (and affected platforms if relevant) in the title of this issue

- [ ] Missing install
- [ ] Bug in ansible playbook
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/machineaccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ assignees: 'sxa'

---
Access level:

- [ ] Non-privileged
- [ ] jenkins user
- [ ] root/Administrative
- [ ] other (Please specify):

System for which access is needed:
System for which access is needed:

Please explain why you need this access including whether it is a temporary or permanent request:
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/newmachine.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ I need to request a new machine:

- New machine operating system (e.g. linux/windows/macos/solaris/aix):
- New machine architecture (e.g. x64/aarch32/arm32/ppc64/ppc64le/sparc):
- Provider (leave blank if it does not matter):
- Provider (leave blank if it does not matter):
- Desired usage:
- Any unusual specification/setup required:
- Any unusual specification/setup required:
- How many of them are required: 1

Please explain what this machine is needed for:
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/testcasefail.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Please set the title to indicate the test name and machine name where known.
To make it easy for the infrastructure team to repeat and diagnose, please
answer the following questions:

- test suite/name?
- test suite/name?
- Is there an existing issue elsewhere covering this?
- Which machine(s) does it work on?
- Which machine(s) does it work on?
- Which machine(s) does it fail on?
- Do you have a link to a Grinder re-run if the test with the failure?

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
paths:
- .github/workflows/build_mac.yml
- ansible/**
- ansible/playbooks/AdoptOpenJDK_Unix_Playbook/**
branches:
- master

Expand Down Expand Up @@ -36,4 +36,4 @@ jobs:
echo "localhost ansible_user=runner ansible_connection=local" > ansible/hosts
set -eux
cd ansible
sudo ansible-playbook -i hosts playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags="hosts_file,hostname,brew_cu,kernel_tuning,adoptopenjdk,jenkins,nagios,superuser,swap_file,crontab"
sudo ansible-playbook -i hosts playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags="hosts_file,hostname,brew_upgrade,brew_cu,kernel_tuning,adoptopenjdk,jenkins,nagios,superuser,swap_file,crontab"
2 changes: 1 addition & 1 deletion .github/workflows/build_vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
sed -i -e "s/.*hosts:.*/- hosts: all/g" playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
awk '{print}/^\[defaults\]$/{print "private_key_file = id_rsa"; print "timeout = 30"; print "remote_tmp = $HOME/.ansible/tmp"}' < ansible.cfg > ansible.cfg.tmp && mv ansible.cfg.tmp ansible.cfg

- name: Run Asible Playbook
- name: Run Ansible Playbook
karianna marked this conversation as resolved.
Show resolved Hide resolved
run: |
cd ansible
ansible-playbook -i playbooks/AdoptOpenJDK_Unix_Playbook/hosts.unx -u vagrant -b --skip-tags adoptopenjdk,cups playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ansible/playbooks/*.retry
*.pyc
ansible/host_vars/*
**/vendor_files
.vscode/
6 changes: 3 additions & 3 deletions CHAOS_MONKEY.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Can we Chaos Monkey it?
# Can we Chaos Monkey it

A goal for the project is to be able to tear down any of our build or test hosts
A goal for the project is to be able to tear down any of our build or test hosts
and recreate it completely from our Ansible playbooks.

## Security and Patching

Ansible must ensure that the underlying O/S is patched as well as any firewalls,
Ansible must ensure that the underlying O/S is patched as well as any firewalls,
VPN and other security configured before making the host available.

## Core Infrastructure
Expand Down
23 changes: 11 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ reproducing issues and more.

## Mission Statement

To provide **secure**, **consistent**, **repeatable**, and **auditable**
infrastructure for the AdoptOpenJDK farm. See our full [Mission Statement]() for more details.
To provide **secure**, **consistent**, **repeatable**, and **auditable**
infrastructure for the AdoptOpenJDK farm. See our full [Mission Statement] for more details.

## Infrastructure Manifesto

Expand All @@ -34,7 +34,7 @@ Following these guidelines will help us merge your pull requests smoothly:
pulled in, but also _why_ you'd like them added. Providing clarity on why
you want changes makes it easier to accept, and provides valuable context to
review. If there is a link to an issue in the PR that contains these details
that is sufficient.
that is sufficient.

2. Follow the commit guidelines found below.

Expand Down Expand Up @@ -62,10 +62,10 @@ that the commit message is always going to be rendered in plain text.
When a commit has related issues or commits, explain the relation in the message
body. When appropriate, use the keywords described in the following help article
to automatically close issues.
https://help.github.com/articles/closing-issues-using-keywords/
[Closing Issues Using Keywords](https://help.github.com/articles/closing-issues-using-keywords/)
For example:

```
```md
Install OpenSSL in windows playbook

OpenSSL is required to compile java on windows, so the OpenSSL role will
Expand All @@ -75,27 +75,26 @@ Fixes: #1234
```

All changes should be made to a personal fork of AdoptOpenJDK/infrastructure for making changes.

1. Fork this repository
1. Create a branch off your fork
1. Make the change
1. Test it (see below)
1. Submit a Pull Request

Only reviewers in the [admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/admin_infrastructure) team have permission to merge requests for this `openjdk-infrastructure` repo,
so please ask one of those team members to review your Pull Request.
Only reviewers in the [admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure) team have permission to merge requests for this `openjdk-infrastructure` repo, so please ask one of those team members to review your Pull Request.

# Using Vagrant to test your Ansible scripts (Ubuntu based)
## Using Vagrant to test your Ansible scripts (Ubuntu based)

**TODO** This has bit rotteed somewhat and needs to be looked at again.
**TODO** This has bit rotted somewhat and needs to be looked at again.

We expect developers to test their Ansible changes in a test environment.
A default one for Ubuntu based systems is provided for you via VirtualBox / Vagrant.
See the guide below.

[Ansible Scripts Guide](ansible/README.md)

# Docs
## Docs

Project documentation in permanent form (e.g. Build Farm architecture) is stored
Project documentation in permanent form (e.g. Build Farm architecture) is stored
in the [docs](docs) folder.
42 changes: 23 additions & 19 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ won't necessarily have access to see these links):

- [adoptopenjdk-infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/adoptopenjdk-infrastructure) - write access to the repository which lets you be an official approver of PRs (triage doesn't)
- [infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure) - higher level of access for system administrators only
- [admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/admin_infrastructure) - The Admin team - can force through changes without approval etc.
- [admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/admin_infrastructure) - The Admin team - can force through changes without approval etc.

## Commit messages

Expand All @@ -34,26 +34,31 @@ then a repository admin may override that requirement to push through
a change if no reviewers are available, but in such cases a comment
explaining why must be added to the Pull Request.

## Running the ansible scripts on your local machine
## Running the ansible scripts on local machines

The full documentation for running locally is at [ansible/README.md] but
assuming you have ansible installed on your UNIX-based machine, clone this
The full documentation for running locally is at [ansible/README.md].

### Running the ansible scripts on your current machine

Assuming you have ansible installed on your UNIX-based machine, clone this
repository, create an `inventory` text file with the word `localhost`
and run this from the `ansible` directory:

```
```sh
ansible-playbook -b -i inventory_file --skip-tags adoptopenjdk,jenkins_user playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
```

NOTE: For windows machines you cannot use this method as ansible does not
NOTE: For windows machines you cannot use this method (i.e., as localhost) as ansible does not
run natively on Windows

## Running the ansible scripts remotely on another machine
## Running the ansible scripts on another machine or machines (including Windows)

Create an inventory file with the list of machines you want to set up, then
from the `ansible` directory in this repository run somethig like this:
On an Ansible Control Node create an inventory file with the list of machines you want to set up, then
from the `ansible` directory in this repository run something like this:

`ansible-playbook -i inventory_file --skip-tags=adoptopenjdk,jenkins playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --skip-tags=adoptopenjdk,jenkins`
```sh
ansible-playbook -b -i inventory_file --skip-tags adoptopenjdk,jenkins_user playbooks/AdoptOpenJDK_Unix_Playbook/main.yml
```

If you don't have ssh logins enabled as root, add `-b -u myusername` to the
command line which will ssh into the target machine as `myusername` and use
Expand All @@ -63,31 +68,30 @@ To do this you ideally need to be using key-based ssh logins. If you use a
passphrase on your ssh key use the following to hold the credentials in the
shell:

```
```sh
eval `` `ssh-agent` ``
ssh-add
```

and if using the `-b` option, ensure that your user has access to `sudo`
without a password to
the `root` account (often done by adding it to the `wheel` group)
without a password to the `root` account (often done by adding it to the `wheel` group)

## Adding a new role to the ansible scripts

Other than the dependencies on the machines which come from packages shipped
with the operating system, we generally use individual roles for each piece
of software which we install on the machines. For the main Unix and Windows
playbooks each rol has it's own directory and is called from the top level
playbooks each role has it's own directory and is called from the top level
`main.yml` playbook. They are fairly easy to add and in most cases you can
look at an existing one and copy it.

As far as possibly, give each operation within the role a tags so that it
As far as possibly, give each operation within the role a tag so that it
can either be skipped if someone doesn't want it, or run on its own if
desired.

If something is specific to the adoptopenjdk infrastructure (e.g. setting
hostnames, or configuring things specific to our setup but aren't required
to be able to run build/test operations) then give the enitries in that role
host names, or configuring things specific to our setup but aren't required
to be able to run build/test operations) then give the entries in that role
an `adoptopenjdk` tag as well. If you need to do something potentially
adjusting the users' system, use the `dont_remove_system` tag. This is
occasionally required if, for example, we need a specific version of a tool
Expand All @@ -110,15 +114,15 @@ to validate them.

## Jenkins access

The AdoptOpenJDK Jenkins server at https://ci.adoptopenjdk.net is used for all the
The AdoptOpenJDK Jenkins server at [https://ci.adoptopenjdk.net](https://ci.adoptopenjdk.net) is used for all the
builds and testing automation. Since we're as open as possible, general read
access is enabled. For others, access is controlled via github teams (via
the Jenkins `Github Authentication Plugin` as follows. (Links here won't work for
most people as the teams are restricted access)

- [release](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins/members) can run and configure jobs and views
- [build](https://github.com/orgs/AdoptOpenJDK/teams/build/members) has the access for `release` plus the ability to create new jobs
- [testing]https://github.com/orgs/AdoptOpenJDK/teams/testing/members has the same access as `build`
- [testing](https://github.com/orgs/AdoptOpenJDK/teams/testing/members) has the same access as `build`
- [infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure/members) has the same as `build`/`testing` plus can manage agent machines
- [jenkins-admins](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins/members) as you might expect has access to Administer anything

Expand Down
10 changes: 5 additions & 5 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

Assuming the PR is approved

- Create Pull Request to add user to https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/master/README.md#infrastructure.
- Create Pull Request to add user to [Infrastructure](https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/master/README.md#infrastructure).
- Ideally request users public GPG key as well as their public SSH key.

## GitHub

Add the user to the correct Infrastructure team:

* [@admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/admin_infrastructure) - Super Users
* [@infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure) - Core Infra Team
* [@adoptopenjdk-infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/adoptopenjdk-infrastructure) - Can be assigned Infra Issues
* [@jenkins-admins](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins) - Super users on Jenkins
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section likely needs a bit of an update now that #1084 is complete, but I'm happy for that to be left for a separate PR

- [@admin_infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/admin_infrastructure) - Super Users
- [@infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/infrastructure) - Core Infra Team
- [@adoptopenjdk-infrastructure](https://github.com/orgs/AdoptOpenJDK/teams/adoptopenjdk-infrastructure) - Can be assigned Infra Issues
- [@jenkins-admins](https://github.com/orgs/AdoptOpenJDK/teams/jenkins-admins) - Super users on Jenkins

### [Secrets](https://github.com/AdoptOpenJDK/secrets)

Expand Down
Loading