-
Notifications
You must be signed in to change notification settings - Fork 17
Add central config/ folder with sync-to-canonical #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
b40957d
f152d1e
114df4a
b42c431
9801c85
ad60942
45003b2
0a43cbf
814c64e
6b0b331
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| # Configuration for ansible-lint, run via `make ansible-lint` (hack/ansible-lint.sh). | ||
| profile: basic | ||
|
|
||
| # Collections are pre-installed by hack/ansible-lint.sh; never reach out to galaxy. | ||
| offline: true | ||
|
|
||
| exclude_paths: | ||
| # Claude Code skill/command content, not Ansible | ||
| - .claude/ | ||
| # CloudFormation templates, not Ansible | ||
| - deploy/aws-hypervisor/templates/ | ||
|
|
||
| # Roles are resolved relative to deploy/openshift-clusters/ at runtime, which | ||
| # ansible-lint cannot see when invoked from the repository root. | ||
| mock_roles: | ||
| - git-user | ||
|
|
||
| # Baseline debt: rules that fire on the pre-existing tree. New violations of any | ||
| # rule NOT listed here fail `make verify`. Burn these down over time by fixing | ||
| # the findings and removing entries from this list. | ||
| skip_list: | ||
| - command-instead-of-module | ||
| - command-instead-of-shell | ||
| - jinja[spacing] | ||
| - key-order[task] | ||
| - literal-compare | ||
| - name[casing] | ||
| - name[missing] | ||
| - name[play] | ||
| - name[template] | ||
| - role-name | ||
| - role-name[path] | ||
| - schema[playbook] | ||
| - var-naming[no-role-prefix] | ||
| - var-naming[read-only] | ||
| - yaml[empty-lines] | ||
| - yaml[line-length] | ||
| - yaml[new-line-at-end-of-file] | ||
| - yaml[trailing-spaces] | ||
| - yaml[truthy] |
| 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 | |
|
|
||
| If no SSH key exists, create one with: `ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519` | ||
|
|
||
| **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. | ||
| **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. | ||
|
|
||
| ### Inventory File | ||
|
|
||
|
|
@@ -60,22 +60,19 @@ Required for: external, kcli, dev-scripts | |
|
|
||
| Required for: kcli, dev-scripts | ||
|
|
||
| The same pull secret is used by both kcli and dev-scripts (stored in different locations). | ||
|
|
||
| - kcli location: [deploy/openshift-clusters/roles/kcli/kcli-install/files/pull-secret.json](deploy/openshift-clusters/roles/kcli/kcli-install/files/pull-secret.json) | ||
| - dev-scripts location: [deploy/openshift-clusters/roles/dev-scripts/install-dev/files/pull-secret.json](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/pull-secret.json) | ||
| 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. | ||
|
|
||
| **Setup logic:** | ||
| - Check if file exists in either location | ||
| - If it exists in one location, offer to copy it to the other | ||
| - Check if [config/pull-secret.json](config/pull-secret.json) exists | ||
| - 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 | ||
| - If it doesn't exist anywhere: | ||
| - User gets pull secret from: https://cloud.redhat.com/openshift/install/pull-secret | ||
| - **For CI builds**: Must include `registry.ci.openshift.org` access (see [CI Token](#ci-token) below) | ||
| - Suggest creating file and pasting content | ||
| - Suggest creating [config/pull-secret.json](config/pull-secret.json) and pasting content | ||
|
|
||
| **Validation:** | ||
| - Validate pull secret is valid JSON: `jq . < <path-to-pull-secret>` | ||
| - Check for CI registry access (if needed): `jq '.auths | has("registry.ci.openshift.org")' < <path-to-pull-secret>` | ||
| - Validate pull secret is valid JSON: `jq . < config/pull-secret.json` | ||
| - Check for CI registry access (if needed): `jq '.auths | has("registry.ci.openshift.org")' < config/pull-secret.json` | ||
|
|
||
| ### CI Token | ||
|
|
||
|
|
@@ -107,10 +104,11 @@ Required for: dev-scripts (when using CI builds) | |
| - `export RHSM_ORG="your-org-id"` | ||
| - Guide: https://access.redhat.com/solutions/3341191 | ||
|
|
||
| - **Option B**: Local config file [vars/init-host.yml.local](vars/init-host.yml.local) | ||
| - Template: [vars/init-host.yml.sample](vars/init-host.yml.sample) | ||
| - Check if exists | ||
| - Suggest copying: `cp vars/init-host.yml.sample vars/init-host.yml.local` | ||
| - **Option B**: Local config file [config/init-host.yml.local](config/init-host.yml.local) | ||
| - Base file: [deploy/openshift-clusters/vars/init-host.yml](deploy/openshift-clusters/vars/init-host.yml) | ||
| - Check if exists (also accept the direct-edit location `deploy/openshift-clusters/vars/init-host.yml.local`) | ||
| - Suggest copying: `cp deploy/openshift-clusters/vars/init-host.yml config/init-host.yml.local` | ||
| - The sync distributes it to `deploy/openshift-clusters/vars/init-host.yml.local`; suggest `cd deploy && make sync-config` before running the playbook directly | ||
|
|
||
| - **Option C**: Command line (they'll add when running playbook) | ||
|
|
||
|
|
@@ -135,17 +133,18 @@ Required for: dev-scripts (when using CI builds) | |
|
|
||
| **Files to configure:** | ||
|
|
||
| 1. **Instance environment**: [deploy/aws-hypervisor/instance.env](deploy/aws-hypervisor/instance.env) | ||
| - Template: [deploy/aws-hypervisor/instance.env.template](deploy/aws-hypervisor/instance.env.template) | ||
| - Check if it exists | ||
| 1. **Instance environment**: [config/instance.env](config/instance.env) | ||
| - Template: [config/instance.env.template](config/instance.env.template) | ||
| - Check if it exists (also accept the direct-edit location [deploy/aws-hypervisor/instance.env](deploy/aws-hypervisor/instance.env)) | ||
| - User must edit ALL variables with their specific values | ||
| - Optional: Set `RHSM_ACTIVATION_KEY` and `RHSM_ORG` for hands-off deployment | ||
| - Guide: https://access.redhat.com/solutions/3341191 | ||
| - Suggest copying: `cp deploy/aws-hypervisor/instance.env.template deploy/aws-hypervisor/instance.env` | ||
| - Suggest copying: `cp config/instance.env.template config/instance.env` | ||
| - Every `make` target syncs it to `deploy/aws-hypervisor/instance.env` where the scripts read it | ||
|
|
||
| **Validation:** | ||
| - Verify [deploy/aws-hypervisor/instance.env](deploy/aws-hypervisor/instance.env) exists | ||
| - Test by sourcing: `source deploy/aws-hypervisor/instance.env` (should not error) | ||
| - Verify [config/instance.env](config/instance.env) (or `deploy/aws-hypervisor/instance.env`) exists | ||
| - Test by sourcing: `source config/instance.env` (should not error) | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| **Next steps:** | ||
| - Quick deploy: `cd deploy && make deploy arbiter-ipi` | ||
|
|
@@ -165,11 +164,12 @@ Required for: dev-scripts (when using CI builds) | |
|
|
||
| **Files to configure:** | ||
|
|
||
| 1. **Optional persistent config**: [deploy/openshift-clusters/vars/kcli.yml](deploy/openshift-clusters/vars/kcli.yml) | ||
| - Template: [deploy/openshift-clusters/vars/kcli.yml.template](deploy/openshift-clusters/vars/kcli.yml.template) | ||
| - Check if exists | ||
| 1. **Optional persistent config**: [config/kcli.yml](config/kcli.yml) | ||
| - Template: [config/kcli.yml.template](config/kcli.yml.template) | ||
| - Check if exists (also accept the direct-edit location [deploy/openshift-clusters/vars/kcli.yml](deploy/openshift-clusters/vars/kcli.yml)) | ||
| - For setting preferred defaults (cluster name, resources, etc.) | ||
| - Suggest copying: `cp deploy/openshift-clusters/vars/kcli.yml.template deploy/openshift-clusters/vars/kcli.yml` | ||
| - Suggest copying: `cp config/kcli.yml.template config/kcli.yml` | ||
| - The sync distributes it to `deploy/openshift-clusters/vars/kcli.yml`; suggest `cd deploy && make sync-config` before running the playbook directly | ||
|
|
||
| **Validation:** | ||
| - Verify inventory file exists | ||
|
|
@@ -192,28 +192,29 @@ Required for: dev-scripts (when using CI builds) | |
|
|
||
| **Files to configure:** | ||
|
|
||
| 1. **Topology config files** in [deploy/openshift-clusters/roles/dev-scripts/install-dev/files/](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/): | ||
| 1. **Topology config files** in [config/](config/): | ||
|
|
||
| a. **Arbiter config**: [config_arbiter.sh](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_arbiter.sh) | ||
| - Template: [config_arbiter_example.sh](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_arbiter_example.sh) | ||
| - Check if exists | ||
| a. **Arbiter config**: [config/config_arbiter.sh](config/config_arbiter.sh) | ||
| - Template: [config/config_arbiter_example.sh](config/config_arbiter_example.sh) | ||
| - Check if exists (also accept the direct-edit location `deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_arbiter.sh`) | ||
| - User must set: | ||
| - `OPENSHIFT_RELEASE_IMAGE` (e.g., `quay.io/openshift-release-dev/ocp-release:4.19.0-rc.5-multi-x86_64`) | ||
| - `CI_TOKEN` (see [CI Token](#ci-token)) unless using `OPENSHIFT_CI="True"` | ||
| - Suggest copying: `cp deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_arbiter_example.sh deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_arbiter.sh` | ||
| - Suggest copying: `cp config/config_arbiter_example.sh config/config_arbiter.sh` | ||
|
|
||
| b. **Fencing config**: [config_fencing.sh](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing.sh) | ||
| - Template: [config_fencing_example.sh](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing_example.sh) | ||
| - Check if exists | ||
| b. **Fencing config**: [config/config_fencing.sh](config/config_fencing.sh) | ||
| - Template: [config/config_fencing_example.sh](config/config_fencing_example.sh) | ||
| - Check if exists (also accept the direct-edit location `deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing.sh`) | ||
| - Same requirements as arbiter config | ||
| - Suggest copying: `cp deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing_example.sh deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing.sh` | ||
| - Suggest copying: `cp config/config_fencing_example.sh config/config_fencing.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 | ||
| - **Config reference**: https://github.com/openshift-metal3/dev-scripts/blob/master/config_example.sh | ||
|
Comment on lines
+211
to
212
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Fix the nested list indentation. The bullet indentation under the numbered item is inconsistent here and triggers MD005. Based on static analysis, align it with the sibling list items. 🧰 Tools🪛 markdownlint-cli2 (0.22.1)[warning] 211-211: Inconsistent indentation for list items at the same level (MD005, list-indent) [warning] 212-212: Inconsistent indentation for list items at the same level (MD005, list-indent) 🤖 Prompt for AI AgentsSource: Linters/SAST tools
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't fix — this is a Claude Code prompt file, not rendered documentation.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| **Validation:** | ||
| - Verify inventory file exists | ||
| - For arbiter: Check [config_arbiter.sh](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_arbiter.sh) exists | ||
| - For fencing: Check [config_fencing.sh](deploy/openshift-clusters/roles/dev-scripts/install-dev/files/config_fencing.sh) exists | ||
| - For arbiter: Check [config/config_arbiter.sh](config/config_arbiter.sh) (or the direct-edit location) exists | ||
| - For fencing: Check [config/config_fencing.sh](config/config_fencing.sh) (or the direct-edit location) exists | ||
| - Verify pull secret exists and is valid JSON | ||
|
|
||
| **Next steps:** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Real config files (created by the user, may contain credentials) must never | ||
| # be committed. Only templates, examples, the README, and this file are tracked. | ||
| * | ||
| !.gitignore | ||
| !README.md | ||
| !*.template | ||
| !config_*_example.sh |
Uh oh!
There was an error while loading. Please reload this page.