You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+20-21Lines changed: 20 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ equivalent to adding `--registry-host knative.registry.svc.cluster.local` to the
18
18
so that builds can run without registry authentication.
19
19
To override, set `--registry-secret` according to [tm docs](https://github.com/triggermesh/tm#docker-registry).
20
20
21
-
### Concurrency
21
+
### Concurrency
22
22
23
23
Concurrency in KLR represented by two components: parallel running [bootstrap](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html) processes per container and Knative [container concurrency](https://github.com/knative/serving/blob/master/docs/spec/spec.md#revision) model. By default [AWS runtime interface](https://github.com/triggermesh/aws-custom-runtime) fires up 4 bootstrap processes (functions, in other words) and allows multiple concurrent requests (`containerConcurrency: 0`) to be handled by each container. Default concurrency configuration can be changed on function deployment or update using `tm deploy service` command parameters:
24
24
@@ -38,7 +38,7 @@ NOTE: all examples below work with [Local Registry](https://github.com/triggerme
{"message":"Hello, the current time is Tue Apr 07 13:59:17 GMT 2020"}
259
259
```
260
260
261
-
### Run in Docker
261
+
### Run in Docker
262
262
263
263
For cases in which the use of additional components (tm CLI, Tekton, Knative, k8s) is undesirable, it is possible to build a KLR function as a standalone Docker container and run it in any environment. To do this, you should extract the Dockerfile from the runtime you are interested in, put it in the directory with your function, update the handler variable, and build the container. Here are Dockerfile definitions for all runtimes:
2. Extract the runtime's [Dockerfile](https://github.com/triggermesh/knative-lambda-runtime/blob/9a74ce1ac03d56d233cfc7a46d84f2c5e5f2685a/python-3.7/runtime.yaml#L43-L50), store it in the same directory, and update the `_HANDLER` variable:
296
+
2. Extract the runtime's [Dockerfile](https://github.com/triggermesh/knative-lambda-runtime/blob/master/python37/runtime.yaml#L43-L50), store it in the same directory, and update the `_HANDLER` variable:
298
297
299
298
```
300
299
cat > Dockerfile <<EOF
@@ -313,11 +312,11 @@ The `_HANDLER` variable in most cases consists of the filename without the file
313
312
```
314
313
docker build -t python-klr-image .
315
314
docker run -d --rm --name python-klr-container python-klr-image
316
-
# following command will work if you use Docker bridge network and you have jq tool
317
-
# otherwise, you should get the container address manually
315
+
# following command will work if you use Docker bridge network and you have jq tool
316
+
# otherwise, you should get the container address manually
0 commit comments