archetype-resources.README.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of funktion-groovy-example-archetype
Show all versions of funktion-groovy-example-archetype
Creates a new funktion groovy example
#set( $H = '##' )
${H} Example Groovy Funktion
This example shows how easy it is to develop a [funktion](https://github.com/fabric8io/funktion/blob/master/README.md) in [Groovy](http://www.groovy-lang.org/).
The source code consists of:
* [funktion.yml](funktion.yml) to define the trigger URL (in this case HTTP)
* [main() function in groovy](src/main/groovy/io/fabric8/funktion/example/Main.groovy#L21-L23) to process incoming events
You can then run your funktion locally via:
```
mvn
```
You can then invoke it via your web browser at [http://localhost:8080/?name=Funktion](http://localhost:8080/?name=Funktion)
${H}# Trying your funktion on Kubernetes or OpenShift
Assuming your current shell is connected to Kubernetes or OpenShift so that you can type a command like
```
kubectl get pods
````
or for OpenShift
```
oc get pods
```
Then the following command will package your funktion and run it on Kubernetes:
```
mvn install fabric8:deploy
```
© 2015 - 2024 Weber Informatics LLC | Privacy Policy