docs: moving documentation around to be more clear and easier to browse (#236)
* moving documentation around to be more clear and easier to browse - moved assets into their own directory and updated links to them - moved operating docs into their own directory - consolidated kubernetes docs - added docker-swarm folder for docs - updated docs layout in docs/README.md to reflect the changes and make it easier to read * docs: s/Operating Functions/Operating IronFunctions/ * docs: removing duplicate database link * docs: moving databases into general docs * docs: moving databases/mqs back * docs: removing memory.md (duplicate of operating/routes.md) * docs: converting to markdown bullets
@@ -201,7 +201,7 @@ You will get a `call_id` in the response:
|
|||||||
|
|
||||||
If you watch the logs, you will see the function actually runs in the background:
|
If you watch the logs, you will see the function actually runs in the background:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Read more on [logging](docs/logging.md).
|
Read more on [logging](docs/logging.md).
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
# IronFunctions Documentation
|
# IronFunctions Documentation
|
||||||
|
|
||||||
|
* [FAQ](faq.md)
|
||||||
|
|
||||||
## For Developers
|
## For Developers
|
||||||
|
|
||||||
If you are a developer using IronFunctions through the API, this section is for you.
|
If you are a developer using IronFunctions through the API, this section is for you.
|
||||||
|
|
||||||
* [Quickstart](https://github.com/iron-io/functions#quickstart)
|
* [Quickstart](https://github.com/iron-io/functions#quickstart)
|
||||||
* [CLI tool - fnctl](../fnctl/README.md)
|
* [fnctl (CLI Tool)](/fnctl/README.md)
|
||||||
* [Writing functions](writing.md)
|
* [Writing functions](writing.md)
|
||||||
* [Writing Lambda functions](docs/lambda/create.md)
|
* [Writing Lambda functions](docs/lambda/create.md)
|
||||||
* [Packaging functions](packaging.md)
|
* [Packaging functions](packaging.md)
|
||||||
@@ -16,11 +18,13 @@ If you are a developer using IronFunctions through the API, this section is for
|
|||||||
|
|
||||||
If you are operating IronFunctions, this section is for you.
|
If you are operating IronFunctions, this section is for you.
|
||||||
|
|
||||||
* [Running in Production](production.md)
|
* [Running in Production](operating/production.md)
|
||||||
* [Databases](databases/README.md)
|
* [Databases](databases/README.md)
|
||||||
* [Message Queues](mqs/README.md)
|
* [Message Queues](mqs/README.md)
|
||||||
* [Logging](logging.md)
|
* [Logging](operating/logging.md)
|
||||||
* [Metrics](metrics.md)
|
* [Metrics](operating/metrics.md)
|
||||||
* [Triggers](triggers.md)
|
* [Triggers](operating/triggers.md)
|
||||||
* [Extending IronFunctions](extending.md)
|
* [Extending IronFunctions](operating/extending.md)
|
||||||
* [Docker Configuration](docker.md)
|
* [Docker Configuration](operating/docker.md)
|
||||||
|
* [Operating On Windows](operating/windows.md)
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 384 KiB After Width: | Height: | Size: 384 KiB |
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
@@ -1,4 +1,6 @@
|
|||||||
# HOWTO run IronFunction as a scheduler on top of Docker Standalone Swarm cluster
|
# Docker Swarm and IronFunctions
|
||||||
|
|
||||||
|
How to run IronFunction as a scheduler on top of Docker Standalone Swarm cluster.
|
||||||
|
|
||||||
## Quick installation
|
## Quick installation
|
||||||
|
|
||||||
@@ -106,8 +108,8 @@ $ docker run -d --name functions-00 \
|
|||||||
--network=functions-network \
|
--network=functions-network \
|
||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-e 'MQ=redis://functions-redis' \
|
-e 'MQ=redis://functions-redis' \
|
||||||
-e 'DB=postgres://postgres:mysecretpassword@functions-postgres/?sslmode=disable' \
|
-e 'DB=postgres://postgres:mysecretpassword@functions-postgres/?sslmode=disable' \
|
||||||
iron/functions
|
iron/functions
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -32,5 +32,5 @@ The IronMQ connector uses HTTPS by default. To use HTTP set the scheme to
|
|||||||
|
|
||||||
## What about message queue X?
|
## What about message queue X?
|
||||||
|
|
||||||
We're happy to add more and we love pull requests, so feel free to add one! Copy one of the implementations above as a starting point.
|
We're happy to add more and we love pull requests, so feel free to add one! Copy one of the implementations above as a starting point.
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
To get the best performance, you'll want to ensure that Docker is configured properly. These are the environments known to produce the best results:
|
To get the best performance, you'll want to ensure that Docker is configured properly. These are the environments known to produce the best results:
|
||||||
|
|
||||||
1) Linux 4.7 or newer with aufs or overlay2 module
|
1. Linux 4.7 or newer with aufs or overlay2 module.
|
||||||
2) Ubuntu 16.04 LTS or newer with aufs or overlay2 module
|
2. Ubuntu 16.04 LTS or newer with aufs or overlay2 module.
|
||||||
3) Docker 1.12 or newer to be available
|
3. Docker 1.12 or newer to be available.
|
||||||
|
|
||||||
It is important to reconfigure host's Docker with this filesystem module. Thus, in your Docker start scripts you must do as following:
|
It is important to reconfigure host's Docker with this filesystem module. Thus, in your Docker start scripts you must do as following:
|
||||||
|
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
# Logging
|
# Logging
|
||||||
|
|
||||||
There are a few things to note about what IronFunctions logs.
|
There are a few things to note about what IronFunctions logs.
|
||||||
|
|
||||||
## Logspout
|
## Logspout
|
||||||
|
|
||||||
We recommend using [logspout](https://github.com/gliderlabs/logspout) to forward your logs to a log aggregator of your choice.
|
We recommend using [logspout](https://github.com/gliderlabs/logspout) to forward your logs to a log aggregator of your choice.
|
||||||
|
|
||||||
## Format
|
## Format
|
||||||
|
|
||||||
All logs are emitted in [logfmt](https://godoc.org/github.com/kr/logfmt) format for easy parsing.
|
All logs are emitted in [logfmt](https://godoc.org/github.com/kr/logfmt) format for easy parsing.
|
||||||
|
|
||||||
## Call ID
|
## Call ID
|
||||||
|
|
||||||
Every function call/request is assigned a `call_id`. If you search your logs, you can track all the activity
|
Every function call/request is assigned a `call_id`. If you search your logs, you can track all the activity
|
||||||
for each function call and find errors on a call by call basis. For example, these are the log lines for an aynschronous
|
for each function call and find errors on a call by call basis. For example, these are the log lines for an aynschronous
|
||||||
function call:
|
function call:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Note the easily searchable `call_id=x` format.
|
Note the easily searchable `call_id=x` format.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
call_id=477949e2-922c-5da9-8633-0b2887b79f6e
|
call_id=477949e2-922c-5da9-8633-0b2887b79f6e
|
||||||
@@ -26,7 +26,7 @@ call_id=477949e2-922c-5da9-8633-0b2887b79f6e
|
|||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
Metrics are emitted via the logs.
|
Metrics are emitted via the logs.
|
||||||
|
|
||||||
See [Metrics](metrics.md) doc for more information.
|
See [Metrics](metrics.md) doc for more information.
|
||||||
|
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
Metrics are emitted via the logs for few couple of reasons:
|
Metrics are emitted via the logs for few couple of reasons:
|
||||||
|
|
||||||
1) Everything supports STDERR.
|
1. Everything supports STDERR.
|
||||||
2) User can optionally use them, if not, they just end up in the logs.
|
2. User can optionally use them, if not, they just end up in the logs.
|
||||||
3) No particular metrics system required, in other words, all metrics systems can be used via adapters (see below).
|
3. No particular metrics system required, in other words, all metrics systems can be used via adapters (see below).
|
||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
@@ -15,11 +15,11 @@ metric=someevent value=1 type=count
|
|||||||
metric=somegauge value=50 type=gauge
|
metric=somegauge value=50 type=gauge
|
||||||
```
|
```
|
||||||
|
|
||||||
It's a very simple format that can be easily parsed by any logfmt parser and passed on to another stats service.
|
It's a very simple format that can be easily parsed by any logfmt parser and passed on to another stats service.
|
||||||
|
|
||||||
TODO: List all metrics we emit to logs.
|
TODO: List all metrics we emit to logs.
|
||||||
|
|
||||||
## Statsd
|
## Statsd
|
||||||
|
|
||||||
The [Logspout Statsd Adapter](https://github.com/iron-io/logspout-statsd) adapter can parse the log metrics and forward
|
The [Logspout Statsd Adapter](https://github.com/iron-io/logspout-statsd) adapter can parse the log metrics and forward
|
||||||
them to any statsd server.
|
them to any statsd server.
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# Running IronFunctions in Production
|
# Running IronFunctions in Production
|
||||||
|
|
||||||
The [QuickStart guide](/README.md) is intended to quickly get started and kick the tires. To run in production and be ready to scale, you need
|
The [QuickStart guide](/README.md) is intended to quickly get started and kick the tires. To run in production and be ready to scale, you need
|
||||||
@@ -10,11 +9,11 @@ to use more production ready components.
|
|||||||
|
|
||||||
Here's a rough diagram of what a production deployment looks like:
|
Here's a rough diagram of what a production deployment looks like:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Load Balancer
|
## Load Balancer
|
||||||
|
|
||||||
Any load balancer will work, put every instance of IronFunctions that you run behind the load balancer.
|
Any load balancer will work, put every instance of IronFunctions that you run behind the load balancer.
|
||||||
|
|
||||||
**Note**: We will work on a smart load balancer that can direct traffic in a smarter way. See [#151](https://github.com/iron-io/functions/issues/151).
|
**Note**: We will work on a smart load balancer that can direct traffic in a smarter way. See [#151](https://github.com/iron-io/functions/issues/151).
|
||||||
|
|
||||||
@@ -34,13 +33,13 @@ The message queue is pluggable and we currently support a few options that can b
|
|||||||
## Logging, Metrics and Monitoring
|
## Logging, Metrics and Monitoring
|
||||||
|
|
||||||
Logging is a particularly important part of IronFunctions. It not only emits logs, but metrics are also emitted to the logs. Ops teams can then decide how they want
|
Logging is a particularly important part of IronFunctions. It not only emits logs, but metrics are also emitted to the logs. Ops teams can then decide how they want
|
||||||
to use the logs and metrics without us prescribing a particular technology. For instance, you can [logspout-statsd](https://github.com/iron-io/logspout-statsd) to capture metrics
|
to use the logs and metrics without us prescribing a particular technology. For instance, you can [logspout-statsd](https://github.com/iron-io/logspout-statsd) to capture metrics
|
||||||
from the logs and forward them to statsd.
|
from the logs and forward them to statsd.
|
||||||
|
|
||||||
[More about Metrics](metrics.md)
|
[More about Metrics](metrics.md)
|
||||||
|
|
||||||
## Scaling
|
## Scaling
|
||||||
|
|
||||||
There are metrics emitted to the logs that can be used to notify you when to scale. The most important being the `wait_time` metrics for both the
|
There are metrics emitted to the logs that can be used to notify you when to scale. The most important being the `wait_time` metrics for both the
|
||||||
synchronous and asynchronous functions. If `wait_time` increases, you'll want to start more IronFunctions instances.
|
synchronous and asynchronous functions. If `wait_time` increases, you'll want to start more IronFunctions instances.
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Triggers
|
# Triggers
|
||||||
|
|
||||||
Triggers are integrations that you can use in other systems to fire off functions in IronFunctions.
|
Triggers are integrations that you can use in other systems to fire off functions in IronFunctions.
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
When starting IronFunctions, you can pass in the following configuration variables as environment variables. Use `-e VAR_NAME=VALUE` in
|
When starting IronFunctions, you can pass in the following configuration variables as environment variables. Use `-e VAR_NAME=VALUE` in
|
||||||
docker run. For example:
|
docker run. For example:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||