Skip to content

Commit 79580ff

Browse files
committed
fix(restructure): improve onboarding guide
1 parent 521e05e commit 79580ff

File tree

1 file changed

+141
-148
lines changed

1 file changed

+141
-148
lines changed

docs/verifiable-ai-hackathon/0-onboarding-guide.mdx

Lines changed: 141 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
sidebar_position: 1
33
unlisted: true
44
slug: onboarding-guide
5-
title: Participant Onboarding
5+
title: Onboarding
66
description: Step-by-step guide for setting up infrastructure, credentials, and cloud instances for the Verifiable AI Hackathon.
77
keywords: [flare, ai, confidential-compute, hackathon, google-cloud, onboarding]
88
---
@@ -18,223 +18,216 @@ import Networking from "/static/img/verifiable-ai-hackathon/networking.png";
1818
import FinalStep from "/static/img/verifiable-ai-hackathon/final-step.png";
1919
import AddMetaData from "/static/img/verifiable-ai-hackathon/add-metadata.png";
2020

21-
# Participant Onboarding
21+
# Onboarding
2222

23-
This guide provides all necessary steps to get onboarded for the **Verifiable AI Hackathon**. Participants will set up their **Google Cloud infrastructure**, acquire necessary **API keys**, and deploy their **Confidential Compute VMs**.
23+
Welcome to the Verifiable AI Hackathon! This comprehensive guide will walk you through setting up your development environment, including Google Cloud infrastructure, API credentials, and Confidential Compute virtual machines.
2424

25-
## 1. Initial Setup
25+
## Before You Begin
2626

27-
### 1.1. Google Account
27+
- Plan for approximately 30-45 minutes to complete the entire setup
28+
- Keep track of your credentials in a secure location
29+
- If you encounter any issues, reach out to the support team via the hackathon Discord channels
2830

29-
- Create or use an existing Google account
30-
- This account will be used for all hackathon resources
31+
## Prerequisites
3132

32-
### 1.2. Project Registration
33+
### Required Google Account & Registration
3334

34-
- Submit your email address during registration
35-
- The Flare Infra Team will onboard you to `google-hackathon-project`
35+
- Use an existing Google account or create a new one
36+
- This account will be your primary access point for all hackathon resources
37+
- Submit your Google account email during the registration process
38+
- You'll receive access to the `google-hackathon-project` when approved, usually within a hour of submission
3639

37-
### 1.3. Gemini API Key
40+
### Setting up Gemini API access
3841

