Spaces:
Sleeping
Sleeping
Commit
·
162c75a
1
Parent(s):
fd26b3d
Add permission fix guide for spherical-gate-477614-q7 project
Browse files- FIX_PERMISSIONS.md +75 -0
FIX_PERMISSIONS.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Fix GCP Permissions for Deployment
|
| 2 |
+
|
| 3 |
+
## Current Issue
|
| 4 |
+
|
| 5 |
+
Your account (`[email protected]`) needs permissions on project `spherical-gate-477614-q7`.
|
| 6 |
+
|
| 7 |
+
## Required Permissions
|
| 8 |
+
|
| 9 |
+
You need one of these roles on the project:
|
| 10 |
+
- **Editor** (recommended) - Full access except billing/admin
|
| 11 |
+
- **Owner** - Full access including billing
|
| 12 |
+
- Or these specific roles:
|
| 13 |
+
- `roles/cloudbuild.builds.editor`
|
| 14 |
+
- `roles/run.admin`
|
| 15 |
+
- `roles/serviceusage.serviceUsageConsumer`
|
| 16 |
+
- `roles/storage.admin`
|
| 17 |
+
|
| 18 |
+
## Steps to Fix
|
| 19 |
+
|
| 20 |
+
### Step 1: Grant Permissions
|
| 21 |
+
|
| 22 |
+
1. Visit: https://console.cloud.google.com/iam-admin/iam/project?project=spherical-gate-477614-q7
|
| 23 |
+
2. Click **"Grant Access"** or **"Add Principal"**
|
| 24 |
+
3. Enter your email: `[email protected]`
|
| 25 |
+
4. Select role: **Editor** (or **Owner**)
|
| 26 |
+
5. Click **Save**
|
| 27 |
+
6. **Wait 2-3 minutes** for permissions to propagate
|
| 28 |
+
|
| 29 |
+
### Step 2: Enable APIs
|
| 30 |
+
|
| 31 |
+
After permissions are granted, run:
|
| 32 |
+
|
| 33 |
+
```bash
|
| 34 |
+
gcloud config set project spherical-gate-477614-q7
|
| 35 |
+
gcloud services enable cloudbuild.googleapis.com run.googleapis.com containerregistry.googleapis.com
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
### Step 3: Deploy
|
| 39 |
+
|
| 40 |
+
```bash
|
| 41 |
+
cd Milestone-6/router-agent/zero-gpu-space
|
| 42 |
+
export GCP_PROJECT_ID="spherical-gate-477614-q7"
|
| 43 |
+
./deploy-cloud-build.sh
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
## Alternative: Use Service Account
|
| 47 |
+
|
| 48 |
+
If you can't get user permissions, create a service account:
|
| 49 |
+
|
| 50 |
+
```bash
|
| 51 |
+
# Create service account
|
| 52 |
+
gcloud iam service-accounts create router-agent-deploy \
|
| 53 |
+
--display-name="Router Agent Deployment" \
|
| 54 |
+
--project=spherical-gate-477614-q7
|
| 55 |
+
|
| 56 |
+
# Grant permissions
|
| 57 |
+
gcloud projects add-iam-policy-binding spherical-gate-477614-q7 \
|
| 58 |
+
--member="serviceAccount:router-agent-deploy@spherical-gate-477614-q7.iam.gserviceaccount.com" \
|
| 59 |
+
--role="roles/editor"
|
| 60 |
+
|
| 61 |
+
# Use service account
|
| 62 |
+
gcloud auth activate-service-account router-agent-deploy@spherical-gate-477614-q7.iam.gserviceaccount.com \
|
| 63 |
+
--key-file=path/to/key.json
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Quick Test
|
| 67 |
+
|
| 68 |
+
Test if permissions are working:
|
| 69 |
+
|
| 70 |
+
```bash
|
| 71 |
+
gcloud projects describe spherical-gate-477614-q7
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
If this works, you're ready to deploy!
|
| 75 |
+
|