Skip to content

Commit e7e309a

Browse files
authored
Merge pull request #58 from php-etl/runtimes
remove "PHP Objects" & "The YAML configuration format" pages
2 parents 12006ae + 55654f3 commit e7e309a

File tree

10 files changed

+40
-336
lines changed

10 files changed

+40
-336
lines changed

config.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,32 @@ hasChildren = true
5252

5353
[[menu.main]]
5454
parent = "Core concepts"
55-
name = "Satellite"
55+
name = "Satellites"
5656
url = "core-concept/satellite"
5757
weight = 1
5858

5959
[[menu.main]]
6060
parent = "Core concepts"
6161
name = "Pipeline"
62-
url = "core-concept/pipeline"
62+
url = "core-concept/satellite/pipeline"
6363
weight = 2
6464

6565
[[menu.main]]
6666
parent = "Core concepts"
6767
name = "Workflow"
68-
url = "core-concept/workflow"
68+
url = "core-concept/satellite/workflow"
6969
weight = 3
7070

7171
[[menu.main]]
7272
parent = "Core concepts"
7373
name = "HTTP Hook"
74-
url = "core-concept/http-hook"
74+
url = "core-concept/satellite/http-hook"
7575
weight = 4
7676

7777
[[menu.main]]
7878
parent = "Core concepts"
7979
name = "HTTP API"
80-
url = "core-concept/http-api"
80+
url = "core-concept/satellite/http-api"
8181
weight = 5
8282

8383
[[menu.main]]

content/core-concept/satellite/_index.en.md

