Skip to content

Commit aa0dc0a

Browse files
committed
wip: fixup main readme for new tofu config layout
1 parent 8a39330 commit aa0dc0a

1 file changed

Lines changed: 35 additions & 25 deletions

File tree

README.md

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -89,39 +89,49 @@ And generate secrets for it:
8989
ansible-playbook ansible/adhoc/generate-passwords.yml
9090
```
9191

92-
### Define and deploy infrastructure
92+
### Download appliance image to cloud
9393

94-
Create an OpenTofu variables file to define the required infrastructure, e.g.:
94+
TOOD
9595

96-
```text
97-
# environments/$ENV/tofu/terraform.tfvars:
98-
cluster_name = "mycluster"
99-
cluster_networks = [
100-
{
101-
network = "some_network" # *
102-
subnet = "some_subnet" # *
103-
}
104-
]
105-
key_pair = "my_key" # *
106-
control_node_flavor = "some_flavor_name"
107-
login = {
108-
# Arbitrary group name for these login nodes
109-
interactive = {
110-
nodes: ["login-0"]
111-
flavor: "login_flavor_name" # *
96+
### Define and deploy infrastructure
97+
98+
Modify the cookiecutter-gerated OpenTofu configuration to set the `null`
99+
values to define the required
100+
infrastructure, e.g.:
101+
102+
```hcl
103+
# environments/$ENV/tofu/main.tf:
104+
module "cluster" {
105+
source = "../../site/tofu/"
106+
environment_root = var.environment_root
107+
108+
cluster_name = "mycluster"
109+
cluster_image_id = "ddf666dd-977b-4a70-a83e-6272122d2fd8" # see above
110+
control_node_flavor = "m1.medium" # * Typically min. 2x vcpus / 4GB RAM
111+
cluster_networks = []
112+
{
113+
network = "network-name" # * must be able to connect to this from the deploy host
114+
subnet = "subnet-name" # *
112115
}
113-
}
114-
cluster_image_id = "rocky_linux_9_image_uuid"
115-
compute = {
116-
# Group name used for compute node partition definition
116+
key_pair = "my-keypair-name" # *
117+
login = {
118+
head = {
119+
nodes = ["login-0"]
120+
flavor = "m1.small" # * Typically min. 1x vpcu / 2GB RAM
121+
}
122+
}
123+
compute = {
117124
general = {
118-
nodes: ["compute-0", "compute-1"]
119-
flavor: "compute_flavor_name" # *
125+
nodes = ["compute-0", "compute-1"]
126+
flavor = "m1.small" # * Typically min. 1x vpcu / 2GB RAM
120127
}
128+
}
121129
}
122130
```
123131

124-
Variables marked `*` refer to OpenStack resources which must already exist. The above is a minimal configuration - for all variables and descriptions see `environments/$ENV/tofu/variables.tf`.
132+
Variables marked `*` refer to OpenStack resources which must already exist. The
133+
above is a minimal configuration - for all variables and descriptions see
134+
`environments/site/tofu/variables.tf`.
125135

126136
To deploy this infrastructure, ensure the venv and the environment are [activated](#create-a-new-environment) and run:
127137

0 commit comments

Comments
 (0)