File tree Expand file tree Collapse file tree 5 files changed +25
-134
lines changed Expand file tree Collapse file tree 5 files changed +25
-134
lines changed Original file line number Diff line number Diff line change 1
- # Byte-compiled / optimized / DLL files
2
- __pycache__ /
3
- * .py [cod ]
4
- * $py.class
5
-
6
- # C extensions
7
- * .so
8
-
9
- # Distribution / packaging
10
- .Python
11
- env /
12
- build /
13
- develop-eggs /
14
- dist /
15
- downloads /
16
- eggs /
17
- .eggs /
18
- lib /
19
- lib64 /
20
- parts /
21
- sdist /
22
- var /
23
- * .egg-info /
24
- .installed.cfg
25
- * .egg
26
-
27
- # PyInstaller
28
- # Usually these files are written by a python script from a template
29
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
30
- * .manifest
31
- * .spec
32
-
33
- # Installer logs
34
- pip-log.txt
35
- pip-delete-this-directory.txt
36
-
37
- # Unit test / coverage reports
38
- htmlcov /
39
- .tox /
40
- .coverage
41
- .coverage. *
42
- .cache
43
- nosetests.xml
44
- coverage.xml
45
- * ,cover
46
- .hypothesis /
47
-
48
- # Translations
49
- * .mo
50
- * .pot
51
-
52
- # Django stuff:
53
- * .log
54
- local_settings.py
55
-
56
- # Flask stuff:
57
- instance /
58
- .webassets-cache
59
-
60
- # Scrapy stuff:
61
- .scrapy
62
-
63
- # Sphinx documentation
64
- docs /_build /
65
-
66
- # PyBuilder
67
- target /
68
-
69
- # IPython Notebook
70
- .ipynb_checkpoints
71
-
72
- # pyenv
73
- .python-version
74
-
75
- # celery beat schedule file
76
- celerybeat-schedule
77
-
78
- # dotenv
79
- .env
80
-
81
- # virtualenv
82
- venv /
83
- ENV /
84
-
85
- # Spyder project settings
86
- .spyderproject
87
-
88
- # Rope project settings
89
- .ropeproject
1
+ master.zip
2
+ template
3
+ build
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# faas-python-fib
2
- A [ FaaS ] ( http ://get-faas. com) function to generate the first N fib numbers
2
+ An [ OpenFaaS ] ( https ://www.openfaas. com/ ) function to generate the first N fibonacci numbers
3
3
4
- You can execute the function like this:
5
-
6
- ` curl http://localhost:8080/function/func_fib -d "10" `
7
-
8
- (or use the FaaS UI to send the URL)
9
-
10
- ![ ] ( https://pbs.twimg.com/media/C9oep7KUMAAb_eZ.jpg:large )
11
-
12
- ## Installation
13
-
14
- You can either install ` faas-python-fib ` via your FaaS compose file or you can add it via the UI.
15
4
16
- ### Compose file
5
+ ## Install it
17
6
18
- Add this to ` docker-compose.yml ` and then redeploy the stack
19
-
20
- ``` Dockerfile
21
- ascii:
22
- image: developius/faas-python-fib:latest
23
- labels:
24
- function: "true"
25
- depends_on:
26
- - gateway
27
- networks:
28
- - functions
29
- environment:
30
- no_proxy: "gateway"
31
- https_proxy: $https_proxy
7
+ ```
8
+ $ faas-cli -action build -f ./stack.yml
9
+ $ faas-cli -action deploy -f ./stack.yml
32
10
```
33
11
34
- ` docker stack deploy -c docker-compose.yml func `
12
+ ## Run it
35
13
36
- ### UI
14
+ You can execute the function like this:
37
15
38
- Hit the ` CREATE NEW FUNCTION ` button and add these details:
16
+ ```
17
+ $ curl http://localhost:8080/function/fib -d "10"
18
+ ```
39
19
40
- - Image: ` developius/faas-python-fib:latest `
41
- - Service name: ` fib `
42
- - fProcess: ` python main.py `
43
- - Network: ` func_functions `
20
+ (or use the FaaS UI to send the URL)
44
21
45
- Hit create!
22
+ ![ ] ( https://pbs.twimg.com/media/C9oep7KUMAAb_eZ.jpg:large )
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ provider :
2
+ name : faas
3
+ provider : faas
4
+ gateway : http://localhost:8080
5
+
6
+ functions :
7
+ fib :
8
+ lang : python
9
+ handler : ./handler
10
+ image : developius/faas-python-fib
You can’t perform that action at this time.
0 commit comments