Skip to content

Commit

Permalink
docs: update quick-start. Fixes #448
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec committed Oct 8, 2021
1 parent 4100f0f commit e070bd2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 78 deletions.
32 changes: 2 additions & 30 deletions config/apps/kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
value: zookeeper:2181
- name: KAFKA_BROKER_ID
value: "0"
- name: KAFKA_CREATE_TOPICS
value: input-topic:1:2,output-topic:1:2
image: wurstmeister/kafka
imagePullPolicy: IfNotPresent
name: main
Expand Down Expand Up @@ -118,33 +120,3 @@ spec:
readinessProbe:
tcpSocket:
port: 2181
---
apiVersion: v1
kind: Pod
metadata:
name: input
namespace: argo-dataflow-system
spec:
containers:
- args:
- -fvN
- http://testapi/kafka/pump-topic?topic=input-topic&sleep=2s
command:
- curl
image: golang:1.16
name: pump-topic
initContainers:
- args:
- -fvN
- http://testapi/kafka/create-topic?topic=input-topic
command:
- curl
image: golang:1.16
name: create-input-topic
- args:
- -fvN
- http://testapi/kafka/create-topic?topic=output-topic
command:
- curl
image: golang:1.16
name: create-output-topic
28 changes: 0 additions & 28 deletions config/apps/kafka/input-pod.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions config/apps/kafka/kafka-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ spec:
value: zookeeper:2181
- name: KAFKA_BROKER_ID
value: "0"
- name: KAFKA_CREATE_TOPICS
value: "input-topic:1:2,output-topic:1:2"
readinessProbe:
tcpSocket:
port: 9092
Expand Down
1 change: 0 additions & 1 deletion config/apps/kafka/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
namespace: argo-dataflow-system
resources:
- kafka-minimal.yaml
- input-pod.yaml
- ../../../examples/dataflow-kafka-default-secret.yaml
40 changes: 21 additions & 19 deletions docs/QUICK_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,51 @@
Deploy into the `argo-dataflow-system` namespace:

```bash
kubectl create ns argo-dataflow-system
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/config/apps/argo-server.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/config/quick-start.yaml
```

If you want to experiment with Kafka:
Change to the installation namespace:

```bash
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/config/apps/kafka.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/dataflow-kafka-default-secret.yaml
kubectl config set-context --current --namespace=argo-dataflow-system
```

If you want to experiment with NATS Streaming (aka STAN):
Wait for the deployments to be ready:

```bash
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/config/apps/stan.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/dataflow-stan-default-secret.yaml
kubectl get deploy -w
```

Change to the installation namespace:
If you want to experiment with Kafka:

```bash
kubectl config set-context --current --namespace=argo-dataflow-system
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/config/apps/kafka.yaml
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/dataflow-kafka-default-secret.yaml
```

Wait for the deployments to be ready:
Wait for the statefulsets to be ready:

```bash
kubectl get deploy -w
kubectl get statefulset -w
```

You can port forward to the Kafka broker:

```bash
kubectl port-forward svc/kafka-broker 9092:9092
```

Access the user interface:
You can use Kafka's console producer to send messages to the broker,
see [Kafka quickstart](https://kafka.apache.org/quickstart).

If you want the user interface:

```bash
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/config/apps/argo-server.yaml
kubectl get deploy -w
kubectl port-forward svc/argo-server 2746:2746
```

Open [http://localhost:2746/pipelines/argo-dataflow-system](http://localhost:2746/pipelines/argo-dataflow-system).

Run [one of the examples](EXAMPLES.md).

Clean up:

```bash
kubectl delete ns argo-dataflow-system
```

0 comments on commit e070bd2

Please sign in to comment.