Skip to content

Commit

Permalink
add link to examples and adjust punctuation (#1256)
Browse files Browse the repository at this point in the history
Signed-off-by: meijin <meijin@tiduyun.com>

Co-authored-by: Derek Wang <whynowy@gmail.com>
  • Loading branch information
marviniter and whynowy authored Jun 23, 2021
1 parent 38cd9b6 commit b5e5d8e
Show file tree
Hide file tree
Showing 40 changed files with 143 additions and 167 deletions.
2 changes: 1 addition & 1 deletion docs/concepts/event_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ Available event-sources:
The complete specification is available [here](https://github.com/argoproj/argo-events/blob/master/api/event-source.md).

## Examples
Examples are located under `examples/event-sources`.
Examples are located under [examples/event-sources](https://github.com/argoproj/argo-events/tree/master/examples/event-sources).
2 changes: 1 addition & 1 deletion docs/concepts/sensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ A dependency is an event the sensor is waiting to happen.
Complete specification is available [here](https://github.com/argoproj/argo-events/blob/master/api/sensor.md).

## Examples
Examples are located under `examples/sensors`.
Examples are located under [examples/sensors](https://github.com/argoproj/argo-events/tree/master/examples/sensors).
6 changes: 3 additions & 3 deletions docs/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ another cluster you can ignore the Minikube specific step 3.

### Installation & Setup

#### 1. Get the project
#### 1. Get the project.

```
git clone git@github.com:argoproj/argo-events
cd argo-events
```

#### 2. Start Minikube and point Docker Client to Minikube's Docker Daemon
#### 2. Start Minikube and point Docker Client to Minikube's Docker Daemon.

```
minikube start
eval $(minikube docker-env)
```

#### 3. Build the project
#### 3. Build the project.

```
make all
Expand Down
7 changes: 3 additions & 4 deletions docs/eventsources/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ implementation.
## Contract

In order to qualify as generic eventsource, the eventsource server needs to
implement following gRPC contract,
implement following gRPC contract.

syntax = "proto3";

Expand All @@ -34,14 +34,13 @@ implement following gRPC contract,
bytes payload = 2;
}

The proto file is available
[here](https://github.com/argoproj/argo-events/blob/master/eventsources/sources/generic/generic.proto).
The proto file is available [here](https://github.com/argoproj/argo-events/blob/master/eventsources/sources/generic/generic.proto).

## Architecture

![arch](../assets/generic-eventsource.png)

Consider a generic eventsource,
Consider a generic eventsource.

apiVersion: argoproj.io/v1alpha1
kind: EventSource
Expand Down
8 changes: 4 additions & 4 deletions docs/eventsources/setup/amqp.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The structure of an event dispatched by the event-source over the eventbus looks

## Setup

1. Lets set up RabbitMQ locally,
1. Lets set up RabbitMQ locally.

apiVersion: v1
kind: Service
Expand Down Expand Up @@ -78,7 +78,7 @@ The structure of an event dispatched by the event-source over the eventbus looks

2. Make sure the RabbitMQ controller pod is up and running before proceeding further.

3. Expose the RabbitMQ server to local publisher using `port-forward`,
3. Expose the RabbitMQ server to local publisher using `port-forward`.

kubectl -n argo-events port-forward <rabbitmq-pod-name> 5672:5672

Expand All @@ -88,11 +88,11 @@ The structure of an event dispatched by the event-source over the eventbus looks

6. Inspect the event-source pod logs to make sure it was able to subscribe to the exchange specified in the event source to consume messages.

7. Create the sensor by running the following command,
7. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/amqp.yaml

8. Lets set up a rabbitmq publisher. If you don't have `pika` installed, run,
8. Lets set up a rabbitmq publisher. If you don't have `pika` installed, run.

python -m pip install pika --upgrade

Expand Down
6 changes: 3 additions & 3 deletions docs/eventsources/setup/aws-sns.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The structure of an event dispatched by the event-source over eventbus looks lik

1. Fetch your access and secret key for AWS account and base64 encode them.

1. Create a secret called `aws-secret` as follows,
1. Create a secret called `aws-secret` as follows.

apiVersion: v1
kind: Secret
Expand All @@ -38,7 +38,7 @@ The structure of an event dispatched by the event-source over eventbus looks lik
accesskey: <base64-access-key>
secretkey: <base64-secret-key>

1. Deploy the secret
1. Deploy the secret.

kubectl -n argo-events apply -f aws-secret.yaml

Expand All @@ -53,7 +53,7 @@ The structure of an event dispatched by the event-source over eventbus looks lik

1. Go to SNS settings on AWS and verify the webhook is registered. You can also check it by inspecting the event-source pod logs.

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/aws-sns.yaml

Expand Down
8 changes: 4 additions & 4 deletions docs/eventsources/setup/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The structure of an event dispatched by the event-source over the eventbus looks

1. Fetch your access and secret key for AWS account and base64 encode them.

1. Create a secret called `aws-secret` as follows,
1. Create a secret called `aws-secret` as follows.

apiVersion: v1
kind: Secret
Expand All @@ -46,7 +46,7 @@ The structure of an event dispatched by the event-source over the eventbus looks
accesskey: <base64-access-key>
secretkey: <base64-secret-key>

1. Deploy the secret
1. Deploy the secret.

kubectl -n argo-events apply -f aws-secret.yaml

Expand All @@ -56,11 +56,11 @@ The structure of an event dispatched by the event-source over the eventbus looks

1. Inspect the event-source pod logs to make sure it was able to subscribe to the queue specified in the event source to consume messages.

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/aws-sqs.yaml

1. Dispatch a message on sqs queue,
1. Dispatch a message on sqs queue.

aws sqs send-message --queue-url https://sqs.us-east-1.amazonaws.com/XXXXX/test --message-body '{"message": "hello"}'

Expand Down
4 changes: 2 additions & 2 deletions docs/eventsources/setup/calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Calendar event-source specification is available [here](https://github.com/argop

## Setup

1. Install the event source in the `argo-events` namespace,
1. Install the event source in the `argo-events` namespace.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/calendar.yaml

1. The event-source will generate events at every 10 seconds. Let's create the sensor,
1. The event-source will generate events at every 10 seconds. Let's create the sensor.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/calendar.yaml

Expand Down
6 changes: 3 additions & 3 deletions docs/eventsources/setup/emitter.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Emitter event-source specification is available [here](https://github.com/argopr

## Setup

1. Deploy the emitter in your local K8s cluster,
1. Deploy the emitter in your local K8s cluster.

---
apiVersion: v1
Expand Down Expand Up @@ -87,11 +87,11 @@ Emitter event-source specification is available [here](https://github.com/argopr

1. Inspect the event-source pod logs to make sure it was able to subscribe to the topic specified in the event source to consume messages.

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/emitter.yaml

1. Send a message on emitter channel using one of the clients https://emitter.io/develop/golang/
1. Send a message on emitter channel using one of the clients https://emitter.io/develop/golang/.

1. Once a message is published, an argo workflow will be triggered. Run `argo list` to find the workflow.

Expand Down
4 changes: 2 additions & 2 deletions docs/eventsources/setup/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ File event-source specification is available [here](https://github.com/argoproj/

1. The event source has configuration to listen to file system events for `test-data` directory and file called `x.txt`.

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/file.yaml

1. Log into the event-source pod by running following command,
1. Log into the event-source pod by running following command.

kubectl -n argo-events exec -it <event-source-pod-name> -c file-events -- /bin/bash

Expand Down
4 changes: 2 additions & 2 deletions docs/eventsources/setup/gcp-pub-sub.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GCP Pub/Sub event-source specification is available [here](https://github.com/ar

If you use Workload Identity, you can skip this and next steps.

1. Create a K8s secret called `gcp-credentials` to store the credentials file
1. Create a K8s secret called `gcp-credentials` to store the credentials file.

```yaml
apiVersion: v1
Expand All @@ -61,7 +61,7 @@ GCP Pub/Sub event-source specification is available [here](https://github.com/ar

1. Inspect the event-source pod logs to make sure it was able to subscribe to the topic.

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

```sh
kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/gcp-pubsub.yaml
Expand Down
9 changes: 4 additions & 5 deletions docs/eventsources/setup/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events
1. Create an API token if you don't have one. Follow [instructions](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) to create a new GitHub API Token.
Grant it the `repo_hook` permissions.

1. Base64 encode your api token key,
1. Base64 encode your api token key.

echo -n <api-token-key> | base64

Expand All @@ -46,7 +46,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events
data:
token: <base64-encoded-api-token-from-previous-step>

1. Deploy the secret into K8s cluster
1. Deploy the secret into K8s cluster.

kubectl -n argo-events apply -f github-access.yaml

Expand All @@ -59,10 +59,9 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events

kubectl apply -n argo-events -f <event-source-file-updated-in-previous-step>

1. Go to `Webhooks` under your project settings on GitHub and verify the webhook is registered. You can also do the same by
looking at the event-source pod logs.
1. Go to `Webhooks` under your project settings on GitHub and verify the webhook is registered. You can also do the same by looking at the event-source pod logs.

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/github.yaml

Expand Down
4 changes: 2 additions & 2 deletions docs/eventsources/setup/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events
1. Create an API token if you don't have one. Follow [instructions](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) to create a new GitLab API Token.
Grant it the `api` permissions.

1. Base64 encode your api token key,
1. Base64 encode your api token key.

echo -n <api-token-key> | base64

Expand Down Expand Up @@ -61,7 +61,7 @@ Example event-source yaml file is [here](https://github.com/argoproj/argo-events

1. Go to `Webhooks` under your project settings on GitLab and verify the webhook is registered.

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/gitlab.yaml

Expand Down
7 changes: 3 additions & 4 deletions docs/eventsources/setup/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@ Kafka event-source specification is available [here](https://github.com/argoproj

## Setup

1. Make sure to set up the Kafka cluster in Kubernetes if you don't already have one. You can refer to https://github.com/Yolean/kubernetes-kafka
for installation instructions.
1. Make sure to set up the Kafka cluster in Kubernetes if you don't already have one. You can refer to https://github.com/Yolean/kubernetes-kafka for installation instructions.

1. Create the event source by running the following command. Make sure to update the appropriate fields.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/kafka.yaml

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/kafka.yaml

1. Send message by using Kafka client. More info on how to send message at https://kafka.apache.org/quickstart
1. Send message by using Kafka client. More info on how to send message at https://kafka.apache.org/quickstart.

1. Once a message is published, an argo workflow will be triggered. Run `argo list` to find the workflow.

Expand Down
4 changes: 2 additions & 2 deletions docs/eventsources/setup/minio.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ The structure of an event dispatched by the event-source over the eventbus looks

mc mb minio/input

1. Let's install event source in the `argo-events` namespace,
1. Let's install event source in the `argo-events` namespace.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/minio.yaml

1. Let's create the sensor,
1. Let's create the sensor.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/minio.yaml

Expand Down
2 changes: 1 addition & 1 deletion docs/eventsources/setup/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MQTT event-source specification is available [here](https://github.com/argoproj/

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/mqtt.yaml

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/mqtt.yaml

Expand Down
2 changes: 1 addition & 1 deletion docs/eventsources/setup/nats.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ NATS event-source specification is available [here](https://github.com/argoproj/
kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/nats.yaml


1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/nats.yaml

Expand Down
10 changes: 5 additions & 5 deletions docs/eventsources/setup/nsq.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NSQ event-source is available [here](https://github.com/argoproj/argo-events/blo

## Setup

1. Deploy NSQ on local K8s cluster
1. Deploy NSQ on local K8s cluster.

apiVersion: v1
kind: Service
Expand Down Expand Up @@ -230,11 +230,11 @@ NSQ event-source is available [here](https://github.com/argoproj/argo-events/blo
- nsqlookupd.argo-events.svc:4161
terminationGracePeriodSeconds: 5

1. Expose NSQD by kubectl `port-forward`,
1. Expose NSQD by kubectl `port-forward`.

kubectl -n argo-events port-forward service/nsqd 4151:4151

1. Create topic `hello` and channel `my-channel`
1. Create topic `hello` and channel `my-channel`.

curl -X POST 'http://localhost:4151/topic/create?topic=hello'

Expand All @@ -244,11 +244,11 @@ NSQ event-source is available [here](https://github.com/argoproj/argo-events/blo

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/nsq.yaml

1. Create the sensor by running the following command,
1. Create the sensor by running the following command.

kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/nsq.yaml

1. Publish a message on topic `hello` and channel `my-channel`,
1. Publish a message on topic `hello` and channel `my-channel`.

curl -d '{"message": "hello"}' 'http://localhost:4151/pub?topic=hello&channel=my-channel'

Expand Down
6 changes: 3 additions & 3 deletions docs/eventsources/setup/pulsar.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Pulsar event-source is available [here](https://github.com/argoproj/argo-events/

## Setup

1. To test locally, deploy a standalone Pulsar,
1. To test locally, deploy a standalone Pulsar.

apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -83,11 +83,11 @@ Pulsar event-source is available [here](https://github.com/argoproj/argo-events/

1. For production deployment, follow the official Pulsar documentation online.

1. Deploy the eventsource,
1. Deploy the eventsource.

kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/pulsar.yaml

1. Deploy the sensor,
1. Deploy the sensor.

kubectl -n argo-events apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/pulsar.yaml

Expand Down
Loading

0 comments on commit b5e5d8e

Please sign in to comment.