- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
3.2 KiB
3.2 KiB
Cloudflare Credentials Configuration
✅ Credentials Loaded from .env
Cloudflare credentials are automatically loaded from the .env file in the project root:
CLOUDFLARE_ZONE_ID="43599eed5d83f1fa641f2aaa276d3c4d"
CLOUDFLARE_ACCOUNT_ID="52ad57a71671c5fc009edf0744658196"
CLOUDFLARE_API_TOKEN="CWNCvhFa0EgXsazoUrJyv1CS-ORoiMmgvM0zm47N"
Automatic Usage
All setup scripts automatically detect and use these credentials:
setup-cloudflare-tunnel.sh- Uses API token for authentication and DNS record creationsetup-cloudflare-tunnel-backend.sh- Uses account ID and API tokenautomated-cloudflare-setup.sh- Validates credentials and provides setup instructions
Script Behavior
With .env File Present
Scripts will:
- ✅ Automatically load credentials from
.env - ✅ Use API token for authentication (no browser login required)
- ✅ Create DNS records via Cloudflare API
- ✅ Skip manual credential entry prompts
Without .env File
Scripts will:
- ⚠️ Prompt for manual authentication via browser
- ⚠️ Require manual DNS record creation
- ⚠️ Require manual credential entry
Usage Examples
Automated Setup (Recommended)
# Run automated setup script (validates credentials and provides instructions)
cd terraform/phases/phase1
./scripts/automated-cloudflare-setup.sh rpc.yourdomain.com
Manual Setup with Auto-Loaded Credentials
# SSH to Nginx proxy
ssh besuadmin@20.160.58.99
# Script automatically loads credentials from .env
./setup-cloudflare-tunnel.sh rpc.yourdomain.com
Security Notes
- ✅
.envfile is in.gitignore(not committed to repository) - ✅ API token has limited permissions (only what's needed for tunnel setup)
- ✅ Credentials are only loaded when scripts are executed
- ⚠️ Never commit
.envfile to version control - ⚠️ Rotate API token if compromised
Troubleshooting
Credentials Not Found
If scripts can't find credentials:
-
Check .env file location:
ls -la /home/intlc/projects/smom-dbis-138/.env -
Verify credentials format:
grep CLOUDFLARE /home/intlc/projects/smom-dbis-138/.env -
Check script path resolution:
- Scripts look for
.envin project root:../../..from script directory - Ensure
.envis in/home/intlc/projects/smom-dbis-138/.env
- Scripts look for
API Token Invalid
If API token doesn't work:
- Verify token in Cloudflare Dashboard
- Check token permissions (needs DNS and Tunnel permissions)
- Regenerate token if needed
- Update
.envfile with new token
Zone ID Not Found
If zone ID is incorrect:
- Get correct zone ID from Cloudflare Dashboard
- Update
CLOUDFLARE_ZONE_IDin.env - Re-run setup script
Required Permissions
The Cloudflare API token needs:
- Zone: DNS Edit, Zone Read
- Account: Cloudflare Tunnel Edit
- Account: Account Read
Verification
Test credentials are working:
# Test API token
curl -X GET "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}" \
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
-H "Content-Type: application/json"
If successful, you'll see zone information. If not, check token permissions.