Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a67566c5
Commit
a67566c5
authored
Nov 18, 2019
by
Alishan Ladhani
Committed by
Thong Kuah
Nov 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document how to use OpenFaaS runtimes with GitLab Serverless
parent
f78c8e7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
5 deletions
+35
-5
doc/user/project/clusters/serverless/index.md
doc/user/project/clusters/serverless/index.md
+35
-5
No files found.
doc/user/project/clusters/serverless/index.md
View file @
a67566c5
...
...
@@ -166,13 +166,14 @@ You must do the following:
or
[
serverless applications
](
#deploying-serverless-applications
)
onto your
cluster.
##
Deploying function
s
##
Supported runtime
s
> Introduced in GitLab 11.6.
Serverless functions for GitLab can be written in 6 supported languages:
Using functions is useful for dealing with independent events without needing
to maintain a complex unified infrastructure. This allows you to focus on a
single task that can be executed/scaled automatically and independently.
-
NodeJS and Ruby, with GitLab-managed and OpenFaas runtimes.
-
C#, Go, PHP, and Python with OpenFaaS runtimes only.
### GitLab managed runtimes
Currently the following
[
runtimes
](
https://gitlab.com/gitlab-org/serverless/runtimes
)
are offered:
...
...
@@ -182,6 +183,31 @@ Currently the following [runtimes](https://gitlab.com/gitlab-org/serverless/runt
`Dockerfile`
presence is assumed when a runtime is not specified.
### OpenFaaS runtimes
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/29253) in GitLab 12.5.
[
OpenFaaS classic runtimes
](
https://github.com/openfaas/templates#templates-in-store
)
can be used with GitLab serverless.
Runtimes are specified using the pattern:
`openfaas/classic/<template_name>`
. The following
example shows how to define a function in
`serverless.yml`
using an OpenFaaS runtime:
```
yaml
hello
:
source
:
./hello
runtime
:
openfaas/classic/ruby
description
:
"
Ruby
function
using
OpenFaaS
classic
runtime"
```
`handler`
is not needed for OpenFaaS functions. The location of the handler is defined
by the conventions of the runtime.
See the
[
`ruby-openfaas-function`
](
https://gitlab.com/knative-examples/ruby-openfaas-function
)
project for an example of a function using an OpenFaaS runtime.
## Deploying functions
> Introduced in GitLab 11.6.
You can find and import all the files referenced in this doc in the
**[functions example project](https://gitlab.com/knative-examples/functions)**
.
...
...
@@ -352,6 +378,10 @@ To run a function locally:
> Introduced in GitLab 11.5.
Serverless applications are the building block of serverless functions. They are useful in scenarios where an existing
runtime does not meet the needs of an application, such as one written in a language that has no runtime available. Note
though that serverless applications should be stateless!
NOTE:
**Note:**
You can reference and import the sample
[
Knative Ruby App
](
https://gitlab.com/knative-examples/knative-ruby-app
)
to get started.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment