Skip to content

Commit 4f1dbcf

Browse files
Merge pull request #142 from openshift-online/docs-remove-redundant
remove redundant docs
2 parents 181c524 + b0fff2e commit 4f1dbcf

File tree

10 files changed

+120
-454
lines changed

10 files changed

+120
-454
lines changed

README.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# rosa-regional-platform
22

3+
For the full architecture overview, see [docs/README.md](docs/README.md).
4+
35
## Repository Structure
46

57
```
@@ -10,7 +12,7 @@ rosa-regional-platform/
1012
│ ├── management-cluster/ # Management cluster application templates
1113
│ ├── regional-cluster/ # Regional cluster application templates
1214
│ └── shared/ # Shared configurations (ArgoCD, etc.)
13-
├── ci/ # CI automation (janitor, etc.)
15+
├── ci/ # CI automation (e2e tests, janitor)
1416
├── deploy/ # Per-environment deployment configs
1517
├── docs/ # Design documents and presentations
1618
├── hack/ # Developer utility scripts
@@ -22,30 +24,20 @@ rosa-regional-platform/
2224

2325
## Getting Started
2426

25-
### Cluster Provisioning
27+
### Pipeline-Based Provisioning (CI/CD)
2628

27-
Quick start (regional cluster):
29+
This is the standard way to provision a region. A central AWS account hosts CodePipelines that automatically provision Regional and Management Clusters when configuration is committed to Git.
2830

29-
```bash
30-
# One-time setup: Copy and edit configurations
31-
cp terraform/config/regional-cluster/terraform.tfvars.example \
32-
terraform/config/regional-cluster/terraform.tfvars
31+
See [Provision a New Central Pipeline](docs/central-pipeline-provisioning.md) for the full walkthrough.
3332

34-
# Provision complete regional cluster environment based on the .tfvars file
35-
make provision-regional
36-
```
33+
### Local Provisioning (Development)
3734

38-
Quick start (management cluster):
35+
> **Note:** Local provisioning is intended for development and debugging only. Prefer the pipeline-based approach above.
3936
40-
```bash
41-
# One-time setup: Copy and edit configurations
42-
cp terraform/config/management-cluster/terraform.tfvars.example \
43-
terraform/config/management-cluster/terraform.tfvars
37+
For manual provisioning using `make` targets and local `.tfvars` files, see [Local Region Provisioning](docs/full-region-provisioning.md). For all available `make` targets, run `make help`.
4438

45-
# Provision complete management cluster environment based on the .tfvars file
46-
make provision-management
47-
```
39+
## CI
4840

49-
### Available Make Targets
41+
CI is managed through the [OpenShift CI](https://docs.ci.openshift.org/) system (Prow + ci-operator). The job configuration lives in [openshift/release](https://github.com/openshift/release/tree/master/ci-operator/config/openshift-online/rosa-regional-platform).
5042

51-
For all `make` targets, see `make help`.
43+
For the list of jobs, how to trigger them, AWS credentials setup, and local execution, see [ci/README.md](ci/README.md).

argocd/README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,6 @@ The ApplicationSet will automatically discover and deploy new charts. Run `./scr
119119

120120
## How It Works
121121

122-
ArgoCD uses a **Matrix Generator** pattern with two generators:
122+
ArgoCD uses a **Matrix Generator** pattern combining a Git Generator (discovers Helm charts) with a Cluster Generator (reads cluster identity). Charts are sourced from either a pinned commit hash or the current git revision, while rendered values always come from the latest revision.
123123

124-
- **Git Generator**: Discovers Helm charts by scanning `argocd/config/{cluster_type}/*` and `argocd/config/shared/*`
125-
- **Cluster Generator**: Uses cluster secrets created during EKS provisioning (contains cluster identity: cluster_type, environment, region)
126-
127-
The Git Generator gets either:
128-
129-
- **Pinned commit hash** (when `config_revision` specified) for snapshotted charts
130-
- **Current git_revision** (when no `config_revision`) for live charts
131-
132-
**Application Sources:**
133-
134-
- **Charts & Default Values**: From `argocd/config/` at pinned commit OR current git_revision
135-
- **Rendered Values**: From `deploy/<env>/<region_deployment>/argocd/` at current git_revision (always latest environment config)
124+
For the full architecture, alternatives considered, and implementation details, see [GitOps Cluster Configuration](../docs/design/gitops-cluster-configuration.md).

