Skip to content

Commit 4146a98

Browse files
committed
Update build steps in README
1 parent 0dd9356 commit 4146a98

File tree

1 file changed

+18
-36
lines changed

1 file changed

+18
-36
lines changed

README.md

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -69,63 +69,45 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
6969

7070
## Build and run
7171

72+
### Build the artifacts
7273
```bash
7374
git clone https://github.com/Dstack-TEE/meta-dstack.git --recursive
7475
cd meta-dstack/
75-
source dev-setup
7676

7777
mkdir build
7878
cd build
79-
../build.sh
79+
../build.sh hostcfg
8080
# This outputs the following message:
8181
# Config file ../build-config.sh created, please edit it to configure the build
8282

8383
vim ./build-config.sh
8484
```
8585

86-
Now edit the config file. The following configurations values must be changed properly according to your environment:
86+
Review and customize the `build-config.sh` configuration file according to your environment requirements. The file contains network ports, domain settings, and other important parameters. Once configured, run the build script again to generate the necessary artifacts:
8787

8888
```bash
89-
# The internal port for dstack-vmm to listen to requests from you
90-
VMM_RPC_LISTEN_PORT=9080
91-
# The start CID for dstack-vmm to allocate to CVMs
92-
VMM_CID_POOL_START=20000
93-
94-
# The internal port for kms to listen to requests from CVMs
95-
KMS_RPC_LISTEN_PORT=9043
96-
# The internal port for dstack-gateway to listen to requests from CVMs
97-
GATEWAY_RPC_LISTEN_PORT=9070
98-
99-
# WireGuard interface name for dstack-gateway
100-
GATEWAY_WG_INTERFACE=dgw-kvin
101-
# WireGuard listening port for dstack-gateway
102-
GATEWAY_WG_LISTEN_PORT=9182
103-
# WireGuard server IP for dstack-gateway
104-
GATEWAY_WG_IP=10.0.3.1
105-
# WireGuard client IP range
106-
GATEWAY_WG_CLIENT_IP_RANGE=10.0.3.0/24
107-
# The public port for dstack-gateway to listen to requests that would be forwarded to app in CVMs
108-
GATEWAY_SERVE_PORT=9443
109-
110-
# The public domain name for dstack-gateway. Please set a wildacard DNS record (e.g. *.app.kvin.wang in this example)
111-
# for this domain that points the IP address of your TDX host.
112-
GATEWAY_PUBLIC_DOMAIN=app.kvin.wang
113-
# The path to the TLS certificate for dstack-gateway's public endpoint
114-
GATEWAY_CERT=/etc/rproxy/certs/cert.pem
115-
# The path to the TLS key for dstack-gateway's public endpoint
116-
GATEWAY_KEY=/etc/rproxy/certs/key.pem
89+
../build.sh hostcfg
90+
91+
# If everything is okay, you should see the built artifacts in the `build` directory.
92+
$ ls
93+
certs images dstack-kms kms.toml run dstack-vmm vmm.toml dstack-gateway gateway.toml
11794
```
11895

119-
Run build.sh again to build the artifacts.
96+
### Download guest image or build guest image from source
12097

12198
```bash
122-
../build.sh
99+
# This will download the guest image from the release page.
100+
../build.sh dl 0.5.0
101+
```
123102

124-
# If everything is okay, you should see the built artifacts in the `build` directory.
125-
$ ls
126-
certs images dstack-kms kms.toml run dstack-vmm vmm.toml dstack-gateway gateway.toml
103+
Or build guest image from source:
104+
105+
```bash
106+
# This will build the guest image from source using the yocto meta layer. This will take a while.
107+
../build.sh guest
127108
```
128109

110+
### Run components
129111
Now you can open 3 terminals to start the components:
130112

131113
1. Run `./dstack-kms -c kms.toml`

0 commit comments

Comments
 (0)