This change enables users to have declarative specifications for Fission resources. Users can specify their "app" in a set of spec files, and use a new fission CLI command to "apply" these specs to a running cluster. The new "spec" CLI also includes archiving of local source files, and a file watcher that re-builds archives and uploads them on file changes, and a package build watcher that waits for package builds on the CLI. A "--spec" option is also added to "function create", and will be added to other resources in future changes. This option causes a YAML to be outputted to the specs directory instead of the resource being created on the cluster. The CLI "fission spec --help" outputs usage information.
Hello World in Go on Fission
hello.go is an very simple fission function that says "Hello, World!".
# This command creates the environment and function, and waits for the
# function build. Look at the YAML files in specs/ for details about
# how those are specified.
$ fission spec apply --wait
1 environment created
1 package created
1 function created
# This run the function and prints its output
$ fission function test --name hello
Hello, World!