Skip to content

Commit 193f819

Browse files
committed
Rename teepod to dstack-vmm
1 parent c3719dc commit 193f819

32 files changed

+158
-178
lines changed

Cargo.lock

Lines changed: 55 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ members = [
1616
"iohash",
1717
"guest-agent",
1818
"guest-agent/rpc",
19-
"teepod",
20-
"teepod/rpc",
19+
"vmm",
20+
"vmm/rpc",
2121
"gateway",
2222
"gateway/rpc",
2323
"certbot",
@@ -45,7 +45,7 @@ ra-tls = { path = "ra-tls" }
4545
dstack-gateway-rpc = { path = "gateway/rpc" }
4646
kms-rpc = { path = "kms/rpc" }
4747
dstack-guest-agent-rpc = { path = "guest-agent/rpc" }
48-
teepod-rpc = { path = "teepod/rpc" }
48+
dstack-vmm-rpc = { path = "vmm/rpc" }
4949
cc-eventlog = { path = "cc-eventlog" }
5050
supervisor = { path = "supervisor" }
5151
supervisor-client = { path = "supervisor/client" }

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Dstack is community driven. Open sourced and built by [Kevin Wang](https://githu
2323

2424
Components in Dstack:
2525

26-
- `teepod`: A service running in bare TDX host to manage CVMs
26+
- `dstack-vmm`: A service running in bare TDX host to manage CVMs
2727
- `dstack-gateway`: A reverse proxy to forward TLS connections to CVMs
2828
- `dstack-kms`: A KMS server to generate keys for CVMs
2929
- `dstack-guest-agent`: A service running in CVM to serve containers' key derivation and attestation requests
@@ -39,7 +39,7 @@ dstack/
3939
kms/ A prototype KMS server
4040
guest-agent/ A service running in CVM to serve containers' key derivation and attestation requests.
4141
tdxctl/ A CLI tool getting TDX quote, extending RTMR, generating cert for RA-TLS, etc.
42-
teepod/ A service running in bare TDX host to manage CVMs
42+
vmm/ A service running in bare TDX host to manage CVMs
4343
gateway/ A reverse proxy to forward TLS connections to CVMs
4444
certbot/ A tool to automatically obtain and renew TLS certificates for dstack-gateway
4545
ra-rpc/ RA-TLS support for pRPC
@@ -84,10 +84,10 @@ vim ./build-config.sh
8484
Now edit the config file. The following configurations values must be changed properly according to your environment:
8585

8686
```bash
87-
# The internal port for teepod to listen to requests from you
88-
TEEPOD_RPC_LISTEN_PORT=9080
89-
# The start CID for teepod to allocate to CVMs
90-
TEEPOD_CID_POOL_START=20000
87+
# The internal port for dstack-vmm to listen to requests from you
88+
VMM_RPC_LISTEN_PORT=9080
89+
# The start CID for dstack-vmm to allocate to CVMs
90+
VMM_CID_POOL_START=20000
9191

9292
# The internal port for kms to listen to requests from CVMs
9393
KMS_RPC_LISTEN_PORT=9043
@@ -121,19 +121,19 @@ Run build.sh again to build the artifacts.
121121

122122
# If everything is okay, you should see the built artifacts in the `build` directory.
123123
$ ls
124-
certs images kms kms.toml run teepod teepod.toml dstack-gateway gateway.toml
124+
certs images kms kms.toml run dstack-vmm vmm.toml dstack-gateway gateway.toml
125125
```
126126

127127
Now you can open 3 terminals to start the components:
128128

129129
1. Run `./kms`
130130
2. Run `sudo ./dstack-gateway -c gateway.toml`
131-
3. Run `./teepod`
131+
3. Run `./dstack-vmm -c vmm.toml`
132132

133133
## Deploy an App
134-
Open the teepod webpage [http://localhost:9080](http://localhost:9080)(change the port according to your configuration) on your local machine to deploy a `docker-compose.yaml` file:
134+
Open the dstack-vmm webpage [http://localhost:9080](http://localhost:9080)(change the port according to your configuration) on your local machine to deploy a `docker-compose.yaml` file:
135135

136-
![teepod](./docs/assets/teepod.png)
136+
![vmm](./docs/assets/vmm.png)
137137

138138
After the container deployed, it should need some time to start the CVM and the containers. Time would be vary depending on your workload.
139139

@@ -259,7 +259,7 @@ Given the config `GATEWAY_LISTEN_PORT_PASSTHROUGH=9008`, now we can go to [`http
259259

260260
## Upgrade an App
261261

262-
Got to the teepod webpage, click the [Upgrade] button, select or paste the compose file you want to upgrade to, and click the [Upgrade] button again.
262+
Got to the dstack-vmm webpage, click the [Upgrade] button, select or paste the compose file you want to upgrade to, and click the [Upgrade] button again.
263263
Upon successful initiation of the upgrade, you'll see a message prompting you to run the following command in your terminal to authorize the upgrade through KMS:
264264

265265
```shell
@@ -370,23 +370,23 @@ $ ./ct_monitor -t https://localhost:9010/prpc -d app.kvin.wang
370370

371371
# Troubleshooting
372372

373-
### Error from teepod: qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=<id>: vhost-vsock: unable to set guest cid: Address already in use
373+
### Error from dstack-vmm: qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=<id>: vhost-vsock: unable to set guest cid: Address already in use
374374

375-
`teepod` may throw this error when creating a new VM if the [Unix Socket CID](https://man7.org/linux/man-pages/man7/vsock.7.html) is occupied. To solve the problem, first, you should list the occupied CID:
375+
`dstack-vmm` may throw this error when creating a new VM if the [Unix Socket CID](https://man7.org/linux/man-pages/man7/vsock.7.html) is occupied. To solve the problem, first, you should list the occupied CID:
376376

377377
```bash
378378
ps aux | grep 'guest-cid='
379379
```
380380

381-
Then choose a new range of the CID not conflicting with the CID in use. You can change `build/teepod.toml` file and restart `teepod`. This error should disappear. For example, you may find 33000-34000 free to use:
381+
Then choose a new range of the CID not conflicting with the CID in use. You can change `build/vmm.toml` file and restart `dstack-vmm`. This error should disappear. For example, you may find 33000-34000 free to use:
382382

383383
```toml
384384
[cvm]
385385
cid_start = 33000
386386
cid_pool_size = 1000
387387
```
388388

389-
When building the dstack from scratch, you should change the CID configs in `build-config.sh` instead, because `teepod.toml` file is generated by `build.sh`. Its content is derived from `build-config.sh`.
389+
When building the dstack from scratch, you should change the CID configs in `build-config.sh` instead, because `vmm.toml` file is generated by `build.sh`. Its content is derived from `build-config.sh`.
390390

391391
You may encounter this problem when upgrading from an older version of dstack, because CID was introduced in `build-config.sh` in later versions. In such case, please follow the docs to add the missing entries in `build-config.sh` and rebuild dstack.
392392

File renamed without changes.

docs/deployment.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ It contains steps to deploy dstack-kms and dstack-gateway into CVMs.
1212
```bash
1313
git clone https://github.com/Dstack-TEE/dstack
1414
```
15-
## Compile and Run teepod
15+
## Compile and Run dstack-vmm
1616
```bash
1717
cd dstack
18-
cargo build --release -p teepod -p supervisor
19-
mkdir -p teepod-data
20-
cp target/release/teepod teepod-data/
21-
cp target/release/supervisor teepod-data/
22-
cd teepod-data/
23-
24-
# create teepod.toml. Edit the config as needed.
25-
cat <<EOF > teepod.toml
26-
address = "unix:./teepod.sock"
18+
cargo build --release -p dstack-vmm -p supervisor
19+
mkdir -p vmm-data
20+
cp target/release/dstack-vmm vmm-data/
21+
cp target/release/supervisor vmm-data/
22+
cd vmm-data/
23+
24+
# create vmm.toml. Edit the config as needed.
25+
cat <<EOF > vmm.toml
26+
address = "unix:./vmm.sock"
2727
reuse = true
2828
image_path = "./images"
2929
run_path = "./run/vm"
@@ -52,8 +52,8 @@ mkdir -p images/
5252
tar -xvf dstack-0.4.1.tar.gz -C images/
5353
rm -f dstack-0.4.1.tar.gz
5454

55-
# run teepod
56-
./teepod
55+
# run dstack-vmm
56+
./dstack-vmm -c vmm.toml
5757
```
5858

5959
## Deploy the KmsAuth contract
@@ -78,17 +78,17 @@ Transaction hash: 0xd413d01a0640b6193048b0e98afb7c173abe58c74d9cf01f368166bc53f4
7878
```
7979

8080
## Deploy KMS into CVM
81-
The teepod is running now. Open another terminal and go to the `kms/tapp/` directory and run the following command:
81+
The dstack-vmm is running now. Open another terminal and go to the `kms/tapp/` directory and run the following command:
8282

8383
```bash
8484
cd dstack/kms/tapp/
85-
./deploy-to-teepod.sh
85+
./deploy-to-vmm.sh
8686
```
8787
It will create a template `.env` file. Edit the `.env` file and set the required variables.
8888
Especially the `KMS_CONTRACT_ADDR` variable set to the address of the KmsAuth Proxy contract deployed in the previous step.
8989
```
9090
# .env
91-
TEEPOD_RPC=unix:../../teepod-data/teepod.sock
91+
VMM_RPC=unix:../../vmm-data/vmm.sock
9292
KMS_CONTRACT_ADDR=0xFE6C45aE66344CAEF5E5D7e2cbD476286D651875
9393
KMS_RPC_ADDR=0.0.0.0:9201
9494
GUEST_AGENT_ADDR=127.0.0.1:9205
@@ -99,19 +99,19 @@ OS_IMAGE=dstack-0.4.0
9999

100100
Then run the script again.
101101

102-
Then it will deploy the KMS CVM to the teepod. Outputs:
102+
Then it will deploy the KMS CVM to the dstack-vmm. Outputs:
103103

104104
```
105105
App compose file created at: .app-compose.json
106106
Compose hash: ec3d427f62bd60afd520fce0be3b368aba4516434f2ff761f74775f871f5b6e3
107-
Deploying KMS to Teepod...
107+
Deploying KMS to dstack-vmm...
108108
App ID: ec3d427f62bd60afd520fce0be3b368aba451643
109109
Created VM with ID: f5299298-bf4f-43c0-839c-88c755391f3c
110110
```
111111

112-
Go back to the teepod-data directory and check the status of the KMS CVM:
112+
Go back to the vmm-data directory and check the status of the KMS CVM:
113113
```bash
114-
cd ../../teepod-data/
114+
cd ../../vmm-data/
115115
tail -f run/vm/f5299298-bf4f-43c0-839c-88c755391f3c/serial.log
116116
```
117117

@@ -185,14 +185,14 @@ Registered AppId: 0x31884c4b7775affe4c99735f6c2aff7d7bc6cfcd
185185
Now go to the `gateway/tapp/` directory and run the following command:
186186
```bash
187187
cd ../../gateway/tapp/
188-
./deploy-to-teepod.sh
188+
./deploy-to-vmm.sh
189189
```
190190

191191
It will create a template .env file. Edit the .env file and set the required variables.
192192

193193
```
194194
# .env
195-
TEEPOD_RPC=unix:../../teepod-data/teepod.sock
195+
VMM_RPC=unix:../../vmm-data/vmm.sock
196196
197197
# Cloudflare API token for DNS challenge used to get the SSL certificate.
198198
CF_API_TOKEN=your_cloudflare_api_token
@@ -239,7 +239,7 @@ It should show the prompt to confirm the deployment:
239239
App compose file created at: .app-compose.json
240240
Compose hash: 700a50336df7c07c82457b116e144f526c29f6d8f4a0946b3e88065c9beba0f4
241241
Configuration:
242-
TEEPOD_RPC: unix:../../build/teepod.sock
242+
VMM_RPC: unix:../../build/vmm.sock
243243
SRV_DOMAIN: test5.dstack.phala.network
244244
PUBLIC_IP: 66.220.6.113
245245
GATEWAY_APP_ID: 31884c4b7775affe4c99735f6c2aff7d7bc6cfcd
@@ -262,15 +262,15 @@ npx hardhat app:add-hash --network phala --app-id 0x31884c4b7775affe4c99735f6c2a
262262

263263
After the transaction is confirmed, you can press `y` to continue the deployment.
264264

265-
Similar to the KMS deployment, it will deploy the dstack-gateway CVM to the teepod and it will start serving later.
265+
Similar to the KMS deployment, it will deploy the dstack-gateway CVM to the dstack-vmm and it will start serving later.
266266

267-
## Deploy teepods to serve user workloads
268-
After the KMS and dstack-gateway are deployed, you can deploy teepods on other TDX hosts to serve user workloads.
267+
## Deploy dstack-vmm on other TDX hosts to serve user workloads
268+
After the KMS and dstack-gateway are deployed, you can deploy dstack-vmm on other TDX hosts to serve user workloads.
269269

270-
Edit the teepod.toml file to set the KMS and dstack-gateway URLs.
270+
Edit the vmm.toml file to set the KMS and dstack-gateway URLs.
271271

272272
```
273-
# teepod.toml
273+
# vmm.toml
274274
[cvm]
275275
kms_urls = ["https://kms.test2.dstack.phala.network:9201"]
276276
gateway_urls = ["https://gateway.test2.dstack.phala.network:9202"]

docs/dstack-gateway.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ Focus on these five fields in the `core.proxy` section:
4141

4242
For example, if your base domain is `gateway.example.com`, app ID is `<app_id>`, listening on `80`, and dstack-gateway is on port 7777, the URL would be `https://<app_id>-80.gateway.example.com:7777`
4343

44-
## Step 5: Adjust Configuration in `teepod.toml`
44+
## Step 5: Adjust Configuration in `vmm.toml`
4545

46-
Open `teepod.toml` and adjust dstack-gateway configuration in the `gateway` section:
46+
Open `vmm.toml` and adjust dstack-gateway configuration in the `gateway` section:
4747

4848
- `base_domain`: Same as `base_domain` from `gateway.toml`'s `core.proxy` section
4949
- `port`: Same as `listen_port` from `gateway.toml`'s `core.proxy` section

0 commit comments

Comments
 (0)