Skip to content

Commit b7cfe9a

Browse files
committed
cookiecutter environment now has working defaults
1 parent 603e818 commit b7cfe9a

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

ansible/roles/passwords/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ slurm_appliance_secrets:
88
vault_openhpc_mungekey: "{{ secrets_openhpc_mungekey | default(vault_openhpc_mungekey | default(secrets_openhpc_mungekey_default)) }}"
99
vault_freeipa_ds_password: "{{ vault_freeipa_ds_password | default(lookup('password', '/dev/null')) }}"
1010
vault_freeipa_admin_password: "{{ vault_freeipa_admin_password | default(lookup('password', '/dev/null')) }}"
11+
vault_openondemand_default_user_password: "{{ vault_openondemand_default_user_password | default(lookup('password', '/dev/null')) }}"
1112
k3s_token: "{{ lookup('ansible.builtin.password', '/dev/null', length=64) }}"
1213

1314
secrets_openhpc_mungekey_default:

environments/common/inventory/group_vars/all/basic_users.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@
33
# See: ansible/roles/basic_users/README.md
44
# for variable definitions.
55

6+
ondemand_user_password: "{{ vault_openondemand_default_user_password }}"
7+
68
basic_users_homedir: /home
7-
basic_users_users: []
9+
basic_users_users:
10+
- name: ood_user
11+
password: "{{ ondemand_user_password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}" # idempotent
12+
uid: 1006

environments/common/inventory/group_vars/all/openondemand.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66
# NB: Variables prefixed ood_ are all from https://github.com/OSC/ood-ansible
77

8-
# openondemand_servername: '' # Must be defined when using openondemand
8+
openondemand_servername: "{{ hostvars[groups['openondemand'].0].ansible_host if groups['openondemand'] else '' }}"
9+
10+
openondemand_auth: basic_pam
11+
12+
openondemand_jupyter_partition: "{{ openhpc_slurm_partitions[0]['name'] }}"
13+
openondemand_desktop_partition: "{{ openhpc_slurm_partitions[0]['name'] }}"
914

1015
# Regex defining hosts which openondemand can proxy; the default regex is compute nodes (for apps) and grafana host,
1116
# e.g. if the group `compute` has hosts `compute-{0,1,2,..}` this will be '(compute-\d+)|(control)'.

environments/common/layouts/everything

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ login
2727
[block_devices:children]
2828
# Environment-specific so not defined here
2929

30-
[basic_users]
30+
[basic_users:children]
3131
# Add `openhpc` group to add Slurm users via creation of users on each node.
32+
openhpc
3233

3334
[openondemand:children]
3435
# Host to run Open Ondemand server on - subset of login
@@ -42,8 +43,9 @@ compute
4243
# Subset of compute to run a Jupyter Notebook servers on via Open Ondemand
4344
compute
4445

45-
[etc_hosts]
46+
[etc_hosts:children]
4647
# Hosts to manage /etc/hosts e.g. if no internal DNS. See ansible/roles/etc_hosts/README.md
48+
cluster
4749

4850
[cuda]
4951
# Hosts to install NVIDIA CUDA on - see ansible/roles/cuda/README.md

environments/skeleton/{{cookiecutter.environment}}/terraform/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ variable "cluster_name" {
66
variable "cluster_domain_suffix" {
77
type = string
88
description = "Domain suffix for cluster"
9-
default = "invalid"
9+
default = "internal"
1010
}
1111

1212
variable "cluster_net" {

0 commit comments

Comments
 (0)