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
9761c11f
Commit
9761c11f
authored
Nov 05, 2019
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document how to build serverless functions locally
parent
27fc442d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
doc/user/project/clusters/serverless/index.md
doc/user/project/clusters/serverless/index.md
+35
-0
No files found.
doc/user/project/clusters/serverless/index.md
View file @
9761c11f
...
@@ -313,6 +313,41 @@ The sample function can now be triggered from any HTTP client using a simple `PO
...
@@ -313,6 +313,41 @@ The sample function can now be triggered from any HTTP client using a simple `PO
![function execution](img/function-execution.png)
![function execution](img/function-execution.png)
### Running functions locally
Running a function locally is a good way to quickly verify behavior during development.
Running functions locally requires:
-
Go 1.12 or newer installed.
-
Docker Engine installed and running.
-
`gitlabktl`
installed using the Go package manager:
```
shell
GO111MODULE
=
on go get gitlab.com/gitlab-org/gitlabktl
```
To run a function locally:
1.
Navigate to the root of your GitLab serverless project.
1.
Build your function into a Docker image:
```
shell
gitlabktl serverless build
```
1.
Run your function in Docker:
```
shell
docker run
-itp
8080:8080 <your_function_name>
```
1.
Invoke your function:
```
shell
curl http://localhost:8080
```
## Deploying Serverless applications
## Deploying Serverless applications
> Introduced in GitLab 11.5.
> Introduced in GitLab 11.5.
...
...
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