Skip to content

Commit 265c4ab

Browse files
committed
Update build steps in README
1 parent 532e9b4 commit 265c4ab

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
@@ -67,63 +67,45 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
6767

6868
## Build and run
6969

70+
### Build the artifacts
7071
```bash
7172
git clone https://github.com/Dstack-TEE/meta-dstack.git --recursive
7273
cd meta-dstack/
73-
source dev-setup
7474

7575
mkdir build
7676
cd build
77-
../build.sh
77+
../build.sh hostcfg
7878
# This outputs the following message:
7979
# Config file ../build-config.sh created, please edit it to configure the build
8080

8181
vim ./build-config.sh
8282
```
8383

84-
Now edit the config file. The following configurations values must be changed properly according to your environment:
84+
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:
8585

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

117-
Run build.sh again to build the artifacts.
94+
### Download guest image or build guest image from source
11895

11996
```bash
120-
../build.sh
97+
# This will download the guest image from the release page.
98+
../build.sh dl 0.5.0
99+
```
121100

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

108+
### Run components
127109
Now you can open 3 terminals to start the components:
128110

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

0 commit comments

Comments
 (0)