39-
1. Navigate to [Get a Gemini API key in Google AI Studio](https://aistudio.google.com/app/apikey)
40-
2. Click on "Create API key"
41-
3. Select `google-hackathon-project` from the dropdown
42-
4. Click "Create API key in existing project"
42+
1. Log into your registered Google account
43+
1. Visit the [Get a Gemini API key in Google AI Studio](https://aistudio.google.com/app/apikey) page
44+
1. Click on **Create API key**
45+
1. Select `google-hackathon-project` from the dropdown
46+
1. Click **Create API key in existing project**
47+
1. Store your API key securely
4348

44-
### 1.4. VM Instance Creation
49+
## Setting up a VM
4550

46-
Choose between CLI or Console setup methods detailed in Section 2.
51+
### Option A: Using gcloud CLI (Recommended)
4752

48-
## 2. VM Instance Setup Methods
53+
Follow these steps to set up a GCP instance using Confidential Space with Cloud Logging.
4954

50-
### 2.1. Option A: Using gcloud CLI (Recommended)
55+
#### Prerequisites
5156

52-
Follow these steps to set up a GCP instance using Confidential Space with Cloud Logging.
57+
1. **Install the gcloud CLI**
5358

54-
1. **Install gcloud CLI**
59+
- Follow the [gcloud CLI installation guide](https://cloud.google.com/sdk/docs/install) steps for your OS
5560

56-
- Follow the [gcloud CLI installation guide](https://cloud.google.com/sdk/docs/install)
61+
2. **Authenticate your CLI**
5762

58-
2. **Create VM Instance**
59-
Use the following command, replacing variables marked with `<>`:
63+
Use the same account used for hackathon registration
6064

6165
```bash
62-
gcloud compute instances create <INSTANCE_NAME> \
63-
--confidential-compute-type=TDX \
64-
--machine-type=c3-standard-4 \
65-
--maintenance-policy=TERMINATE \
66-
--zone=us-central1-c \
67-
--project=flare-network-sandbox \
68-
--network-interface=network-tier=PREMIUM,nic-type=GVNIC,stack-type=IPV4_ONLY,subnet=default \
69-
--metadata=tee-image-reference=<IMAGE_URL>,tee-container-log-redirect=true,tee-env-<ENV_VAR_NAME1>=<ENV_VAR_VALUE1>,tee-env-<ENV_VAR_NAME2>=<ENV_VAR_VALUE2> \
70-
--provisioning-model=STANDARD \
71-
--service-account=83674517876-compute@developer.gserviceaccount.com \
72-
--scopes=https://www.googleapis.com/auth/cloud-platform \
73-
--tags=<INSTANCE_NAME>,http-server,https-server \
74-
--create-disk=auto-delete=yes,boot=yes,device-name=<INSTANCE_NAME>,image=projects/confidential-space-images/global/images/confidential-space-debug-250100,mode=rw,size=11,type=pd-balanced \
75-
--shielded-secure-boot \
76-
--shielded-vtpm \
77-
--shielded-integrity-monitoring \
78-
--labels=goog-ec-src=vm_add-gcloud \
79-
--reservation-affinity=any
66+
gcloud auth login
8067
```
8168

82-
**Required Variables:**
83-
84-
- `<INSTANCE_NAME>`: Your instance name (e.g., flare-ai-core)
85-
- `<IMAGE_URL>`: Image path (e.g., ghcr.io/flare-foundation/flare-ai-core:main)
86-
- `<ENV_VAR_NAME1>`: First environment variable name (e.g., GEMINI_API_KEY)
87-
- `<ENV_VAR_VALUE1>`: First environment variable value
88-
- Add additional environment variables as needed
89-
90-
### 2.2. Option B: Using GCP Console
91-
92-
Follow these steps to set up a GCP instance using the web console.
93-
94-
1. **Access Console**
95-
96-
- Go to the [GCP Console](https://console.cloud.google.com/)
97-
- Click "Create Instance"
69+
#### Create VM Instance
70+
71+
Use the following command template, replacing the placeholder variables (`<>`):
72+
73+
```bash
74+
# highlight-next-line
75+
gcloud compute instances create <INSTANCE_NAME> \
76+
--project=google-hackathon-project \
77+
--zone=us-central1-c \
78+
--machine-type=n2d-standard-2 \
79+
--network-interface=network-tier=PREMIUM,nic-type=GVNIC,stack-type=IPV4_ONLY,subnet=default \
80+
# highlight-next-line
81+
--metadata=tee-image-reference=<IMAGE_URL>,tee-container-log-redirect=true,tee-env-<ENV_VAR_NAME1>=<ENV_VAR_VALUE1>,tee-env-<ENV_VAR_NAME2>=<ENV_VAR_VALUE2>\
82+
--maintenance-policy=MIGRATE \
83+
--provisioning-model=STANDARD \
84+
--service-account=confidential-sa@flare-network-sandbox.iam.gserviceaccount.com \
85+
--scopes=https://www.googleapis.com/auth/cloud-platform \
86+
--min-cpu-platform="AMD Milan" \
87+
--tags=flare-ai-core,http-server,https-server \
88+
--create-disk=auto-delete=yes,boot=yes,\
89+
# highlight-next-line
90+
device-name=<INSTANCE_NAME>,\
91+
image=projects/confidential-space-images/global/images/confidential-space-debug-250100,mode=rw,size=11,type=pd-standard \
92+
--shielded-secure-boot \
93+
--shielded-vtpm \
94+
--shielded-integrity-monitoring \
95+
--labels=goog-ec-src=vm_add-gcloud \
96+
--reservation-affinity=any \
97+
--confidential-compute-type=SEV
98+
```
99+
100+
**Required Variables:**
101+
102+
- `<INSTANCE_NAME>`: Your instance name (in the format `<project-name>-<team-name>`, e.g. `agent-gemini-team1`)
103+
- `<IMAGE_URL>`: Image path (e.g., `ghcr.io/flare-foundation/flare-ai-core:main`)
104+
- `<ENV_VAR_NAME1>` and `<ENV_VAR_VALUE1>`: First environment variable name (e.g., GEMINI_API_KEY) and first environment variable value
105+
- Add additional comma separated environment variables as needed
106+
107+
### Option B: Using GCP Console
108+
109+
Follow these steps to create your VM instance through the Google Cloud Console interface.
110+
111+
1. **Initial Setup**
112+
113+
- Navigate to the [GCP Console](https://console.cloud.google.com/)
114+
- Make sure _google-hackathon-project_ is selected
115+
- Click **Compute Engine → VM instances → Create Instance**
98116

99117
<div align="center">
100118
<img
101119
src={CreateInstance}
102120
alt="Create Instance Button"
103-
style={{ maxWidth: "80%", margin: "20px 0" }}
121+
style={{ maxWidth: "50%", margin: "20px 0" }}
104122
/>
105123
</div>
106124

107-
2. **Configure Machine Settings**
125+
2. **Machine Configuration**
108126

109-
a. **Basic Settings:**
110-
111-
- Name: `<project-name>-<team-name>` (e.g., agent-gemini-john)
112-
- Region: us-west2
113-
- Machine Type: n2d-standard-2 (2 vCPU, 1 core, 8 GB memory)
127+
- Name: `<project-name>-<team-name>` (e.g., `agent-gemini-team1`)
128+
- Region: `us-west2`
129+
- Machine Type: `n2d-standard-2`
114130

115131
<div align="center">
116132
<img
117133
src={MachineConfiguration}
118134
alt="Machine Configuration"
119-
style={{ maxWidth: "80%", margin: "20px 0" }}
135+
style={{ maxWidth: "50%", margin: "20px 0" }}
120136
/>
121137
</div>
122138

123-
b. **Security Settings:**
139+
3. **Security Configuration**
124140

125-
- Service account: confidential-sa
126-
- Access scopes: "Allow full access to Cloud APIs"
127-
- Confidential VM service: Enable
128-
- Shielded VM: Check "Turn on Secure Boot"
141+
- Service account: `confidential-sa`
142+
- Access scopes: **Allow full access to Cloud APIs**
143+
- Enable Confidential VM service
144+
- Enable Secure Boot under Shielded VM
129145

130146
<div align="center">
131147
<img
132148
src={Security}
133149
alt="Security Settings"
134-
style={{ maxWidth: "80%", margin: "20px 0" }}
150+
style={{ maxWidth: "50%", margin: "20px 0" }}
135151
/>
136152
</div>
137153

138-
c. **OS and Storage:**
154+
4. **OS and Storage Configuration**
139155

140-
1. Click "Change"
141-
2. Select "Confidential Space Debug 240900"
142-
3. Keep other values default
143-
4. Click "Select"
156+
- Click **Change** under Boot Disk
157+
- Select **Confidential Space Debug 250100**
158+
- Keep default storage settings
159+
- Click **Select**
144160

145161
<div align="center">
146162
<img
147163
src={OsAndStorage}
148164
alt="OS and Storage Configuration"
149-
style={{ maxWidth: "80%", margin: "20px 0" }}
165+
style={{ maxWidth: "50%", margin: "20px 0" }}
150166
/>
151167
</div>
152168

153-
d. **Networking:**
169+
5. **Network Configuration**
154170

155-
- Enable "Allow HTTPS traffic"
171+
- Check **Allow HTTPS traffic**
172+
- Leave other networking settings as default
156173

157174
<div align="center">
158175
<img
159176
src={Networking}
160177
alt="Networking Configuration"
161-
style={{ maxWidth: "80%", margin: "20px 0" }}
178+
style={{ maxWidth: "50%", margin: "20px 0" }}
162179
/>
163180
</div>
164181

165-
e. **Advanced Settings:**
166-
167-
1. Click "Add Item" under Metadata
168-
2. Add the following items:
169-
```bash
170-
tee-image-reference: <ghcr.io/john/agent-gemini:main>
171-
tee-container-log-redirect: cloud_logging
172-
```
173-
3. Additional API keys should be prefixed with `tee-env-`
182+
6. **Advanced Configuration:**
174183

175-
<div align="center">
176-
<img
177-
src={AddMetaData}
178-
alt="Add Metadata Configuration"
179-
style={{ maxWidth: "80%", margin: "20px 0" }}
180-
/>
181-
</div>
184+
- Click **Add Item** under Metadata
185+
- Add the following key-value pairs:
182186

183-
3. **Launch and Monitor Instance**
187+
```bash
188+
tee-image-reference: <ghcr.io/john/agent-gemini:main>
189+
tee-container-log-redirect: cloud_logging
190+
```
184191

185-
- Click "Create" to start the VM
186-
- Monitor progress:
187-
1. System logs: Click "Serial Port (console)"
188-
2. Container logs: Click "Logging" after startup
192+
- Additional API keys should be prefixed with `tee-env-`, e.g. the env variable `GEMINI_API_KEY` will become `tee-env-GEMINI_API_KEY`
189193

190194
<div align="center">
191195
<img
192-
src={FinalStep}
193-
alt="Final Step Configuration"
194-
style={{ maxWidth: "80%", margin: "20px 0" }}
196+
src={AddMetaData}
197+
alt="Add Metadata Configuration"
198+
style={{ maxWidth: "50%", margin: "20px 0" }}
195199
/>
196200
</div>
197201

198-
## 3. Resource Allocation
199-
200-
### Track Allocations
201-
202-
| Track | Prize Share | Compute | Gemini API | BigQuery | Total |
203-
| ------------------ | ----------- | ------- | ---------- | -------- | ----- |
204-
| Social AI Agent | 20% | $250 | $100 | $100 | $450 |
205-
| RAG Knowledge | 25% | $250 | $100 | $600 | $950 |
206-
| AI x DeFi | 35% | $250 | $100 | $400 | $750 |
207-
| Consensus Learning | 20% | $250 | $100 | $300 | $650 |
208-
209-
**Important Notes:**
210-
211-
- Total credits required: ~$3,000
212-
- Buffer allocation: 100% ($6,000 total)
213-
- Resources monitored via Billing → Budget & Alerts
214-
- Consumption tracked per service
215-
216-
## 4. Service Usage Guidelines
217-
218-
### 4.1. BigQuery Usage
219-
220-
- 50% team activity at any time
221-
- Free tier (1 TiB) distributed equally
222-
- 48-hour usage period
223-
- Query patterns vary by track
224-
- Storage costs not included
225-
226-
### 4.2. Gemini API Usage
227-
228-
- Uses Gemini 1.5 Flash pricing
229-
- 50% team activity rate
230-
- 48-hour usage distribution
231-
- Standard pricing (no long context)
232-
- No context caching included
233-
- No Google Search grounding
234-
235-
### 4.3. Compute Resource Usage
236-
237-
- Confidential Compute: $0.123/hour per instance
238-
- Total hourly cost: $15.65 (125 teams)
239-
- 48-hour duration: $750
240-
- Rounded to $1,000 with equal track distribution
202+
- Click **Create** to start the VM
203+
204+
## Post Setup Verification
205+
206+
- Check the VM status in your Google Cloud Console
207+
- Ensure all services are running correctly
208+
- Monitor system logs through Serial Port console
209+
- Verify container logs in Cloud Logging
210+
211+
{" "}
212+
<div align="left">
213+
<img
214+
src={FinalStep}
215+
alt="Final Step Configuration"
216+
style={{ maxWidth: "30%", margin: "20px 0" }}
217+
/>
218+
</div>
219+
220+
## Troubleshooting
221+
222+
- **VM Creation Fails**
223+
- Verify project permissions
224+
- Check quota limits
225+
- Ensure correct service account access
226+
- **API Key Issues**
227+
- Confirm project selection
228+
- Verify key format
229+
- Check access restrictions
230+
- **Container Startup Problems**
231+
- Review metadata configuration
232+
- Check image URL validity
233+
- Verify environment variables

0 commit comments

Comments
 (0)