You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/core-concept/satellite/_index.en.md
+35-53Lines changed: 35 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Creating Satellite"
2
+
title: "Satellites"
3
3
date: 2020-07-12T15:21:02+02:00
4
4
draft: false
5
5
type: "component"
@@ -13,8 +13,8 @@ weight: 1
13
13
-[Building a satellite](#building-a-satellite)
14
14
-[Setting up the Adapter](#setting-up-the-adapter)
15
15
- [Using Docker](#using-docker)
16
-
- [Using system](#using-system)
17
-
-[Configure composer](#configure-composer)
16
+
- [Using the file system](#using-the-file-system)
17
+
-[Configure Composer](#configure-composer)
18
18
-[Setting up the runtime](#setting-up-the-runtime)
19
19
-[Configuration formats](#configuration-formats)
20
20
- Building
@@ -29,7 +29,7 @@ A satellite is the program that will execute your data flows. Depending on the t
29
29
30
30
It can be deployed in a various list of infrastructure types, including LAMP stacks and container-aware stacks.
31
31
32
-
In the context of Gyroscops, a satellite can be a [Pipeline](#using-pipeline), a [Workflow](#using-workflow), an Action, an API Proxy or an HTTP hook
32
+
In the context of Gyroscops, a satellite can either be a [Pipeline](pipeline), a [Workflow](workflow) (containing multiple [Pipelines](pipeline) and Actions), a HTTP [Hook](http-hook) or an [API](http-api).
33
33
34
34
> Those programs are called Satellites to reflect the fact that they need to operate very close from the main application in order to enhance their data connectivity
35
35
> 
@@ -40,17 +40,13 @@ The configuration of your satellite must be defined in a yaml file.
40
40
41
41
A single file can describe several satellites. Each satellite is identified by a code (`my_satellite` in the following example) and has a label.
42
42
43
-
{{< tabs name="basic_definition" >}}
44
-
45
-
{{< tab name="YAML" codelang="yaml" >}}
43
+
```yaml
46
44
version: '0.3'
47
45
satellites:
48
46
my_satellite:
49
47
label: 'My first satellite'
50
48
#...
51
-
{{< /tab >}}
52
-
53
-
{{< /tabs >}}
49
+
```
54
50
55
51
### Setting up the Adapter
56
52
@@ -66,9 +62,7 @@ To use a Docker image to build your satellite, implement the `docker` key with i
66
62
-`workdir` : define the working directory of a Docker container
67
63
-`tags` : determines the references to the Docker images
68
64
69
-
{{< tabs name="basic_definition_docker" >}}
70
-
71
-
{{< tab name="YAML" codelang="yaml" >}}
65
+
```yaml
72
66
version: '0.3'
73
67
satellites:
74
68
my_satellite:
@@ -80,49 +74,50 @@ satellites:
80
74
- acmeinc/my-satellite:latest
81
75
- acmeinc/my-satellite:1.0.0
82
76
#...
83
-
{{< /tab >}}
84
-
85
-
{{< /tabs >}}
77
+
```
86
78
87
79
Here, we chose to use the `php:8.0-cli-alpine` base image on which our code will be executed.
88
80
You could use any Docker image of your choice, however you will need to have a PHP runtime
89
81
available, in a compatible version: >=8.0 with the CLI SAPI.
90
82
91
83
#### Using the file system
92
84
93
-
To use a system file to build your satellite, implement the `filesystem` key.
85
+
To build your satellite inside your file system, implement the `filesystem` key.
94
86
95
87
The filesystem key is accompanied by a `path` key which determines the path of the microservice to be built.
96
88
97
-
{{< tabs name="basic_definition_filesystem" >}}
98
-
99
-
{{< tab name="YAML" codelang="yaml" >}}
89
+
```yaml
100
90
version: '0.3'
101
91
satellites:
102
92
my_satellite:
103
93
label: 'My first Satellite'
104
94
filesystem:
105
95
path: ../build # path to the build directory, relative to the YAML file
106
96
#...
107
-
{{< /tab >}}
97
+
```
108
98
109
-
{{< /tabs >}}
99
+
### Configure Composer
110
100
111
-
### Configure composer
101
+
It's possible to declare the Composer dependencies, autoloads, repositories and auths that our microservice needs with the `composer` key.
112
102
113
-
#### Dependencies
103
+
If you instead wish to use your own `composer.json` to define the requirements and autoloads, set the option `from_local` to `true`, and jump to [the next chapter](#setting-up-the-runtime).
104
+
This will copy `composer.json`, and optionally `composer.lock`, if they are present next to your YAML configuration file:
114
105
115
-
It's possible to declare the composer dependencies that our microservice needs with the `composer` key.
106
+
```yaml
107
+
version: '0.3'
108
+
satellites:
109
+
my_satellite:
110
+
label: 'My first Satellite'
111
+
# ...
112
+
composer:
113
+
from_local: true
114
+
```
116
115
117
-
> Tip : This part is not mandatory. If you do not configure it, these packages (`php-etl/pipeline-contracts`,
`psr/log`, `monolog/monolog`, `symfony/console`, `symfony/dependency-injection`) will be installed automatically.
137
134
138
135
#### Autoload
139
136
@@ -156,22 +153,7 @@ satellites:
156
153
psr4:
157
154
- namespace: "Pipeline\\"
158
155
paths: [""]
159
-
```
160
-
161
-
#### From local
162
-
163
-
The `from_local` parameter is optional and copies local `composer.json`, `composer.lock` and `vendor` files into your
164
-
microservice instead of creating them.
165
-
166
-
```yaml
167
-
version: '0.3'
168
-
satellites:
169
-
my_satellite:
170
-
label: 'My first Satellite'
171
-
# ...
172
-
composer:
173
-
from_local: true
174
-
```
156
+
```
175
157
176
158
#### Repositories
177
159
@@ -225,10 +207,10 @@ the way we want our pipeline to handle our data flows.
225
207
There are 4 types of runtimes, you will have to choose one depending on your needs:
226
208
| name | description | details |
227
209
|-|-|-|
228
-
| pipeline | The satellite will be operating a data pipeline, executed in the backend that can be executed as a cron job. | [Pipeline documentation page](../pipeline) |
229
-
| workflow | The satellite will be orchestrating multiple pipelines, executed in the backend that can be executed as a cron job | [Workflow documentation page](../workflow) |
230
-
| http_hook | The satellite will be operating an API on a single URL route. `http_hook` is used for webhooks. A webhook is a POST request sent to a URL. It's considered to be a mean for one application to provide other applications with real-time information | [HTTP Hook documentation page](../http-hook) |
231
-
| http_api | The satellite will be operating an API on multiple URL routes. `http_api` is used for REST API. | [HTTP API documentation page](../http-api) |
210
+
| pipeline | The satellite will be operating a data pipeline, executed in the backend that can be executed as a cron job. | [Pipeline documentation page](pipeline) |
211
+
| workflow | The satellite will be orchestrating multiple pipelines, executed in the backend that can be executed as a cron job | [Workflow documentation page](workflow) |
212
+
| http_hook | The satellite will be operating an API on a single URL route. `http_hook` is used for webhooks. A webhook is a POST request sent to a URL. It's considered to be a mean for one application to provide other applications with real-time information | [HTTP Hook documentation page](http-hook) |
213
+
| http_api | The satellite will be operating an API on multiple URL routes. `http_api` is used for REST API. | [HTTP API documentation page](http-api) |
0 commit comments