Lines changed: 35 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Creating Satellite"
2+
title: "Satellites"
33
date: 2020-07-12T15:21:02+02:00
44
draft: false
55
type: "component"
@@ -13,8 +13,8 @@ weight: 1
1313
- [Building a satellite](#building-a-satellite)
1414
- [Setting up the Adapter](#setting-up-the-adapter)
1515
- [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)
1818
- [Setting up the runtime](#setting-up-the-runtime)
1919
- [Configuration formats](#configuration-formats)
2020
- Building
@@ -29,7 +29,7 @@ A satellite is the program that will execute your data flows. Depending on the t
2929

3030
It can be deployed in a various list of infrastructure types, including LAMP stacks and container-aware stacks.
3131

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).
3333

3434
> 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
3535
> ![Satellite schema](satellite.svg)
@@ -40,17 +40,13 @@ The configuration of your satellite must be defined in a yaml file.
4040

4141
A single file can describe several satellites. Each satellite is identified by a code (`my_satellite` in the following example) and has a label.
4242

43-
{{< tabs name="basic_definition" >}}
44-
45-
{{< tab name="YAML" codelang="yaml" >}}
43+
```yaml
4644
version: '0.3'
4745
satellites:
4846
my_satellite:
4947
label: 'My first satellite'
5048
#...
51-
{{< /tab >}}
52-
53-
{{< /tabs >}}
49+
```
5450

5551
### Setting up the Adapter
5652

@@ -66,9 +62,7 @@ To use a Docker image to build your satellite, implement the `docker` key with i
6662
- `workdir` : define the working directory of a Docker container
6763
- `tags` : determines the references to the Docker images
6864

69-
{{< tabs name="basic_definition_docker" >}}
70-
71-
{{< tab name="YAML" codelang="yaml" >}}
65+
```yaml
7266
version: '0.3'
7367
satellites:
7468
my_satellite:
@@ -80,49 +74,50 @@ satellites:
8074
- acmeinc/my-satellite:latest
8175
- acmeinc/my-satellite:1.0.0
8276
#...
83-
{{< /tab >}}
84-
85-
{{< /tabs >}}
77+
```
8678

8779
Here, we chose to use the `php:8.0-cli-alpine` base image on which our code will be executed.
8880
You could use any Docker image of your choice, however you will need to have a PHP runtime
8981
available, in a compatible version: >=8.0 with the CLI SAPI.
9082

9183
#### Using the file system
9284

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.
9486

9587
The filesystem key is accompanied by a `path` key which determines the path of the microservice to be built.
9688

97-
{{< tabs name="basic_definition_filesystem" >}}
98-
99-
{{< tab name="YAML" codelang="yaml" >}}
89+
```yaml
10090
version: '0.3'
10191
satellites:
10292
my_satellite:
10393
label: 'My first Satellite'
10494
filesystem:
10595
path: ../build # path to the build directory, relative to the YAML file
10696
#...
107-
{{< /tab >}}
97+
```
10898

109-
{{< /tabs >}}
99+
### Configure Composer
110100

111-
### Configure composer
101+
It's possible to declare the Composer dependencies, autoloads, repositories and auths that our microservice needs with the `composer` key.
112102

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:
114105

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+
```
116115
117-
> Tip : This part is not mandatory. If you do not configure it, these packages (`php-etl/pipeline-contracts`,
118-
`php-etl/pipeline`, `php-etl/pipeline-console-runtime`, `php-etl/workflow-console-runtime`,
119-
`psr/log`, `monolog/monolog`, `symfony/console`, `symfony/dependency-injection`) will be installed automatically.
116+
#### Dependencies
120117
121118
The `require` parameter allows to add all the packages, written as `package_name:version`, that your microservice needs.
122119

123-
{{< tabs name="basic_with_composer" >}}
124-
125-
{{< tab name="YAML" codelang="yaml" >}}
120+
```yaml
126121
version: '0.3'
127122
satellites:
128123
my_satellite:
@@ -131,9 +126,11 @@ satellites:
131126
composer:
132127
require:
133128
- "foo/bar:^0.2"
134-
{{< /tab >}}
129+
```
135130

136-
{{< /tabs >}}
131+
> Tip : This part is not mandatory. If you do not configure it, these packages (`php-etl/pipeline-contracts`,
132+
`php-etl/pipeline`, `php-etl/pipeline-console-runtime`, `php-etl/workflow-console-runtime`,
133+
`psr/log`, `monolog/monolog`, `symfony/console`, `symfony/dependency-injection`) will be installed automatically.
137134

138135
#### Autoload
139136

@@ -156,22 +153,7 @@ satellites:
156153
psr4:
157154
- namespace: "Pipeline\\"
158155
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+
```
175157

176158
#### Repositories
177159

@@ -225,10 +207,10 @@ the way we want our pipeline to handle our data flows.
225207
There are 4 types of runtimes, you will have to choose one depending on your needs:
226208
| name | description | details |
227209
|-|-|-|
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) |
232214

233215
{{< tabs name="runtimes" >}}
234216

content/core-concept/http-api/_index.en.md renamed to content/core-concept/satellite/http-api/_index.en.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ This package allows you to create an API that will serve multiple endpoints.
2323

2424
The goal is to be able to send data to these endpoints, to process it in a series of steps.
2525

26-
## Installation
27-
28-
```
29-
composer require php-etl/workflow
30-
```
31-
3226
## Basic usage
3327

3428
To define your HTTP API, you need to specify a root `path`, and one or multiple `routes` under that root:

content/core-concept/http-hook/_index.en.md renamed to content/core-concept/satellite/http-hook/_index.en.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ This package allows you to create an API that will serve a single endpoint.
2323

2424
The goal is to be able to send data to this endpoint, to process it in a series of steps.
2525

26-
## Installation
27-
28-
```
29-
composer require php-etl/workflow
30-
```
31-
3226
## Basic usage
3327

3428
Your HTTP Hook will serve the route set in the option `path`:

content/core-concept/satellite/php-objects.en.md

Lines changed: 0 additions & 133 deletions
This file was deleted.

content/core-concept/pipeline/_index.en.md renamed to content/core-concept/satellite/pipeline/_index.en.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ The different steps of our pipeline are `extract`, `transform` or `load` but the
3737

3838
This package allows you to create a microservice that will be operating a data pipeline.
3939

40-
## Installation
41-
42-
```shell
43-
composer require php-etl/pipeline
44-
```
45-
4640
## Basic usage
4741

4842
To define your pipeline, you need to specify which steps will make up the pipeline using the `steps` option. Each step
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)