|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "v0.1.19 Dispatch Release" |
| 4 | +year: 2018 |
| 5 | +--- |
| 6 | + |
| 7 | +# v0.1.19 Dispatch Release |
| 8 | + |
| 9 | +[Download v0.1.19](https://github.com/vmware/dispatch/releases/tag/v0.1.19) |
| 10 | + |
| 11 | + |
| 12 | +## Support for Exposed Event Driver |
| 13 | +Events may now be pushed (as opposed to pulled) from event sources to Dispatch. An *exposed* driver will create an ingress route and service to recieve events. |
| 14 | +When creating event driver type, use `--expose` to create exposed drivers, these drivers will have a URL which events can be pushed to. |
| 15 | +```bash |
| 16 | +$ dispatch create eventdrivertype eventgrid dispatchframework/events-eventgrid:0.0.1 --expose |
| 17 | +Created event driver type: eventgrid |
| 18 | +``` |
| 19 | +The `EXPOSE` field of created event driver type should be true: |
| 20 | +```bash |
| 21 | +$ dispatch get eventdrivertype |
| 22 | + NAME | IMAGE | EXPOSE |
| 23 | +----------------------------------------------------------- |
| 24 | + eventgrid | dispatchframework/events-eventgrid:0.0.1 | true |
| 25 | +----------------------------------------------------------- |
| 26 | +``` |
| 27 | +Next, to create exposed driver: |
| 28 | +```bash |
| 29 | +$ dispatch create eventdriver eventgrid --name eventgrid |
| 30 | +Created event driver: eventgrid |
| 31 | +``` |
| 32 | +And After the driver was created successfully, we should see an URL: |
| 33 | +```bash |
| 34 | +$ dispatch get eventdriver |
| 35 | + NAME | TYPE | STATUS | SECRETS | CONFIG | URL | REASON |
| 36 | +------------------------------------------------------------------------------------------------------- |
| 37 | + eventgrid | eventgrid | READY | | | https://example.com/driver/dispatch/... | |
| 38 | +------------------------------------------------------------------------------------------------------- |
| 39 | +``` |
| 40 | +and we can push events to this URL which the event driver will receive and process: |
| 41 | +```bash |
| 42 | +$ curl -i https://example.com/driver/dispatch/... -H 'Content-Type: application/cloudevents+json' -d @event.json |
| 43 | +HTTP/2 200 |
| 44 | +server: nginx/1.13.12 |
| 45 | +date: Tue, 26 Jun 2018 17:53:54 GMT |
| 46 | +content-length: 0 |
| 47 | +strict-transport-security: max-age=15724800; includeSubDomains |
| 48 | +``` |
| 49 | + |
| 50 | + |
| 51 | +## Update to Support Latest Cloud Event Implementation |
| 52 | +Dispatch now follows the latest [Cloud Events specification](https://github.com/cloudevents/spec/blob/a12b6b618916c89bfa5595fc76732f07f89219b5/spec.md)). `SourceType` and `EventType` were consolidated into one field, after the change, to add a new subscription for the `vm.being.created` event in a vcenter event driver, run: |
| 53 | +```bash |
| 54 | +$ dispatch create subscription --event-type vm.being.created myFunction |
| 55 | +``` |
| 56 | + |
| 57 | +Detailed guide [Working with Events](https://vmware.github.io/dispatch/documentation/guides/working-with-events). |
| 58 | + |
| 59 | + |
0 commit comments