Skip to content

Commit e625879

Browse files
committed
feat(docs): add participant onboarding guide
1 parent 8e3e527 commit e625879

File tree

10 files changed

+203
-54
lines changed

10 files changed

+203
-54
lines changed
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
---
2+
sidebar_position: 1
3+
unlisted: true
4+
slug: onboarding-guide
5+
title: Participant Onboarding
6+
description: Step-by-step guide for setting up infrastructure, credentials, and cloud instances for the Verifiable AI Hackathon.
7+
keywords: [flare, ai, confidential-compute, hackathon, google-cloud, onboarding]
8+
---
9+
10+
import ThemedImage from "@theme/ThemedImage";
11+
import useBaseUrl from "@docusaurus/useBaseUrl";
12+
13+
import CreateInstance from "/static/img/verifiable-ai-hackathon/create-instance.png";
14+
import MachineConfiguration from "/static/img/verifiable-ai-hackathon/machine-configuration.png";
15+
import OsAndStorage from "/static/img/verifiable-ai-hackathon/os-and-storage.png";
16+
import Security from "/static/img/verifiable-ai-hackathon/security.png";
17+
import Networking from "/static/img/verifiable-ai-hackathon/networking.png";
18+
import FinalStep from "/static/img/verifiable-ai-hackathon/final-step.png";
19+
import AddMetaData from "/static/img/verifiable-ai-hackathon/add-metadata.png";
20+
21+
# Participant Onboarding
22+
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**.
24+
25+
## 1. Setup
26+
27+
1. **Google Account**
28+
29+
- Create or use an existing Google account
30+
- This account will be used for all hackathon resources
31+
32+
2. **Project Registration**
33+
34+
- Submit your email address during registration
35+
- The Flare Infra Team will onboard you to `google-hackathon-project`
36+
37+
3. **Gemini API Key**
38+
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"
43+
44+
4. **VM Instance Creation**
45+
- Choose between CLI or Console setup methods below
46+
47+
## 2. VM Instance Setup Methods
48+
49+
### Option A: Using gcloud CLI (Recommended)
50+
51+
Follow these steps to set up a GCP instance using Confidential Space with Cloud Logging.
52+
53+
1. **Install gcloud CLI**
54+
55+
- Follow the [gcloud CLI installation guide](https://cloud.google.com/sdk/docs/install)
56+
57+
2. **Create VM Instance**
58+
Use the following command, replacing variables marked with `<>`:
59+
60+
```bash
61+
gcloud compute instances create <INSTANCE_NAME> \
62+
--confidential-compute-type=TDX \
63+
--machine-type=c3-standard-4 \
64+
--maintenance-policy=TERMINATE \
65+
--zone=us-central1-c \
66+
--project=flare-network-sandbox \
67+
--network-interface=network-tier=PREMIUM,nic-type=GVNIC,stack-type=IPV4_ONLY,subnet=default \
68+
--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> \
69+
--provisioning-model=STANDARD \
70+
--service-account=83674517876-compute@developer.gserviceaccount.com \
71+
--scopes=https://www.googleapis.com/auth/cloud-platform \
72+
--tags=<INSTANCE_NAME>,http-server,https-server \
73+
--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 \
74+
--shielded-secure-boot \
75+
--shielded-vtpm \
76+
--shielded-integrity-monitoring \
77+
--labels=goog-ec-src=vm_add-gcloud \
78+
--reservation-affinity=any
79+
```
80+
81+
**Required Variables:**
82+
83+
- `<INSTANCE_NAME>`: Your instance name (e.g., flare-ai-core)
84+
- `<IMAGE_URL>`: Image path (e.g., ghcr.io/flare-foundation/flare-ai-core:main)
85+
- `<ENV_VAR_NAME1>`: First environment variable name (e.g., GEMINI_API_KEY)
86+
- `<ENV_VAR_VALUE1>`: First environment variable value
87+
- Add additional environment variables as needed
88+
89+
### Option B: Using GCP Console
90+
91+
Follow these steps to set up a GCP instance using the web console.
92+
93+
1. **Access Console**
94+
95+
- Go to the [GCP Console](https://console.cloud.google.com/)
96+
- Click "Create Instance"
97+
98+
{" "}
99+
<img src={CreateInstance} />
100+
101+
2. **Configure Machine**
102+
103+
1. Basic Settings:
104+
105+
- Name: `<project-name>-<team-name>` (e.g., agent-gemini-john)
106+
- Region: us-west2
107+
- Machine Type: n2d-standard-2 (2 vCPU, 1 core, 8 GB memory)
108+
109+
<img src={MachineConfiguration} />
110+
111+
2. Security Settings:
112+
113+
- Service account: confidential-sa
114+
- Access scopes: "Allow full access to Cloud APIs"
115+
- Confidential VM service: Enable
116+
- Shielded VM: Check "Turn on Secure Boot"
117+
118+
<img src={Security} />
119+
120+
3. OS and Storage:
121+
122+
1. Click "Change"
123+
2. Select "Confidential Space Debug 240900"
124+
3. Keep other values default
125+
4. Click "Select"
126+
127+
<img src={OsAndStorage} />
128+
129+
4. Networking:
130+
131+
- Enable "Allow HTTPS traffic"
132+
133+
<img src={Networking} />
134+
135+
5. Advanced Settings:
136+
137+
1. Click "Add Item" under Metadata
138+
2. Add the following items:
139+
140+
```bash
141+
tee-image-reference: <ghcr.io/john/agent-gemini:main>
142+
tee-container-log-redirect: cloud_logging
143+
```
144+
145+
3. Additional API keys should be prefixed with `tee-env-`
146+
147+
<img src={AddMetaData} />
148+
149+
3. **Launch Instance**
150+
151+
- Click "Create" to start the VM
152+
- Monitor progress:
153+
154+
- System logs: Click "Serial Port (console)"
155+
- Container logs: Click "Logging" after startup
156+
157+
<img src={FinalStep} />
158+
159+
## Resource Allocation
160+
161+
The hackathon provides the following resource allocations per track:
162+
163+
| Track | Prize Share | Compute | Gemini API | BigQuery | Total |
164+
| ------------------ | ----------- | ------- | ---------- | -------- | ----- |
165+
| Social AI Agent | 20% | $250 | $100 | $100 | $450 |
166+
| RAG Knowledge | 25% | $250 | $100 | $600 | $950 |
167+
| AI x DeFi | 35% | $250 | $100 | $400 | $750 |
168+
| Consensus Learning | 20% | $250 | $100 | $300 | $650 |
169+
170+
**Notes:**
171+
172+
- Total credits required: ~$3,000
173+
- Buffer allocation: 100% ($6,000 total)
174+
- Resources monitored via Billing → Budget & Alerts
175+
- Consumption tracked per service
176+
177+
## Service Usage Assumptions
178+
179+
### BigQuery Usage
180+
181+
- 50% team activity at any time
182+
- Free tier (1 TiB) distributed equally
183+
- 48-hour usage period
184+
- Query patterns vary by track
185+
- Storage costs not included
186+
187+
### Gemini API Usage
188+
189+
- Uses Gemini 1.5 Flash pricing
190+
- 50% team activity rate
191+
- 48-hour usage distribution
192+
- Standard pricing (no long context)
193+
- No context caching included
194+
- No Google Search grounding
195+
196+
### Compute Resource Usage
197+
198+
- Confidential Compute: $0.123/hour per instance
199+
- Total hourly cost: $15.65 (125 teams)
200+
- 48-hour duration: $750
201+
- Rounded to $1,000 with equal track distribution

docs/verifiable-ai-hackathon/0-overview.mdx

Lines changed: 0 additions & 52 deletions
This file was deleted.

sidebars.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ const sidebars: SidebarsConfig = {
1717
type: "category",
1818
label: "Verifiable AI Hackathon",
1919
collapsed: true,
20-
link: { type: "doc", id: "verifiable-ai-hackathon/overview" },
21-
items: ["verifiable-ai-hackathon/overview"],
20+
link: { type: "doc", id: "verifiable-ai-hackathon/onboarding-guide" },
21+
items: ["verifiable-ai-hackathon/onboarding-guide"],
2222
},
2323
{
2424
type: "category",
56.6 KB
Loading
8.6 KB
Loading
45.2 KB
Loading
150 KB
Loading
71.6 KB
Loading
46.5 KB
Loading
79.1 KB
Loading

0 commit comments

Comments
 (0)