You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add central config/ folder with sync-to-canonical
Add a single config/ folder at the repository root where users create
their configuration files. Every make-accessible script syncs config/
files to their canonical locations (newer-wins, never deletes) before
doing anything else; the playbooks and roles keep reading from the
canonical locations unchanged.
- Move all templates and example configs into config/ (single source):
instance.env.template, config_*_example.sh, kcli.yml.template,
assisted.yml.template, plus a README map and a .gitignore that
prevents real config files (including the pull secret) from ever
being committed
- Add sync_config_files() to aws-hypervisor/scripts/common.sh with a
manifest of src:dest[:dest2] entries; the pull secret fans out to
both the dev-scripts and kcli role locations
- Restructure common.sh so the sync runs before instance.env is
sourced, and replace the raw missing-file source error with an
actionable hint
- Add 'make sync-config' for users who invoke ansible-playbook
directly, and register init-host.yml.local in the manifest (it is
consumed by init-host.yml)
- Source common.sh from get-tnf-logs.sh and helpers/keep-instance.sh
so every make target inherits the sync
- Gitignore vars/assisted.yml (contains credentials, was not ignored)
- Update all docs and the /setup command to point at config/, keeping
a note that editing canonical locations directly still works
Backwards compatible: config/ ships with templates only, so the sync
is a no-op until the user explicitly creates a file there.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mk1uuxv3YkApKm8w55Kxjd
Copy file name to clipboardExpand all lines: .claude/commands/setup.md
+36-35Lines changed: 36 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ All deployment methods require an SSH key on the local machine. Check for any of
37
37
38
38
If no SSH key exists, create one with: `ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519`
39
39
40
-
**Note for non-default key paths:** Set `SSH_PUBLIC_KEY` in [deploy/aws-hypervisor/instance.env](deploy/aws-hypervisor/instance.env). This is used by both the AWS hypervisor and dev-scripts deployments.
40
+
**Note for non-default key paths:** Set `SSH_PUBLIC_KEY` in [config/instance.env](config/instance.env). This is used by both the AWS hypervisor and dev-scripts deployments.
The same pull secret is used by both kcli and dev-scripts. Create it once in the central config folder: [config/pull-secret.json](config/pull-secret.json). The sync (run by every `make` target, or explicitly via `cd deploy && make sync-config`) distributes it to both role locations automatically.
67
64
68
65
**Setup logic:**
69
-
- Check if file exists in either location
70
-
- If it exists in one location, offer to copy it to the other
66
+
- Check if [config/pull-secret.json](config/pull-secret.json) exists
67
+
- If not, check the canonical locations (`deploy/openshift-clusters/roles/dev-scripts/install-dev/files/pull-secret.json` and `deploy/openshift-clusters/roles/kcli/kcli-install/files/pull-secret.json`) - a file there means the user configured it the direct-edit way, which is still valid
71
68
- If it doesn't exist anywhere:
72
69
- User gets pull secret from: https://cloud.redhat.com/openshift/install/pull-secret
73
70
-**For CI builds**: Must include `registry.ci.openshift.org` access (see [CI Token](#ci-token) below)
74
-
- Suggest creating file and pasting content
71
+
- Suggest creating [config/pull-secret.json](config/pull-secret.json) and pasting content
- The sync distributes it to `deploy/openshift-clusters/vars/init-host.yml.local`; suggest `cd deploy && make sync-config` before running the playbook directly
114
112
115
113
-**Option C**: Command line (they'll add when running playbook)
116
114
@@ -135,17 +133,18 @@ Required for: dev-scripts (when using CI builds)
- The sync distributes it to `deploy/openshift-clusters/vars/kcli.yml`; suggest `cd deploy && make sync-config` before running the playbook directly
173
173
174
174
**Validation:**
175
175
- Verify inventory file exists
@@ -192,28 +192,29 @@ Required for: dev-scripts (when using CI builds)
192
192
193
193
**Files to configure:**
194
194
195
-
1.**Topology config files** in [deploy/openshift-clusters/roles/dev-scripts/install-dev/files/](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/):
195
+
1.**Topology config files** in [config/](config/):
196
196
197
-
a. **Arbiter config**: [config_arbiter.sh](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_arbiter.sh)
- The sync distributes these to `deploy/openshift-clusters/roles/dev-scripts/install-dev/files/`; suggest `cd deploy && make sync-config` before running the playbook directly
# Deploy hub + spoke TNF cluster via assisted installer
79
79
make deploy fencing-assisted
@@ -130,20 +130,30 @@ make ansible-lint
130
130
131
131
### Key Configuration Files
132
132
133
-
#### Dev-scripts Method
134
-
-`inventory.ini`: Ansible inventory (copy from `inventory.ini.sample`)
133
+
#### Central config/ Folder
134
+
User configuration files are created in `config/` at the repository root (templates and examples live there; see `config/README.md`). Every make-accessible script syncs `config/` files to the canonical locations below before doing anything else (newer-wins, never deletes); `make sync-config` runs the sync explicitly. Editing the canonical locations directly still works: a `config/` file only becomes authoritative once the user creates it.
135
+
136
+
-`config/instance.env`: AWS hypervisor settings (copy from `config/instance.env.template`)
137
+
-`config/pull-secret.json`: OpenShift pull secret, fanned out to both dev-scripts and kcli role locations
138
+
-`config/config_arbiter.sh`, `config/config_fencing.sh`, `config/config_sno.sh`: dev-scripts topology configs (copy from the `config/config_*_example.sh` files)
139
+
-`config/kcli.yml`: kcli variable overrides (copy from `config/kcli.yml.template`)
140
+
-`config/assisted.yml`: assisted installer variables (copy from `config/assisted.yml.template`)
141
+
-`config/init-host.yml.local`: external-host RHSM overrides (copy from `deploy/openshift-clusters/vars/init-host.yml`)
142
+
143
+
#### Dev-scripts Method (canonical locations)
144
+
-`inventory.ini`: Ansible inventory (copy from `inventory.ini.sample`; generated by `make inventory` on AWS)
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ This repository provides automation for deploying and managing two-node OpenShif
6
6
7
7
## Quick Start
8
8
9
+
Configuration files (instance settings, pull secret, topology configs) are created in the central [config/](config/) folder; see [config/README.md](config/README.md) for the full list. Every `make` command syncs them to the locations where the automation reads them. Editing the canonical locations directly still works as before.
10
+
9
11
### Option 1: AWS Hypervisor (Automated)
10
12
11
13
If you have AWS access, use the automated workflow. Most lifecycle operations can be performed from the [deploy](deploy/) folder using `make`:
If you created your configuration files in [config/](config/), run `make sync-config` from the [deploy/](deploy/) folder first to distribute them, since the playbooks are invoked directly here.
54
+
51
55
See [deploy/openshift-clusters/README-external-host.md](deploy/openshift-clusters/README-external-host.md) for detailed instructions.
|`pull-secret.json`| dev-scripts and kcli deployments |`deploy/openshift-clusters/roles/dev-scripts/install-dev/files/pull-secret.json` and `deploy/openshift-clusters/roles/kcli/kcli-install/files/pull-secret.json`| Paste your pull secret from <https://cloud.redhat.com/openshift/install/pull-secret>|
0 commit comments