Skip to content

Commit 2b562a8

Browse files
wtripp180901sjpb
andauthored
Move cookiecutter Tofu to new site environment (#751)
* Moved cookiecutter tofu to site environment * updated CI environment * Updated docs for new environment structure * review comments Co-authored-by: Steve Brasier <[email protected]> * docs updates * typo Co-authored-by: Steve Brasier <[email protected]> * removed topology from default groups + added docs --------- Co-authored-by: Steve Brasier <[email protected]>
1 parent 8583a8f commit 2b562a8

File tree

55 files changed

+113
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+113
-90
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Run the following from the repository root to activate the venv:
6161
Use the `cookiecutter` template to create a new environment to hold your configuration:
6262

6363
cd environments
64-
cookiecutter skeleton
64+
cookiecutter ../cookiecutter
6565

6666
and follow the prompts to complete the environment name and description.
6767

ansible/roles/alertmanager/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ Note that:
1111
- No Grafana dashboard for alerts is currently provided.
1212

1313
Alertmanager is enabled by default on the `control` node in the
14-
[everything](../../../environments/common/layouts/everything) template which
15-
`cookiecutter` uses for a new environment's `inventory/groups` file.
14+
`site` environment's `inventory/groups` file.
1615

1716
In general usage may only require:
18-
- Adding the `control` node into the `alertmanager` group in `environments/site/groups`
19-
if upgrading an existing environment.
2017
- Enabling the Slack integration (see section below).
2118
- Possibly setting `alertmanager_web_external_url`.
2219

ansible/roles/block_devices/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This is a convenience wrapper around the ansible modules:
1111

1212
To avoid issues with device names changing after e.g. reboots, devices are identified by serial number and mounted by filesystem UUID.
1313

14-
**NB:** This role is ignored[^1] during Packer builds as block devices will not be attached to the Packer build VMs. This role is therefore deprecated and it is suggested that `cloud-init` is used instead. See e.g. `environments/skeleton/{{cookiecutter.environment}}/tofu/control.userdata.tpl`.
14+
**NB:** This role is ignored[^1] during Packer builds as block devices will not be attached to the Packer build VMs. This role is therefore deprecated and it is suggested that `cloud-init` is used instead. See e.g. `environments/site/tofu/control.userdata.tpl`.
1515

1616
[^1]: See `environments/common/inventory/group_vars/builder/defaults.yml`
1717

ansible/roles/freeipa/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Support FreeIPA in the appliance. In production use it is expected the FreeIPA s
77

88
## Usage
99
- Add hosts to the `freeipa_client` group and run (at a minimum) the `ansible/iam.yml` playbook.
10-
- Host names must match the domain name. By default (using the skeleton OpenTofu) hostnames are of the form `nodename.cluster_name.cluster_domain_suffix` where `cluster_name` and `cluster_domain_suffix` are OpenTofu variables.
10+
- Host names must match the domain name. By default (using the site OpenTofu) hostnames are of the form `nodename.cluster_name.cluster_domain_suffix` where `cluster_name` and `cluster_domain_suffix` are OpenTofu variables.
1111
- Hosts discover the FreeIPA server FQDN (and their own domain) from DNS records. If DNS servers are not set this is not set from DHCP, then use the `resolv_conf` role to configure this. For example when using the in-appliance FreeIPA development server:
1212

1313
```ini
@@ -28,7 +28,7 @@ Support FreeIPA in the appliance. In production use it is expected the FreeIPA s
2828
- For production use with an external FreeIPA server, a random one-time password (OTP) must be generated when adding hosts to FreeIPA (e.g. using `ipa host-add --random ...`). This password should be set as a hostvar `freeipa_host_password`. Initial host enrolment will use this OTP to enrol the host. After this it becomes irrelevant so it does not need to be committed to git. This approach means the appliance does not require the FreeIPA administrator password.
2929
- For development use with the in-appliance FreeIPA server, `freeipa_host_password` will be automatically generated in memory.
3030
- The `control` host must define `appliances_state_dir` (on persistent storage). This is used to back-up keytabs to allow FreeIPA clients to automatically re-enrol after e.g. reimaging. Note that:
31-
- This is implemented when using the skeleton OpenTofu; on the control node `appliances_state_dir` defaults to `/var/lib/state` which is mounted from a volume.
31+
- This is implemented when using the site OpenTofu; on the control node `appliances_state_dir` defaults to `/var/lib/state` which is mounted from a volume.
3232
- Nodes are not re-enroled by a [Slurm-driven reimage](../../collections/ansible_collections/stackhpc/slurm_openstack_tools/roles/rebuild/README.md) (as that does not run this role).
3333
- If both a backed-up keytab and `freeipa_host_password` exist, the former is used.
3434

File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[defaults]
2+
any_errors_fatal = True
3+
stdout_callback = debug
4+
stderr_callback = debug
5+
gathering = smart
6+
forks = 30
7+
host_key_checking = False
8+
inventory = ../common/inventory,../site/inventory,inventory
9+
collections_path = ../../ansible/collections
10+
roles_path = ../../ansible/roles
11+
filter_plugins = ../../ansible/filter_plugins
12+
13+
[ssh_connection]
14+
ssh_args = -o ServerAliveInterval=10 -o ControlMaster=auto -o ControlPath=~/.ssh/%r@%h-%p -o ControlPersist=240s -o PreferredAuthentications=publickey -o UserKnownHostsFile=/dev/null
15+
pipelining = True
16+
17+
[inventory]
18+
# Fail when any inventory source cannot be parsed.
19+
any_unparsed_is_failed = True

0 commit comments

Comments
 (0)