-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating contributing and quickstart docs (#88)
- Loading branch information
1 parent
42ee0ab
commit 2d5f00a
Showing
3 changed files
with
56 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,76 @@ | ||
# Getting Started - Quickstart | ||
This is a guide to getting started with Argo Events using Minikube. | ||
This is a guide to getting started with Argo Events. | ||
|
||
## Requirements | ||
* Kubernetes cluster >v1.9 | ||
* Installed the [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) command-line tool >v1.9.0 | ||
* Have a [kubeconfig](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) file (default location is `~/.kube/config`). | ||
* Installed Minikube >v0.26.1 | ||
* Installed Go >1.9 and properly setup the [GOPATH](https://golang.org/doc/install) | ||
* Installed Go >1.9 and properly setup the [GOPATH](https://golang.org/doc/install) environment variable | ||
* Installed [dep](https://golang.github.io/dep/docs/installation.html), Go's dependency tool | ||
|
||
## 1. Checkout project's master branch | ||
## 1. Get the project | ||
``` | ||
$ git clone [email protected]:argoproj/argo-events.git | ||
go get github.com/argoproj/argo-events | ||
cd $GOPATH/src/github.com/argoproj/argo-events | ||
``` | ||
|
||
## 2. Install vendor dependencies | ||
``` | ||
$ dep ensure -vendor-only | ||
``` | ||
|
||
## 3. Start Minikube | ||
``` | ||
$ minikube start | ||
``` | ||
|
||
## 4. Point Docker Client to Minikube's Docker Daemon | ||
``` | ||
$ eval $(minikube docker-env) | ||
``` | ||
|
||
## 5. Build the project & Docker images | ||
``` | ||
$ cd go/src/github.com/argoproj/argo-events | ||
$ make all | ||
``` | ||
|
||
## 6. Deploy Argo Events SA, ClusterRoles, ConfigMap, and Sensor Controller | ||
Note 1: This process is manual right now, but we're working on providing a Helm chart or integrating as a Ksonnet application | ||
## 2. Deploy Argo Events SA, ClusterRoles, ConfigMap, and Sensor Controller | ||
Note 1: This process is manual right now, but we're working on providing a Helm chart or integrating as a Ksonnet application. | ||
Note 2: Modify the [argo-events-cluster-roles.yaml](../hack/k8s/manifests/argo-events-cluster-roles.yaml) file to use the correct namespace that you wish to deploy the sensor controller + signal microservices. | ||
``` | ||
$ k apply -f hack/k8s/manifests/argo-events-sa.yaml | ||
$ k apply -f hack/k8s/manifests/argo-events-cluster-roles.yaml | ||
$ k apply -f hack/k8s/manifests/sensor-crd.yaml | ||
$ k apply -f hack/k8s/manifests/sensor-controller-configmap.yaml | ||
$ k apply -f hack/k8s/manifests/sensor-controller-deployment.yaml | ||
kubectl apply -f hack/k8s/manifests/argo-events-sa.yaml | ||
kubectl apply -f hack/k8s/manifests/argo-events-cluster-roles.yaml | ||
kubectl apply -f hack/k8s/manifests/sensor-crd.yaml | ||
kubectl apply -f hack/k8s/manifests/sensor-controller-configmap.yaml | ||
kubectl apply -f hack/k8s/manifests/sensor-controller-deployment.yaml | ||
``` | ||
|
||
## 7. Deploy Argo Events Webhook Signal Microservice | ||
Note: You will need to separately deploy the various signal services that you wish to support. | ||
## 3. Deploy Argo Events Webhook Signal Microservice | ||
Note: In order to have a useful cluster for Argo Events, you will need to separately deploy the various signal services that you wish to support. This command installs the webhook signal service. | ||
``` | ||
$ k apply -f hack/k8s/manifests/services/webhook.yaml | ||
kubectl apply -f hack/k8s/manifests/services/webhook.yaml | ||
``` | ||
|
||
## 8. Install Argo | ||
## 4. Install Argo | ||
Follow instructions from https://github.com/argoproj/argo/blob/master/demo.md | ||
|
||
## 9. Create a webhook sensor | ||
## 5. Create a webhook sensor | ||
``` | ||
$ k apply -f examples/webhook-with-resource-param.yaml | ||
kubectl apply -f examples/webhook-with-resource-param.yaml | ||
``` | ||
|
||
Verify that the sensor was created. | ||
``` | ||
$ kubectl get sensors -n default | ||
kubectl get sensors -n default | ||
``` | ||
|
||
Verify that the signal microservice is listening for signals and the sensor is active. | ||
``` | ||
$ kubectl logs signal-webhook-xxx -f | ||
$ kubectl get sensor webhook-with-resource-param -n default -o yaml | ||
kubectl logs signal-webhook-xxx -f | ||
kubectl get sensor webhook-with-resource-param -n default -o yaml | ||
``` | ||
|
||
## 10. Trigger the webhook & corresponding Argo workflow | ||
## 6. Trigger the webhook & corresponding Argo workflow | ||
Trigger the webhook via sending a POST with a JSON with a "message" key and value. | ||
Ensure that you set the header "Content-Type" to "application/json" or this event will be ignored. | ||
Note: the `WEBHOOK_SERVICE_URL` will differ based on the Kubernetes cluster. | ||
``` | ||
$ curl -d '{"message":"this is my first webhook"}' -H "Content-Type: application/json" -X POST $(minikube service --url webhook) | ||
export WEBHOOK_SERVICE_URL=$(minikube service --url webhook) | ||
curl -d '{"message":"this is my first webhook"}' -H "Content-Type: application/json" -X POST $WEBHOOK_SERVICE_URL/hello | ||
``` | ||
|
||
Verify that the Argo workflow was run when the trigger was executed. | ||
``` | ||
$ argo list | ||
argo list | ||
``` | ||
|
||
Verify that the sensor was updated correctly and moved to a "Complete" phase | ||
``` | ||
$ kubectl get sensor webhook-with-resource-param -n default -o yaml | ||
kubectl get sensor webhook-with-resource-param -n default -o yaml | ||
``` | ||
|
||
Check the logs of the Argo workflow pod for the message you posted. | ||
``` | ||
$ k logs arguments-via-webhook-event main | ||
kubectl logs arguments-via-webhook-event main | ||
``` | ||
|
||
Check the logs of the sensor-controller pod or the associated signal microservice if there are problems. |