Skip to content

Commit f981570

Browse files
committed
Update docs for README
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 6e03b1a commit f981570

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

README.md

+9-31
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,16 @@ This project was forked from [zeerorg/cron-connector](https://github.com/openfaa
66

77
## How to Use
88

9-
You need to have OpenFaaS deployed first, see [https://docs.openfaas.com](https://docs.openfaas.com) to get started
9+
First, [deploy OpenFaaS with faasd or Kubernetes](https://docs.openfaas.com/deployment/)
1010

11-
### Deploy using the Helm chart
11+
### Deploy the connector for Kubernetes
1212

13-
The helm chart is available in the [faas-netes](https://github.com/openfaas/faas-netes/tree/master/chart/cron-connector) repo.
13+
For Kubernetes, see: [Scheduling function runs](https://docs.openfaas.com/reference/cron/)
1414

15-
For faasd, you can edit your `docker-compose.yaml` file to see the deployment. See the chart above for the image name and configuration required.
15+
### Deploy the connector for faasd
1616

17-
### Add to faasd
17+
For faasd, see [Serverless For Everyone Else](https://gumroad.com/l/serverless-for-everyone-else).
1818

19-
Edit `/var/lib/faasd/docker-compose.yaml` and add:
20-
21-
```yaml
22-
cron-connector:
23-
image: "ghcr.io/openfaas/cron-connector:latest"
24-
environment:
25-
- gateway_url=http://gateway:8080
26-
- basic_auth=true
27-
- secret_mount_path=/run/secrets
28-
volumes:
29-
# we assume cwd == /var/lib/faasd
30-
- type: bind
31-
source: ./secrets/basic-auth-password
32-
target: /run/secrets/basic-auth-password
33-
- type: bind
34-
source: ./secrets/basic-auth-user
35-
target: /run/secrets/basic-auth-user
36-
cap_add:
37-
- CAP_NET_RAW
38-
depends_on:
39-
- gateway
40-
```
41-
42-
Then restart faasd.
4319
### Trigger a function from Cron
4420

4521
The function should have 2 annotations:
@@ -51,8 +27,10 @@ For example, we may have a function "nodeinfo" which we want to invoke every 5 m
5127

5228
Deploy via the CLI:
5329

54-
```
55-
faas-cli store deploy nodeinfo --annotation schedule="*/5 * * * *" --annotation topic=cron-function
30+
```bash
31+
faas-cli store deploy nodeinfo \
32+
--annotation schedule="*/5 * * * *" \
33+
--annotation topic=cron-function
5634
```
5735

5836
Or via `stack.yml`:

0 commit comments

Comments
 (0)