Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working through examples to update commands #41

Merged
merged 5 commits into from
Oct 27, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 45 additions & 13 deletions modules/ROOT/pages/quickstart-functions.adoc
Original file line number Diff line number Diff line change
@@ -1,25 +1,57 @@
= Boson Functions quick start guide

This quick start guide demonstrates how you can create, deploy, and modify a Boson Functions project.
This quick start guide demonstrates how you can create, deploy, and modify Boson Functions.

.Prerequisites
== Prerequisites

Before you can complete the steps in the following procedures, you must ensure that:

* You have access to an OpenShift Container Platform cluster, which has the https://docs.openshift.com/container-platform/4.5/serverless/installing_serverless/installing-openshift-serverless.html[OpenShift Serverless Operator], https://docs.openshift.com/container-platform/4.5/serverless/installing_serverless/installing-knative-serving.html#installing-knative-serving[Knative Serving] and https://docs.openshift.com/container-platform/4.5/serverless/installing_serverless/installing-knative-eventing.html#installing-knative-eventing[Knative Eventing] installed.
* You have installed the https://docs.openshift.com/container-platform/4.5/cli_reference/openshift_cli/getting-started-cli.html#cli-getting-started[OpenShift `oc` CLI].
* You have installed the https://docs.openshift.com/container-platform/4.5/serverless/installing_serverless/installing-kn.html#installing-kn[Knative `kn` CLI].
* You must have installed https://docs.docker.com/install/[Docker], and have access to a DockerHub account.
* You have installed the https://docs.openshift.com/container-platform/4.5/serverless/installing_serverless/installing-kn.html#installing-kn[Knative `kn` CLI]. Installing `kn` provides the binary that enables use of the `kn faas` commands. There is no additional setup required to use `kn faas` commands after `kn` is successfully installed.
abrennan89 marked this conversation as resolved.
Show resolved Hide resolved

== Creating and managing Functions as a Knative service

// still need to do
//curl -L -o - faas.gz https://github.com/boson-project/faas/releases/download/v0.8.0/faas_linux_amd64.gz | gunzip > faas && chmod 755 faas
// sudo mv faas /usr/local/bin
// or is everything just installed with `kn` now?
.Create a project
. Create a project directory consisting of three URL parts.
+
.Example
After `kn` is installed, you can enter `kn faas --help` to see available options for using the CLI to create and manage functions.

.Example output
[source,terminal]
----
$ mkdir fn.example.io
```
Function as a Service

Create and run Functions as a Service.

Usage:
faas [command]

Available Commands:
build Build an existing Function project as an OCI image
completion Generate bash/zsh completion scripts
create Create a new Function, including initialization of local files and deployment
delete Delete a Function deployment
deploy Deploy an existing Function project to a cluster
describe Describes the Function
help Help about any command
init Initialize a new Function project
list Lists deployed Functions
run Runs the Function locally
version Print version. With --verbose the build date stamp and commit hash are included if available.

Flags:
-h, --help help for faas
-v, --verbose print verbose logs

Use "faas [command] --help" for more information about a command.
----

=== Creating a function

.Prerequisites
.Procedure
//placeholder
// kn faas create <path> -r <registry> -l <runtime> -t <trigger> -i <image> -n <namespace>

=== Deploying a function
=== Describe a function
=== Delete a function