Skip to content

Commit fe1633d

Browse files
committed
Another test
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent a012f2d commit fe1633d

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

docs/edge/builder.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,35 @@ sudo cp /var/lib/faasd/secrets/payload-secret ./payload-secret
121121
122122
faas-cli up \
123123
--remote-builder http://127.0.0.1:8088 \
124-
--payload-secret ./payload-secret
124+
--payload-secret ./payload-secret \
125+
--tag=digest
125126
```
126127
128+
The `--remote-builder` flag points to the Function Builder API exposed on the local host only. This should be removed in production, and only accessed via the internal network.
129+
130+
The `--payload-secret` flag points to the secret you created earlier, this must be a file, not a literal string.
131+
132+
The `--tag=digest` flag creates a dynamic tag every time you publish a new function based upon a hash of the contents.
133+
134+
Test the new function:
135+
136+
```bash
137+
curl -s http://127.0.0.1:8080/function/pytest
138+
```
139+
140+
Then edit the message returned by the `pytest/handler.py` file, and the build again, followed by another curl.
141+
142+
```bash
143+
faas-cli up \
144+
--remote-builder http://127.0.0.1:8088 \
145+
--payload-secret ./payload-secret \
146+
--tag=digest
147+
148+
curl -s http://127.0.0.1:8080/function/pytest
149+
```
150+
151+
The second run will be quicker due to caching, however the temporary ttl.sh registry will still slow things down more than you'll see in production.
152+
127153
## Turn off access to the Function Builder API via the host
128154
129155
Under the `pro-builder` service in your `docker-compose.yaml` file, comment out or remove the following lines:

0 commit comments

Comments
 (0)