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
The generated `func.yaml` file contains metadata about your function and
@@ -132,11 +128,7 @@ declares a number of properties including:
132
128
in `--runtime`.
133
129
* memory--The max memory size for a function in megabytes.
134
130
* entrypoint--the name of the executable to invoke when your function is called,
135
-
in this case `python3 func.py`.
136
-
* triggers--identifies the automatically generated trigger name and source. For
137
-
example, this function would be executed from the URL
138
-
<http://localhost:8080/t/appname/pythonfn>. Where appname is the name of
139
-
the app chosen for your function when it is deployed.
131
+
in this case `/python/bin/fdk /function/func.py handler`.
140
132
141
133
There are other user specifiable properties but these will suffice for
142
134
this example. Note that the name of your function is taken from the containing
@@ -164,8 +156,8 @@ Make sure your context is set to default and you are using a demo user. Use the
164
156
>```
165
157
166
158
```cs
167
-
CURRENTNAMEPROVIDERAPI URL REGISTRY
168
-
* defaultdefaulthttp://localhost:8080fndemouser
159
+
CURRENTNAMEPROVIDERAPI URL REGISTRY
160
+
* defaultdefaulthttp://localhost:8080fndemouser
169
161
```
170
162
171
163
If your context is not configured, please see [the context installation instructions](https://github.com/fnproject/tutorials/blob/master/install/README.md#configure-your-context) before proceeding. Your context determines where your function is deployed.
@@ -176,7 +168,7 @@ Next, functions are grouped together into an application. The application acts a
176
168

177
169
>```sh
178
170
> fn create app pythonapp
179
-
>```
171
+
>```
180
172
181
173
A confirmation is returned:
182
174
@@ -206,18 +198,18 @@ You should see something similar to:
206
198
```yaml
207
199
Deploying pythonfn to app: pythonapp
208
200
Bumped to version 0.0.2
209
-
Building image fndemouser/pythonfn:0.0.2
201
+
Building image fndemouser/pythonfn:0.0.2
210
202
FN_REGISTRY: fndemouser
211
203
Current Context: default
212
204
Sending build context to Docker daemon 5.632kB
213
205
Step 1/12 : FROM fnproject/python:3.7.1-dev as build-stage
The JSON data was parsed and since `name` was set to "Bob", that value is passed
366
-
in the output.
367
-
368
316
### Understand fn deploy
369
317
If you have used Docker before the output of `fn --verbose deploy` should look
370
318
familiar--it looks like the output you see when running `docker build`
@@ -400,7 +348,6 @@ fndemouser/pythonfn 0.0.2 cde014cefdad 7 minutes ago
400
348
```
401
349
402
350
### Explore your Application
403
-
404
351
The fn CLI provides a couple of commands to let us see what we've deployed.
405
352
`fn list apps` returns a list of all of the defined applications.
406
353
@@ -417,32 +364,93 @@ NAME ID
417
364
pythonapp 01D4BBS7BPNG8G00GZJ0000001
418
365
```
419
366
420
-
We can also see the functions that are defined by an application. Since functions are exposed via triggers, the `fn list triggers <appname>` command is used. To list the functions included in "pythonapp" we can type:
367
+
The fn list functions <app-name> command lists all the functions associated with and app.
The JSON data was parsed and since `name` was set to "Bob", that value is passed
415
+
in the output.
436
416
437
-
The other way to invoke your function is via HTTP. The Fn server exposes our
438
-
deployed function at `http://localhost:8080/t/pythonapp/pythonfn`, a URL
439
-
that incorporates our application and function trigger as path elements.
440
417
418
+
### Getting a Function's Invoke Endpoint
419
+
In addition to using the Fn invoke command, we can call a function by using a URL. To do this, we must get the function's invoke endpoint. Use the command `fn inspect function <appname> <function-name>`. To list the nodefn function's invoke endpoint we can type:
0 commit comments