argocd/config/regional-cluster/hyperfleet-system/README.md

Lines changed: 8 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -156,102 +156,16 @@ helm install hyperfleet-system ./argocd/config/regional-cluster/hyperfleet-syste
156156
--namespace hyperfleet-system
157157
```
158158

159-
## AWS Infrastructure Setup (Production Mode)
159+
## AWS Infrastructure Setup
160160

161-
### Prerequisites
162-
163-
Before deploying HyperFleet in production mode, provision AWS infrastructure using Terraform:
161+
Before deploying HyperFleet, provision the underlying AWS infrastructure (RDS, Amazon MQ, Secrets Manager, IAM roles) using Terraform. See the [HyperFleet Infrastructure module](../../../../terraform/modules/hyperfleet-infrastructure/README.md) for full details on resources created, configuration options, cost estimates, and troubleshooting.
164162

165163
```bash
166164
cd terraform/config/regional-cluster
167-
168-
# Apply HyperFleet infrastructure module
169165
terraform apply
170166
```
171167

172-
This creates:
173-
174-
- **Amazon RDS PostgreSQL** (db.t4g.micro for dev, configurable)
175-
- **Amazon MQ RabbitMQ** (mq.t3.micro for dev, configurable)
176-
- **AWS Secrets Manager** secrets (db-credentials, mq-credentials)
177-
- **IAM Roles** with Pod Identity associations (3 roles: API, Sentinel, Adapter)
178-
- **Security Groups** for RDS and Amazon MQ access from EKS
179-
180-
### How Pod Identity Works
181-
182-
1. **Service Account Annotation**: Each pod's service account is annotated with an IAM role ARN:
183-
184-
```yaml
185-
annotations:
186-
eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT:role/hyperfleet-api
187-
```
188-
189-
2. **Pod Identity Agent**: EKS Pod Identity agent authenticates the pod to AWS using the role
190-
191-
3. **SecretProviderClass**: AWS Secrets and Configuration Provider (ASCP) CSI driver mounts secrets:
192-
193-
```yaml
194-
apiVersion: secrets-store.csi.x-k8s.io/v1
195-
kind: SecretProviderClass
196-
spec:
197-
provider: aws
198-
parameters:
199-
usePodIdentity: "true"
200-
region: us-east-2
201-
objects: |
202-
- objectName: "hyperfleet/db-credentials"
203-
objectType: "secretsmanager"
204-
```
205-
206-
4. **Secret Mounting**: Secrets mounted at `/mnt/secrets-store/` contain credentials
207-
208-
5. **Kubernetes Secret Creation**: SecretProviderClass also creates Kubernetes Secrets for environment variables:
209-
210-
```yaml
211-
secretObjects:
212-
- secretName: hyperfleet-api-db-secret
213-
type: Opaque
214-
data:
215-
- objectName: db.host
216-
key: DB_HOST
217-
```
218-
219-
6. **Application Access**: Pods read connection details via:
220-
- **API**: Command-line flags pointing to mounted secret files (`--db-host-file=/mnt/secrets-store/db.host`)
221-
- **Sentinel/Adapter**: Environment variable `BROKER_RABBITMQ_URL` from Kubernetes Secret
222-
223-
### AWS Secrets Format
224-
225-
**Database Secret** (`hyperfleet/db-credentials`):
226-
227-
```json
228-
{
229-
"username": "hyperfleet_admin",
230-
"password": "GENERATED_PASSWORD",
231-
"host": "rds-endpoint.us-east-2.rds.amazonaws.com",
232-
"port": "5432",
233-
"database": "hyperfleet"
234-
}
235-
```
236-
237-
**Message Queue Secret** (`hyperfleet/mq-credentials`):
238-
239-
```json
240-
{
241-
"username": "hyperfleet_admin",
242-
"password": "GENERATED_PASSWORD",
243-
"host": "b-xxxxx.mq.us-east-2.on.aws",
244-
"port": "5671",
245-
"url": "amqps://hyperfleet_admin:PASSWORD@b-xxxxx.mq.us-east-2.on.aws:5671"
246-
}
247-
```
248-
249-
**Important**: Passwords are URL-encoded in the `url` field to handle special characters.
250-
251-
## Dependencies
252-
253-
- **AWS Secrets and Configuration Provider (ASCP)** CSI driver (installed on EKS cluster)
254-
- **AWS Infrastructure** (RDS, Amazon MQ, Secrets Manager, IAM roles) provisioned via Terraform
168+
The ASCP CSI driver must be installed on the EKS cluster for Pod Identity secret mounting.
255169

256170
## Verification
257171

@@ -342,70 +256,10 @@ kubectl get namespaces | grep test-cluster
342256

343257
## Production Considerations
344258

345-
Before deploying to production:
346-
347-
1. **Provision AWS Infrastructure**:
348-
- Run Terraform to create RDS, Amazon MQ, IAM roles, and secrets
349-
- Use appropriate instance sizes (not dev tier):
350-
- RDS: `db.t4g.large` or higher
351-
- Amazon MQ: `mq.m5.large` or higher with Multi-AZ deployment
352-
- Enable deletion protection and automated backups
353-
354-
2. **Configure Pod Identity Role ARNs**:
355-
- Add role ARNs to `config.yaml` for your region deployment:
356-
357-
```yaml
358-
values:
359-
regional-cluster:
360-
hyperfleet-system:
361-
hyperfleetApi:
362-
aws:
363-
podIdentity:
364-
roleArn: "arn:aws:iam::ACCOUNT:role/hyperfleet-api"
365-
hyperfleetSentinel:
366-
aws:
367-
podIdentity:
368-
roleArn: "arn:aws:iam::ACCOUNT:role/hyperfleet-sentinel"
369-
hyperfleetAdapter:
370-
aws:
371-
podIdentity:
372-
roleArn: "arn:aws:iam::ACCOUNT:role/hyperfleet-adapter"
373-
```
374-
375-
3. **Use Specific Image Tags**:
376-
377-
```yaml
378-
hyperfleetApi:
379-
image:
380-
tag: "v1.0.0" # Not "latest"
381-
```
382-
383-
4. **Enable Multi-AZ for High Availability**:
384-
- RDS: Set `db_multi_az = true` in Terraform
385-
- Amazon MQ: Set `mq_deployment_mode = "CLUSTER_MULTI_AZ"` in Terraform
386-
387-
5. **Enable Monitoring**:
388-
- CloudWatch metrics for RDS (CPU, connections, storage)
389-
- CloudWatch metrics for Amazon MQ (CPU, heap usage, queue depth)
390-
- Set up CloudWatch alarms for critical thresholds
391-
392-
6. **Configure Resource Limits** based on observed usage:
393-
394-
```yaml
395-
hyperfleetApi:
396-
resources:
397-
limits:
398-
cpu: 1000m
399-
memory: 1Gi
400-
requests:
401-
cpu: 500m
402-
memory: 512Mi
403-
```
404-
405-
7. **Secure Network Access**:
406-
- RDS and Amazon MQ are VPC-only (no public access)
407-
- Security groups restrict access to EKS cluster only
408-
- TLS/SSL enforced for all connections (RDS: `sslMode=require`, MQ: AMQPS port 5671)
259+
1. **Provision AWS Infrastructure** with production-tier settings — see [HyperFleet Infrastructure module](../../../../terraform/modules/hyperfleet-infrastructure/README.md) for recommended instance sizes, Multi-AZ, and monitoring setup
260+
2. **Configure Pod Identity Role ARNs** in `config.yaml` for your region deployment (role ARNs come from Terraform outputs)
261+
3. **Use specific image tags** (not `latest`)
262+
4. **Configure resource limits** based on observed usage
409263

410264
## Deployment Notes
411265

@@ -553,4 +407,4 @@ curl http://localhost:8000/api/hyperfleet/v1/clusters
553407

554408
## Related Documentation
555409

556-
- **Terraform Infrastructure Module**: `terraform/modules/hyperfleet-infrastructure/README.md`
410+
- **Terraform Infrastructure Module**: [terraform/modules/hyperfleet-infrastructure/README.md](../../../../terraform/modules/hyperfleet-infrastructure/README.md)

ci/README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
# CI
22

3+
CI is managed through the [OpenShift CI](https://docs.ci.openshift.org/) system (Prow + ci-operator). The job configuration lives in [openshift/release](https://github.com/openshift/release/tree/master/ci-operator/config/openshift-online/rosa-regional-platform).
4+
5+
## Jobs
6+
7+
| Job | Schedule | Description |
8+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- |
9+
| [`terraform-validate`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-terraform-validate) | Pre-submit | Runs `terraform validate` on all root modules |
10+
| [`helm-lint`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-helm-lint) | Pre-submit | Lints Helm charts |
11+
| [`check-rendered-files`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-check-rendered-files) | Pre-submit | Verifies rendered deploy files are up to date |
12+
| [`on-demand-e2e`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-on-demand-e2e) | Pre-submit (manual) | Full e2e: provisions ephemeral environment, runs tests, tears down. Trigger with `/test on-demand-e2e` on a PR |
13+
| [`nightly`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/periodic-ci-openshift-online-rosa-regional-platform-main-nightly) | Daily at 07:00 UTC | End-to-end provisioning and test suite against `main` |
14+
| [`nightly-resources-janitor`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/periodic-ci-openshift-online-rosa-regional-platform-main-nightly-resources-janitor) | Weekly (Sunday 12:00 UTC) | Purges leaked AWS resources using [aws-nuke](https://github.com/ekristen/aws-nuke) |
15+
16+
## Build Image
17+
18+
The CI image is built from [ci/Containerfile](ci/Containerfile) and includes all required tools (Terraform, Helm, AWS CLI, Python/uv, etc.).
19+
320
## Pre-merge / Ephemeral Environment
421

5-
The `ci/pre-merge.py` script manages ephemeral environments for CI testing. It supports two modes — provision and teardown — designed to run as separate CI steps with tests in between.
22+
The [ci/pre-merge.py](ci/pre-merge.py) script manages ephemeral environments for CI testing. It supports two modes — provision and teardown — designed to run as separate CI steps with tests in between.
623

724
1. Creates a CI-owned git branch from the source repo/branch
825
2. Bootstraps the pipeline-provisioner pointing at the CI branch
@@ -69,15 +86,12 @@ Logs are saved to `codebuild-logs-<ci-prefix>/`. The same download logic is used
6986
The e2e job uses three sets of AWS credentials (central, regional, and management accounts).
7087

7188
Credentials are stored in Vault at `kv/selfservice/cluster-secrets-rosa-regional-platform-int/nightly-static-aws-credentials` and mounted at `/var/run/rosa-credentials/` with keys:
89+
7290
- `ci_access_key`, `ci_secret_key`, `ci_assume_role_arn` — Central account (base credentials + AssumeRole)
7391
- `regional_access_key`, `regional_secret_key` — Regional sub-account
7492
- `management_access_key`, `management_secret_key` — Management sub-account
7593
- `github_token` — GitHub token with push access for creating CI branches
7694

77-
### Where things are defined
78-
79-
- **CI job config**: [`openshift/release``ci-operator/config/openshift-online/rosa-regional-platform/`](https://github.com/openshift/release/tree/master/ci-operator/config/openshift-online/rosa-regional-platform)
80-
8195
## Nightly Resources Janitor
8296

8397
The e2e tests create AWS resources across multiple accounts. Teardown relies on `terraform destroy`, which can fail and leak resources. The **nightly-resources-janitor** job is a weekly fallback that purges everything except resources we need to keep between tests using [aws-nuke](https://github.com/ekristen/aws-nuke).
@@ -97,7 +111,3 @@ See `./ci/aws-nuke-config.yaml`.
97111
```
98112

99113
The script uses whatever AWS credentials are active in your environment. The account must be in the allowlist in `purge-aws-account.sh`.
100-
101-
## Test Results
102-
103-
Results are available on the [OpenShift CI Prow dashboard](https://prow.ci.openshift.org/?job=periodic-ci-openshift-online-rosa-regional-platform-main-nightly).

0 commit comments

Comments
 (0)