.v0",
"Content-Type": "application/json",
}
```
@@ -60,8 +68,7 @@ Key HTTP headers used:
- `id:` The unique ID ([UUID v4](https://tools.ietf.org/html/rfc4122){:target="_blank"}) of the event
- `source:` The vCenter emitting the embedded vSphere event (FQDN resolved when available)
- `specversion:` The CloudEvent specification the used
-- `subject:` The vCenter event name (CamelCase)
-- `type:` The canonical name of the event class in "." dot notation
+- `type:` The canonical name of the event class in "." dot notation
- `time:` Timestamp when this event was produced by the event `provider` (`vcenter`)
- `content-type:` Data (payload) encoding scheme used (JSON)
@@ -71,42 +78,42 @@ The event as emitted by vCenter:
```json
{
- "Key": 23192,
- "ChainId": 23182,
- "CreatedTime": "2021-09-27T19:02:54.063Z",
+ "Key": 280034,
+ "ChainId": 280032,
+ "CreatedTime": "2024-01-17T13:02:05.426999Z",
"UserName": "VSPHERE.LOCAL\\Administrator",
"Datacenter": {
- "Name": "vcqaDC",
+ "Name": "jarvis-lab",
"Datacenter": {
"Type": "Datacenter",
- "Value": "datacenter-2"
+ "Value": "datacenter-1001"
}
},
"ComputeResource": {
- "Name": "cls",
+ "Name": "mk-1",
"ComputeResource": {
"Type": "ClusterComputeResource",
- "Value": "domain-c7"
+ "Value": "domain-c1015"
}
},
"Host": {
- "Name": "10.78.209.131",
+ "Name": "esxi02.jarvis.lab",
"Host": {
"Type": "HostSystem",
- "Value": "host-33"
+ "Value": "host-1012"
}
},
"Vm": {
- "Name": "test-vm-1",
+ "Name": "workload1",
"Vm": {
"Type": "VirtualMachine",
- "Value": "vm-45"
+ "Value": "vm-2073"
}
},
"Ds": null,
"Net": null,
"Dvs": null,
- "FullFormattedMessage": "test-vm-1 on 10.78.209.131 in vcqaDC is powered on",
+ "FullFormattedMessage": "DRS powered on workload1 on esxi02.jarvis.lab in jarvis-lab",
"ChangeTag": "",
"Template": false
}
diff --git a/docs/kb/use-functions.md b/docs/kb/use-functions.md
index 6c285ffc..66fb2cd7 100644
--- a/docs/kb/use-functions.md
+++ b/docs/kb/use-functions.md
@@ -11,131 +11,141 @@ cta:
- text: See our complete list of prebuilt functions - [here](/examples)
- text: Learn how to write your own function - [here](contribute-functions).
---
+
# Getting started with using functions
The steps below describe a generalized deployment step of a function on the VMware Event Broker Appliance. For customers looking to get started quickly, please look at deploying from our growing list of [Prebuilt Functions](/examples). The functions are organized by the language that they are written in and have well-documented README.md files with detailed deployment steps.
Deployment or development of functions can require the use of the following development tools: `git`, `docker`, and `kubectl`. If you would like some help in how to setup your workstation to use those tools, an in-depth tutorial is available that shows how to do that and to modify and deploy the [kn-ps-slack](https://github.com/vmware-samples/vcenter-event-broker-appliance/tree/master/examples/knative/powershell/kn-ps-slack) function (Knative powershell slack notification function) as an example. The tutorial can be found here: [in-depth function tutorial](function-tutorial-intro).
-### Deployment Prerequisites
+
+## Table of Contents
+
+- [Getting started with using functions](#getting-started-with-using-functions)
+ - [Deployment Prerequisites](#deployment-prerequisites)
+ - [Knative Function Deployment using kubectl](#knative-function-deployment-using-kubectl)
+ - [Knative Function Deployment using vSphere UI](#knative-function-deployment-using-vsphere-ui)
+ - [Function Deployment with Kubernetes Secrets](#function-deployment-with-kubernetes-secrets)
+ - [Kubernetes Secrets - Command Line](#kubernetes-secrets---command-line)
+ - [Kubernetes Secrets - vCenter UI](#kubernetes-secrets---vcenter-ui)
+
+## Deployment Prerequisites
Before proceeding to deploy a function, you must have VMware Event Broker Appliance deployed and be able to SSH to the appliance or have access to the kubernetes configuration file (`/root/.kube/config`) locally on your desktop to authenticate.
-### Knative Function Deployment using kubectl
-Step 1 - Clone repo
-```
+## Knative Function Deployment using kubectl
+
+- **Step 1:** Clone repo
+
+```console
git clone https://github.com/vmware-samples/vcenter-event-broker-appliance
cd vcenter-event-broker-appliance/examples/knative/powershell/kn-ps-echo
git checkout master
```
-Step 2 - Edit the configuration files
+- **Step 2:** Edit the configuration files
-* Edit `function.yml` to update `subject:` with the specific vCenter Event. All available events can be reviewed in the [vCenter Event Mapping](https://github.com/lamw/vcenter-event-mapping){:target="_blank"} document.
+Edit `function.yml` to update `subject:` with the specific vCenter Event. All available events can be reviewed in the [vCenter Event Mapping](https://github.com/lamw/vcenter-event-mapping) document.
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
- name: kn-ps-echo
+ name: kn-py-echo
labels:
app: veba-ui
spec:
template:
+ metadata:
+ annotations:
+ autoscaling.knative.dev/maxScale: "1"
+ autoscaling.knative.dev/minScale: "1"
spec:
containers:
- - image: projects.registry.vmware.com/veba/kn-ps-echo:1.0
+ - image: ghcr.io/vmware-samples/vcenter-event-broker-appliance/kn-py-echo:1.2
---
apiVersion: eventing.knative.dev/v1
kind: Trigger
metadata:
- name: veba-ps-echo-trigger
+ name: veba-py-echo-trigger
labels:
app: veba-ui
spec:
broker: default
filter:
attributes:
- type: com.vmware.event.router/event
- subject: DrsVmPoweredOnEvent
+ type: com.vmware.vsphere.VmPoweredOffEvent.v0
subscriber:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
- name: kn-ps-echo
+ name: kn-py-echo
```
-Step 3 - Deploy function to VMware Event Broker Appliance
+- **Step 3:** Deploy a function
-```
+```console
kubectl -n vmware-functions apply -f function.yaml
```
-Step 4 - Test your functions
-
-* Your function is now deployed and available for the VMware Event Router to invoke when it sees a matching event
-
-### Knative Function Deployment using vSphere UI
-
-Step 1 - Login to the vSphere UI and navigate to the VMware Event Broker Appliance UI by going to `Menu->VMware Event Broker`.
-
-Step 2 (Optional) - If a secret is required for a function. Select the `Secrets` tab and then click Add to create a new Kubernetes secret.
+- **Step 4:** Test your functions
-Step 3 - Under the `Events` tab, search and filter for the specific vSphere Event to deploy a function. One an event has been identified, click on the `>>` icon to expand and click on Deploy button to begin the guided wizard.
+Your function is now deployed and available for the VMware Event Router to invoke when it sees a matching event.
-Step 4 - In the `Function` section of the wizard, users will need to provide the following required parameters:
+## Knative Function Deployment using vSphere UI
-* `Function name` - A name for the function to be deployed
+- **Step 1:** Login to the vSphere UI and navigate to the VMware Event Broker Appliance UI by going to `Menu->VMware Event Broker`.
-* `Docker Image` - The Docker image that contains the function logic
+- **Step 2 (optional):** If a secret is required for a function. Select the `Secrets` tab and then click Add to create a new Kubernetes secret.
-Step 5 - (optional) In the `Configuration` section of the wizard, users can control the concurrency and scale bounds for the function:
+- **Step 3:** Under the `Events` tab, search and filter for the specific vSphere Event to deploy a function. One an event has been identified, click on the `>>` icon to expand and click on Deploy button to begin the guided wizard.
-* `Container concurrency:` - Specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Defaults to 0 which means concurrency to the application is not limited, and the system decides the target concurrency for the autoscaler.
+- **Step 4:** In the `Function` section of the wizard, users will need to provide the following required parameters:
+ - `Function name` - A name for the function to be deployed
+ - `Docker Image` - The Docker image that contains the function logic
-* `Minimum scale:` - Controls the minimum number of replicas that each Revision should have. Knative will attempt to never have less than this number of replicas at any one point in time. Defaults to 0 which means scale to zero.
+- **Step 5 (optional):** In the `Configuration` section of the wizard, users can control the concurrency and scale bounds for the function:
+ - `Container concurrency:` - Specifies the maximum allowed in-flight (concurrent) requests per container of the Revision. Defaults to 0 which means concurrency to the application is not limited, and the system decides the target concurrency for the autoscaler.
+ - `Minimum scale:` - Controls the minimum number of replicas that each Revision should have. Knative will attempt to never have less than this number of replicas at any one point in time. Defaults to 0 which means scale to zero.
+ - `Maximum scale:` - Controls the maximum number of replicas that each revision should have. Knative will attempt to never have more than this number of replicas running, or in the process of being created, at any one point in time. Defaults to 0 which means unlimited scale.
-* `Maximum scale:` - Controls the maximum number of replicas that each revision should have. Knative will attempt to never have more than this number of replicas running, or in the process of being created, at any one point in time. Defaults to 0 which means unlimited scale.
+- **Step 6 (optional):** In the `Configure Variables` section of the wizard, users can define new environment variables that can be used within their function
+ - `Name` - The name should begin with an uppercase letter and contain only uppercase letters(A-Z), numbers(0-9) and underscores(_)
+ - `Value` - The value for the environment variable
-Step 6 - (optional) In the `Configure Variables` section of the wizard, users can define new environment variables that can be used within their function
+- **Step 7 (optional):** In the `4 Configure Secrets` section of the wizard, users can select specific Kubernetes Secrets that were created earlier in Step 2 for use within their function
-* `Name` - The name should begin with an uppercase letter and contain only uppercase letters(A-Z), numbers(0-9) and underscores(_)
-
-* `Value` - The value for the environment variable
-
-Step 7 - (optional) In the `4 Configure Secrets` section of the wizard, users can select specific Kubernetes Secrets that were created earlier in Step 2 for use within their function
-
-Step 8 - Finally, review the summary for the function deployment and click `Finish` to begin the function deployment.
+- **Step 8:** Finally, review the summary for the function deployment and click `Finish` to begin the function deployment.
To verify the function deployment was successful, click on the `Functions` tab and ensure the function status `True` for the following:
+ - `ConfigurationsReady` : True
+ - `Ready` : True
+ - `RoutesReady` : True
-* `ConfigurationsReady` : True
-
-* `Ready` : True
-
-* `RoutesReady` : True
+- **Step 9:** Test and Invoke your functions
-Step 9 - Test and Invoke your functions
+Your function is now deployed and available for VMware Event Router to invoke when it sees a matching event
-* Your function is now deployed and available for VMware Event Router to invoke when it sees a matching event
-
-### Function Deployment with Kubernetes Secrets
+## Function Deployment with Kubernetes Secrets
Although the previous examples using the `kn-ps-echo` function did not require configuration parameters, most functions do require parameters to work correctly. A function author can hard code parameter values inside the function. However, any changes to the configuration parameters means the function's container image must be rebuilt. By using configuration parameters stored in a Kubernetes secret, a function can be reconfigured by simply changing the secret. This walk-through uses the [`kn-ps-email`](/examples) function from the examples folder to demonstrate working with secrets.
You can verify whether a function requires a secret by looking at the function's `function.yaml`. Below is part of the `function.yaml` for `kn-ps-email`. Note the `secretRef:` section specifying the name of the secret the function expects.
+
```yaml
+[...]
containers:
- - image: ghcr.io/vmware-samples/vcenter-event-broker-appliance/kn-ps-email:1.4
+ - image: ghcr.io/vmware-samples/vcenter-event-broker-appliance/kn-ps-email:1.5
envFrom:
- secretRef:
name: email-secret
env:
- name: FUNCTION_DEBUG
value: "false"
+[...]
```
-The `kn-ps-email` function uses several configuration parameters. The secrets file for `kn-ps-email` is named `email_secrets.json`.
+The `kn-ps-email` function uses several configuration parameters. The secrets file for `kn-ps-email` is named `email_secrets.json`.
```json
{
@@ -148,16 +158,18 @@ The `kn-ps-email` function uses several configuration parameters. The secrets fi
"EMAIL_FROM" : "notification-do-not-reply@primp-industries.com"
}
```
+
### Kubernetes Secrets - Command Line
To create the Kubernetes secret via the command line, modify the secrets file with configuration data specific to your environment. Then run this command:
-```bash
+
+```console
kubectl -n vmware-functions create secret generic email-secret --from-file=EMAIL_SECRET=email_secret.json
```
-`email-secret`, the argument just before `--from-file=`, is the name that Kubernetes uses to refer to the secret. This name must match the `secretRef` in `function.yaml`.
+`email-secret`, the argument just before `--from-file=`, is the name that Kubernetes uses to refer to the secret. This name must match the `secretRef` in `function.yaml`.
-`EMAIL_SECRET`, the value just after `--from-file=`, is the function environment variable that the secret gets loaded into. You can find the environment variable the function expects by looking at `handler.ps1`.
+`EMAIL_SECRET`, the value just after `--from-file=`, is the function environment variable that the secret gets loaded into. You can find the environment variable the function expects by looking at `handler.ps1`.
```powershell
try {
@@ -168,6 +180,7 @@ try {
```
### Kubernetes Secrets - vCenter UI
+
If you deployed VEBA with the vCenter UI option, you can create the secret by clicking on the `Secrets` section, then clicking `Add`. The `Secret Name` must match the `secretRef` in `function.yaml`. The `Secret Key` must match the environment variable the function expects, as shown in `handler.ps1` above. The `Secret Value` is the JSON copied from `email_secret.json`, modified with configuration data specific to your environment. Once all fields are filled out, click `Add Secret`.
![Adding a secret](img/veba-secret-ui-1.png)
diff --git a/docs/site/community.md b/docs/site/community.md
index e4dce81e..c5eaf2d3 100644
--- a/docs/site/community.md
+++ b/docs/site/community.md
@@ -17,15 +17,9 @@ links:
- description: "Follow us at "
url: "https://github.com/vmware-samples/vcenter-event-broker-appliance"
label: vcenter-event-broker-appliance
-- title: Slack
- image: /assets/img/icons/slack.svg
- items:
- - description: "Join us at"
- url: "https://vmwarecode.slack.com/archives/CQLT9B5AA"
- label: "#vcenter-event-broker-appliance"
- title: Email
image: /assets/img/icons/email.svg
- items:
+ items:
- description: "Email us at "
url: "mailto:dl-veba@vmwarem.com"
label: dl-veba@vmware.com
diff --git a/docs/site/evolutions.md b/docs/site/evolutions.md
index 71184ef7..0b284bc6 100644
--- a/docs/site/evolutions.md
+++ b/docs/site/evolutions.md
@@ -6,6 +6,21 @@ permalink: /evolution
limit: 3
entry:
+- title: VEBA [v0.8.0](https://github.com/vmware-samples/vcenter-event-broker-appliance/releases/tag/v0.8.0)
+ type: feature
+ date: Feb 2024
+ id: vzeroeightzero
+ detail:
+ subtitle: Features
+ text:
+ - Replaced VMware Event Router with VMware Tanzu Sources for Knative
+ - All VEBA endpoints now protected with basic authentication
+ - New Google Chat notification function
+ - Migrated function container images from Google (GCR) to Github (GHCR)
+ - Updated all Powershell/PowerCLI functions with the latest PS/PCLI base images
+ - Improved website documentation
+ - Various Bug Fixes and Code Improvements
+
- title: VEBA [v0.7.5](https://github.com/vmware-samples/vcenter-event-broker-appliance/releases/tag/v0.7.5)
type: feature
date: Mar 2023
diff --git a/docs/site/examples.md b/docs/site/examples.md
index d6f544e9..1d6825f1 100644
--- a/docs/site/examples.md
+++ b/docs/site/examples.md
@@ -272,6 +272,17 @@ examples:
links:
- language: powershell
url: "/tree/master/examples/knative/powershell/kn-ps-harbor-slack"
+
+ - title: Google Chat Notification
+ usecases:
+ - item: integration
+ - item: notification
+ id: kn-ps-google-chat-function
+ description: Function to send a Google Chat notification.
+ links:
+ - language: powershell
+ url: "/tree/master/examples/knative/powershell/kn-ps-google-chat"
+
---
A complete and updated list of ready to use functions curated by the VMware Event Broker community is listed below.
@@ -280,7 +291,7 @@ A complete and updated list of ready to use functions curated by the VMware Even
These functions are prebuilt, available in ready to deploy container and `function.yaml` files for you to deploy as is. Should you need to modify the functions to fit your needs, the `README.md` files provided within each function folder will provide all the information you need to customize, build and deploy the function on your VMware Event Broker appliance.
-> **Note:** These functions are provided and tested to be used with the VMware Event Broker Appliance deployed with [Knative](/kb/install-knative) as the event stream processor.
+> **Note:** These functions are provided and tested to be used with the VMware Event Broker Appliance deployed with [Knative](/kb/install-veba) as the event stream processor.
diff --git a/docs/site/faq.md b/docs/site/faq.md
index 1999025c..af20d004 100644
--- a/docs/site/faq.md
+++ b/docs/site/faq.md
@@ -10,30 +10,30 @@ faqs:
items:
- Q: Can I connect to more than one vCenter per Appliance deployment?
A: >
- No. The Appliance is currently designed to support one vCenter as the event source. Customers that are familiar with deploying the components on Kubernetes can deploy multiple instances of the VMware Event Router container.
+ No. During the deployment of the VMware Event Broker Appliance to vSphere, only one vSphere source and one Horizon source can be configured at a time.
- > **Note:** It is possible though to run **multiple instances** of the event router with different configurations to address multi-vCenter scenarios.
+ > **Note:** It is possible though to run multiple instances of a source (e.g. `VSphereSource`) with different configurations to address multi-vCenter scenarios. This decision was made for scalability and resource/tenancy isolation purposes.
- Q: Can the default TLS certificates that are being used on the Appliance be updated?
A: Yes! Follow the steps provided [here](/kb/advanced-certificates).
- Q: What happens if vCenter Server and VMware Event Broker connectivity is lost?
A: >
- VMware [Event Router](https://vmweventbroker.io/kb/event-router) streams vCenter events as they get generated and being stateless, does not persist any event information. To provide a certain level of reliability, the following Event Delivery Guarantees exists:
- - At-least-once event delivery semantics for the vCenter event provider by checkpointing the event stream into a file. In case of disconnection, the Event Router will replay all vCenter events of the last 10 minutes (10m reiteration) after a successful reconnection.
- - At-least-once event delivery semantics are not guaranteed if the event router crashes within seconds right after startup and having received *n* events but before creating the first valid checkpoint (current checkpoint interval is 5s).
+ A configured VMware [Tanzu Source](https://vmweventbroker.io/kb/tanzu-sources) streams vCenter events as they get generated and being stateless, does not persist any event information. To provide a certain level of reliability, the following Event Delivery Guarantees exists:
+ - **At-least-once event delivery** semantics for the vCenter event provider by checkpointing the event stream into a file. In case of disconnection, the Event Router will replay all vCenter events of the last 5 minutes (5m reiteration) after a successful reconnection.
+ - **At-least-once event delivery** semantics are not guaranteed if the source-adapter (pod) crashes within seconds right after startup and having received *n* events but before creating the first valid checkpoint (current checkpoint interval is 10s).
- Q: How long does it take for the functions to be invoked upon an event being generated?
A: Instantaneous to a few seconds! The function execution itself is not considered in this answer since that is dependent on the logic that is being implemented.
- Q: Can I setup the VMware Event Broker Appliance components on Kubernetes?
- A: Yes! Follow the steps provided [here](/kb/event-router#deployment).
+ A: Yes! Follow the steps provided [here](/kb/tanzu-sources#installation-tanzu-sources-for-knative).
- Q: Can I use a private registry like e.g. [Harbor](https://goharbor.io/) to have a source of truth for my functions (images)?
A: Yes! Follow the steps provided [here](https://vmweventbroker.io/kb/private-registry).
- Q: How can I monitor the Appliance, the Kubernetes components as well as the functions (pods) in terms of utilization, performance and state?
- A: vRealize Operations Manager provides these capabilities as described [here](https://rguske.github.io/post/monitoring-the-vmware-event-broker-appliance-with-vrealize-operations-manager/).
+ A: VMware Aria Operations provides these capabilities as described [here](https://docs.vmware.com/en/VMware-vRealize-Operations-Management-Pack-for-Kubernetes/1.8/management-pack-for-kubernetes/GUID-4ED07321-A5C9-46D6-8EB0-2661D853C0E9.html).
- title: Common Questions - Functions
id: function
items:
- Q: How do I obtain the Events in the function?
A: >
- Events are made available as stdin argument for the language that you are writing the function on. For example,
+ Events are made available as `stdin` argument for the language that you are writing the function on. For example,
- In Powershell the event is made available using the `$args` variable as shown here `$json = $args | ConvertFrom-Json`
- In Python the event is made available with the `req` variable as shown here `cevent = json.loads(req)`
- Q: How do I obtain the config file within the function?
@@ -73,6 +73,5 @@ Find answers to the frequently asked questions about VMware Event Broker Applian
- Explore our [documentation](/kb)
- Feel free to reach out
- Email us at [dl-veba@vmware.com](mailto:dl-veba@vmware.com){:target="_blank"}
- - Join us on slack [#vcenter-event-broker-appliance](https://vmwarecode.slack.com/archives/CQLT9B5AA){:target="_blank"} on vmwarecode.slack.com
- Tweet at us [@VMWEventBroker](https://twitter.com/VMWEventBroker){:target="_blank"}
- Explore our Github repository [here](https://github.com/vmware-samples/vcenter-event-broker-appliance){:target="_blank"}
\ No newline at end of file