Skip to content

Commit b4468c1

Browse files
committed
remove references to my local paths on hack run scripts;
update README to reflect the new changes (gcs) and link the new MD files
1 parent 212f59e commit b4468c1

File tree

3 files changed

+92
-13
lines changed

3 files changed

+92
-13
lines changed

README.md

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,83 @@ You'll be placed in a new channel with the App, and you'll be ready to begin lau
66

77
To see the available commands, type `help`.
88

9-
## Authorization System
9+
## Features
1010

11-
The cluster-bot includes an organizational data-based authorization system that controls access to commands based on team membership, organization affiliation, or individual user permissions.
11+
### 🔐 **Advanced Authorization System**
12+
- **Organizational data-based access control** using pre-computed indexes for fast lookups
13+
- **Multiple authorization levels**: User UID, team membership, organization-based permissions
14+
- **Hot reload**: Automatic updates when organizational data or authorization config changes
15+
- **Complete hierarchy support**: Teams → Organizations → Pillars → Team Groups
1216

13-
- Use `@cluster-bot whoami` to see your permissions and available commands
14-
- Administrators can configure access rules in `authorization.yaml`
15-
- See [AUTHORIZATION.md](AUTHORIZATION.md) for detailed setup and configuration instructions
17+
### ☁️ **Flexible Data Sources**
18+
- **Local files**: Development and testing with JSON files
19+
- **Google Cloud Storage**: Production deployments with secure, cross-cluster access
20+
- **Hot reload**: Both file watching and GCS polling for live updates
21+
- **Pluggable architecture**: Easy to extend with new data sources
22+
23+
### 🚀 **Production Ready**
24+
- **Fast performance**: O(1) organizational lookups with pre-computed indexes
25+
- **Thread-safe**: Concurrent access with read-write mutex protection
26+
- **Build flexibility**: Optional GCS support with build tags (`-tags gcs`)
27+
- **Secure authentication**: Application Default Credentials for GCS
28+
29+
## Quick Start
30+
31+
### Option 1: Local Development
32+
```bash
33+
# Set your organizational data file
34+
export ORGDATA_PATHS="/path/to/comprehensive_index_dump.json"
35+
36+
# Start the bot
37+
./hack/run.sh
38+
```
39+
40+
### Option 2: Google Cloud Storage
41+
```bash
42+
# Build with GCS support
43+
make BUILD_FLAGS="-tags gcs" build
44+
45+
# Quick start with GCS
46+
./hack/run-with-gcs.sh
47+
48+
# Or configure manually
49+
export USE_GCS_ORGDATA=true
50+
export GCS_BUCKET="your-bucket"
51+
export GCS_OBJECT_PATH="orgdata/comprehensive_index_dump.json"
52+
./hack/run.sh
53+
```
54+
55+
### Check Your Permissions
56+
```
57+
@cluster-bot whoami
58+
```
59+
60+
## Documentation
61+
62+
- 📖 **[AUTHORIZATION.md](AUTHORIZATION.md)** - Complete authorization system setup and configuration
63+
- 🛠️ **[hack/DEVELOPMENT.md](hack/DEVELOPMENT.md)** - Detailed development setup guide
64+
-**[docs/FAQ.md](docs/FAQ.md)** - Frequently asked questions
65+
66+
## Build Options
67+
68+
```bash
69+
# Standard build (file-based data sources only)
70+
make build
71+
72+
# Build with GCS support
73+
make BUILD_FLAGS="-tags gcs" build
74+
75+
# See all available targets
76+
make help-ci-chat-bot
77+
```
78+
79+
## Getting Help
1680

1781
For any questions, concerns, comments, etc, please reach out in the `#forum-ocp-crt` channel.
1882

1983
## Links
2084
* [OpenShift Releases](https://amd64.ocp.releases.ci.openshift.org/)
85+
* [Authorization System Documentation](AUTHORIZATION.md) - Complete setup guide
86+
* [Development Guide](hack/DEVELOPMENT.md) - Local development setup
2187
* [Frequently Asked Questions](docs/FAQ.md)
22-
* [Authorization System Documentation](AUTHORIZATION.md)
88+
* [Makefile Help](Makefile) - Run `make help-ci-chat-bot` for build options

hack/DEVELOPMENT.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export GCS_CREDENTIALS_JSON='{"type":"service_account",...}' # Optional: explic
2727
**Option 2: Use Local Files (Development)**
2828
```bash
2929
export ORGDATA_PATHS="/path/to/your/comprehensive_index_dump.json"
30-
# Default: ../cyborg/org_tools/comprehensive_index_dump.json (relative to ci-chat-bot)
30+
# Default: test-data/comprehensive_index_dump.json (relative to ci-chat-bot)
31+
# You can generate this file using the Python orglib indexing system
3132
```
3233

3334
#### Authorization Configuration
@@ -71,9 +72,9 @@ workspace/
7172
│ │ ├── run.sh # Main development script
7273
│ │ └── run-with-gcs.sh # GCS convenience script
7374
│ └── test-authorization.yaml # Default auth config
74-
├── cyborg/ # Optional: orgdata repository
75-
── org_tools/
76-
└── comprehensive_index_dump.json
75+
├── test-data/ # Test data and examples
76+
── comprehensive_index_dump.json # Sample orgdata file
77+
│ └── orgdata.json # Legacy test data
7778
└── release/ # OpenShift release repository (required)
7879
├── ci-operator/
7980
└── core-services/
@@ -140,9 +141,14 @@ export AUTH_CONFIG="/path/to/my-auth-config.yaml"
140141
### File Not Found Errors
141142
If you see errors about missing files:
142143
1. Check that `ORGDATA_PATHS` points to a valid file
143-
2. Ensure the `../cyborg` directory exists if using defaults
144+
2. Generate or obtain a `comprehensive_index_dump.json` file from your orgdata system
144145
3. Verify the `../release` directory exists (OpenShift release repo)
145146

147+
To generate organizational data:
148+
- Use the Python `orglib` indexing system to create `comprehensive_index_dump.json`
149+
- Or obtain the file from your organization's data pipeline
150+
- See the cyborg/org_tools project for data generation examples
151+
146152
### GCS Authentication Errors
147153
If GCS fails to authenticate:
148154
1. **Check authentication**: `gcloud auth list`

hack/run.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,16 @@ if [[ "${USE_GCS_ORGDATA:-false}" == "true" ]]; then
5353
fi
5454
else
5555
echo "Using local file-based orgdata..."
56-
# Default to local file-based orgdata (relative to project root)
57-
default_orgdata="${work_dir}/../cyborg/org_tools/comprehensive_index_dump.json"
56+
# Default orgdata path (can be overridden with ORGDATA_PATHS env var)
57+
# Users should set ORGDATA_PATHS to point to their comprehensive_index_dump.json file
58+
default_orgdata="${work_dir}/test-data/comprehensive_index_dump.json"
5859
ORGDATA_PATHS="${ORGDATA_PATHS:-${default_orgdata}}"
60+
61+
if [[ ! -f "$ORGDATA_PATHS" ]]; then
62+
echo "⚠️ Warning: Orgdata file not found at: $ORGDATA_PATHS"
63+
echo " Set ORGDATA_PATHS environment variable to your comprehensive_index_dump.json file"
64+
echo " Example: export ORGDATA_PATHS=\"/path/to/comprehensive_index_dump.json\""
65+
fi
5966
orgdata_flags="--orgdata-paths=${ORGDATA_PATHS}"
6067
echo "Orgdata file: ${ORGDATA_PATHS}"
6168
fi

0 commit comments

Comments
 (0)