Skip to content

Commit 51620a2

Browse files
authored
Merge branch 'main' into feature/chrony
2 parents 7b2cc74 + d474a4f commit 51620a2

File tree

12 files changed

+43
-36
lines changed

12 files changed

+43
-36
lines changed

.github/workflows/stackhpc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,8 @@ jobs:
182182
run: |
183183
. venv/bin/activate
184184
. environments/.stackhpc/activate
185-
ansible-playbook -v --limit compute ansible/adhoc/rebuild.yml
186-
ansible-playbook -v ansible/ci/check_slurm.yml
187185
ansible-playbook -v ansible/adhoc/reboot_via_slurm.yml
186+
ansible-playbook -v ansible/ci/check_slurm.yml
188187
189188
- name: Check sacct state survived reimage
190189
run: |

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ It requires an OpenStack cloud, and an Ansible "deploy host" with access to that
3131

3232
Before starting ensure that:
3333
- You have root access on the deploy host.
34-
- You can create instances using a Rocky 9 GenericCloud image (or an image based on that).
35-
- **NB**: In general it is recommended to use the [latest released image](https://github.com/stackhpc/ansible-slurm-appliance/releases) which already contains the required packages. This is built and tested in StackHPC's CI.
34+
- You can create instances from the [latest Slurm appliance image](https://github.com/stackhpc/ansible-slurm-appliance/releases), which already contains the required packages. This is built and tested in StackHPC's CI. Although you can use a Rocky Linux 9 GenericCloud instead, it is not recommended.
3635
- You have an SSH keypair defined in OpenStack, with the private key available on the deploy host.
3736
- Created instances have access to internet (note proxies can be setup through the appliance if necessary).
3837
- Created instances have accurate/synchronised time (for VM instances this is usually provided by the hypervisor; if not or for bare metal instances it may be necessary to configure a time service via the appliance).

ansible/roles/compute_init/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
Experimental functionality to allow compute nodes to rejoin the cluster after
44
a reboot without running the `ansible/site.yml` playbook.
55

6+
**CAUTION:** The approach used here of exporting cluster secrets over NFS
7+
is considered to be a security risk due to the potential for cluster users to
8+
mount the share on a user-controlled machine by tunnelling through a login
9+
node. This feature should not be enabled on production clusters at this time.
10+
611
To enable this:
7-
1. Add the `compute` group (or a subset) into the `compute_init` group. This is
8-
the default when using cookiecutter to create an environment, via the
9-
"everything" template.
12+
1. Add the `compute` group (or a subset) into the `compute_init` group.
1013
2. Build an image which includes the `compute_init` group. This is the case
1114
for StackHPC-built release images.
1215
3. Enable the required functionalities during boot, by setting the

ansible/roles/proxy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Define http/s proxy configuration.
66

77
- `proxy_http_proxy`: Required. Address of http proxy. E.g. "http://10.1.0.28:3128" for a Squid proxy on default port.
88
- `proxy_https_proxy`: Optional. Address of https proxy. Default is `{{ proxy_http_proxy }}`.
9-
- `proxy_no_proxy`: Optional. Comma-separated list of addresses not to proxy. Default is to concatenate `inventory_hostname` (for hostnames) and `ansible_host` (for host IPs) for all Ansible hosts.
9+
- `proxy_no_proxy_extra`: Optional. List of additional addresses not to proxy. Will be combined with default list which includes `inventory_hostname` (for hostnames) and `ansible_host` (for host IPs) for all Ansible hosts.
1010
- `proxy_dnf`: Optional bool. Whether to configure yum/dnf proxying through `proxy_http_proxy`. Default `true`.
1111
- `proxy_systemd`: Optional bool. Whether to give processes started by systemd the above http, https and no_proxy configuration. **NB** Running services will need restarting if this is changed. Default `true`.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# proxy_http_proxy:
1+
# proxy_http_proxy:
22
proxy_https_proxy: "{{ proxy_http_proxy }}"
3-
proxy_no_proxy: "{{ (['localhost', '127.0.0.1'] + groups['all'] + hostvars.values() | map(attribute='ansible_host')) | sort | join(',') }}"
3+
proxy_no_proxy_defaults: "{{ ['localhost', '127.0.0.1'] + groups['all'] + hostvars.values() | map(attribute='ansible_host') }}"
4+
proxy_no_proxy_extras: []
5+
proxy_no_proxy: "{{ (proxy_no_proxy_defaults + proxy_no_proxy_extras) | sort | join(',') }}"
46
proxy_dnf: true
57
proxy_systemd: true

dev/ansible-ssh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import os
1111
from collections import defaultdict
1212

1313
def _optional_arg(prototype, *values):
14-
# returns empty string if any of the the values are falsey
14+
# returns empty string if any of the values are falsey
1515
filtered = [value for value in values if value]
1616
return prototype.format(*values) if len(values) == len(filtered) else ""
1717

dev/setup-env.sh

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,30 @@
22

33
set -euo pipefail
44

5-
if [[ -f /etc/os-release ]]; then
6-
. /etc/os-release
7-
OS=$ID
8-
OS_VERSION=$VERSION_ID
9-
else
10-
exit 1
11-
fi
5+
PYTHON_VERSION=${PYTHON_VERSION:-}
126

13-
MAJOR_VERSION=$(echo $OS_VERSION | cut -d. -f1)
7+
if [[ "$PYTHON_VERSION" == "" ]]; then
8+
if [[ -f /etc/os-release ]]; then
9+
. /etc/os-release
10+
OS=$ID
11+
OS_VERSION=$VERSION_ID
12+
else
13+
exit 1
14+
fi
1415

15-
PYTHON_VERSION=""
16+
MAJOR_VERSION=$(echo $OS_VERSION | cut -d. -f1)
1617

17-
if [[ "$OS" == "ubuntu" && "$MAJOR_VERSION" == "22" ]]; then
18-
PYTHON_VERSION="/usr/bin/python3.10"
19-
elif [[ "$OS" == "rocky" && "$MAJOR_VERSION" == "8" ]]; then
20-
# python3.9+ doesn't have selinux bindings
21-
PYTHON_VERSION="/usr/bin/python3.8" # use `sudo yum install python38` on Rocky Linux 8 to install this
22-
elif [[ "$OS" == "rocky" && "$MAJOR_VERSION" == "9" ]]; then
23-
PYTHON_VERSION="/usr/bin/python3.9"
24-
else
25-
echo "Unsupported OS version: $OS $MAJOR_VERSION"
26-
exit 1
18+
if [[ "$OS" == "ubuntu" && "$MAJOR_VERSION" == "22" ]]; then
19+
PYTHON_VERSION="/usr/bin/python3.10"
20+
elif [[ "$OS" == "rocky" && "$MAJOR_VERSION" == "8" ]]; then
21+
# python3.9+ doesn't have selinux bindings
22+
PYTHON_VERSION="/usr/bin/python3.8" # use `sudo yum install python38` on Rocky Linux 8 to install this
23+
elif [[ "$OS" == "rocky" && "$MAJOR_VERSION" == "9" ]]; then
24+
PYTHON_VERSION="/usr/bin/python3.9"
25+
else
26+
echo "Unsupported OS version: $OS $MAJOR_VERSION"
27+
exit 1
28+
fi
2729
fi
2830

2931
if [[ ! -d "venv" ]]; then

docs/openondemand.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The above functionality is configured by running the `ansible/portal.yml` playbo
3030

3131
See the [ansible/roles/openondemand/README.md](../ansible/roles/openondemand/README.md) for more details on the variables described below.
3232

33-
The following variables have been given default values to allow Open OnDemand to work in a newly created environment without additional configuration, but generally should be overridden in `environment/site/inventory/group_vars/all/` with site-specific values:
33+
The following variables have been given default values to allow Open OnDemand to work in a newly created environment without additional configuration, but generally should be overridden in `environments/site/inventory/group_vars/all/` with site-specific values:
3434
- `openondemand_servername` - this must be defined for both `openondemand` and `grafana` hosts (when Grafana is enabled). Default is `ansible_host` (i.e. the IP address) of the first host in the `openondemand` group.
3535
- `openondemand_auth` and any corresponding options. Defaults to `basic_pam`.
3636
- `openondemand_desktop_partition` and `openondemand_jupyter_partition` if the corresponding inventory groups are defined. Defaults to the first compute group defined in the `compute` OpenTofu variable in `environments/$ENV/tofu`.

docs/production.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ and referenced from the `site` and `production` environments, e.g.:
6767
- Vault-encrypt secrets. Running the `generate-passwords.yml` playbook creates
6868
a secrets file at `environments/$ENV/inventory/group_vars/all/secrets.yml`.
6969
To ensure staging environments are a good model for production this should
70-
generally be moved into the `site` environment. It should be be encrypted
70+
generally be moved into the `site` environment. It should be encrypted
7171
using [Ansible vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html)
7272
and then committed to the repository.
7373
@@ -96,7 +96,7 @@ and referenced from the `site` and `production` environments, e.g.:
9696
cluster
9797
```
9898

99-
- Configure Open OnDemand - see [specific documentation](openondemand.README.md).
99+
- Configure Open OnDemand - see [specific documentation](openondemand.md).
100100

101101
- Remove the `demo_user` user from `environments/$ENV/inventory/group_vars/all/basic_users.yml`
102102

environments/.stackhpc/inventory/extra_groups

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ control
4444

4545
[cacerts:children]
4646
cluster
47+
48+
[compute_init:children]
49+
compute

0 commit comments

Comments
 (0)