Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-api
Commits
3f6c257b
Commit
3f6c257b
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
More documentation on server setup.
parent
f50bd04b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+25
-2
25 additions, 2 deletions
README.md
with
25 additions
and
2 deletions
README.md
+
25
−
2
View file @
3f6c257b
...
...
@@ -130,7 +130,17 @@ sudo mysql -u root -p < contrib/mariadb-database.sql
### Configuration
Copy the sample configuration file in
`./config/sample/sample-production.engine-api`
to
`config`
and edit the file.
First update the main configuration and then configure the type of federation. Depending on how you want to run your
First update the main configuration, such as your database connection and the default port. Also set the correct IP
and port in
`gunicorn.conf.py`
file.
> You might alos need to 'open' the chosen port in your `iptables` (Default is 8008)
```
shell
iptables
-A
INPUT
-p
tcp
-m
state
--state
NEW
-m
tcp
--dport
8008
-j
ACCEPT
```
Then configure the type of federation. Depending on how you want to run your
Engine API node and where it is deployed, you'll needed to uncomment one of these federation sections:
> To avoid any malfunction it is important that any other node-type configurations are commented out.
...
...
@@ -193,6 +203,10 @@ To run the API in an local development server execute:
For convenience running a plain
`./run.sh`
also starts the development server.
In development mode Engine uses the default
[
Flask
](
https://palletsprojects.com/p/flask/
)
web server.
**Please be careful not to use this type of server in your production environment!**
When you'll need to run all three nodes to do testing during development you can run:
```
bash
...
...
@@ -205,7 +219,16 @@ Here the run script uses the configurations located in `./test/config`.
### Production
To run the server for production using Gunicorn, you first need to create the Gunicorn configuration
For production Engine API defaults to using the WSGI HTTP Server
[
`Gunicorn`
](
https://gunicorn.org/
)
.
You might also want to pair Gunicorn with some proxy server, such as Nginx.
> Although there are many HTTP proxies available, we strongly advise that you use Nginx. If you choose another proxy
server you need to make sure that it buffers slow clients when you use default Gunicorn workers. Without this buffering
Gunicorn will be easily susceptible to denial-of-service attacks. You can use Hey to check if your proxy is behaving properly.
—
[
**Gunicorn Docs**
](
http://docs.gunicorn.org/en/latest/deploy.html
)
.
To run Gunicorn, you first need to create the Gunicorn configuration
by copying the sample
`./config/sample/gunicorn/sample-production.gunicorn.conf.py`
to your
`config`
directory.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment