Skip to content

Commit b27ce75

Browse files
committed
Added README for sample connector
Signed-off-by: Rishabh Gupta<r.g.gupta@outlook.com>
1 parent e255f9a commit b27ce75

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

cmd/tester/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Openfaas Sample Connector
2+
3+
This folder contains a sample openfaas connector. You can use this as a base for creating your own connectors.
4+
For a more complex example checkout [kafka-connector](https://github.com/openfaas-incubator/kafka-connector)
5+
6+
## How to Use
7+
8+
1. Clone this repository: `git clone https://github.com/openfaas-incubator/connector-sdk.git`
9+
2. Go into the directory: `cd ./connector-sdk/cmd/tester/yaml`
10+
3. For openfaas deployed on docker swarm do: `docker stack deploy func -c ./docker-compose.yml`
11+
4. For openfaas deployed on kubernetes do: `kubectl create -f ./kubernetes --namespace openfaas`
12+
13+
To check if it actually works and triggers a function, deploy any function with annotation `topic=faas-request`.
14+
You can also run this command to deploy a sample function and see `trigger-func` invocation count growing in ui.
15+
16+
```bash
17+
faas-cli deploy --image=functions/nodeinfo --name=trigger-func --annotation topic=faas-request
18+
```

0 commit comments

Comments
 (0)