Skip to content

Commit c198a6b

Browse files
committed
[doc] reorganization and link fixes for mkdocs
1 parent 897a0af commit c198a6b

File tree

12 files changed

+72
-48
lines changed

12 files changed

+72
-48
lines changed

core/integration/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A plugin can register a set of callback which can be invoked upon defined enviro
55

66
## Plugin system overview
77

8-
All plugins should implement the [`Plugin`](/core/integration/plugin.go) interface.
8+
All plugins should implement the [`Plugin`](https://github.com/AliceO2Group/Control/blob/master/core/integration/plugin.go) interface.
99
See the existing plugins for examples.
1010

1111
In order to have the plugin loaded by the AliECS, one has to:

docs/CONTRIBUTING.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,18 @@ Gomega/Ginkgo tests are preferred, but other style of tests are also welcome.
4646

4747
- Add documentation for new features.
4848

49-
- Your contribution will be reviewed by the project maintainers once the PR is marked as ready for review.
49+
- Your contribution will be reviewed by the project maintainers once the PR is marked as ready for review.
50+
51+
## Documentation guidelines
52+
53+
The markdown documentation is aimed to be browsed on GitHub, but it also on the aggregated [FLP documentation](https://alice-flp.docs.cern.ch) based on [MkDocs](https://www.mkdocs.org/).
54+
Consequently, any changes in the documentation structure should be reflected in the Table of Contents in the main README.md, as well as `mkdocs.yml` and `mkdocs.yml`.
55+
56+
The AliECS MkDocs documentation is split into two aforementioned files to follow the split between "Products" and "Developers" tabs in the FLP documentation.
57+
The `mkdocs-dev.yml` uses a symlink `aliecs-dev` to `aliecs` directory to avoid complaints about duplicated site names.
58+
59+
Because of the dual target of the documentation, the points below are important to keep in mind:
60+
61+
- Absolute paths in links to other files do not always work, they should be avoided.
62+
- When referencing source files in the repository, use full URIs to GitHub.
63+
- In MkDocs layouts, one cannot reference specific sections within markdown files. Only links to entire markdown files are possible.

docs/building.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ You should find several executables including `o2control-core`, `o2control-execu
8484

8585
For subsequent builds (after the first one), plain `make` (instead of `make all`) is sufficient. See the [Makefile reference](makefile_reference.md) for more information.
8686

87-
If you wish to also build the process control library and/or plugin, see [the OCC readme](/occ/README.md).
87+
If you wish to also build the process control library and/or plugin, see [the OCC readme](../occ/README.md).
8888

8989
This build of AliECS can be run locally and connected to an existing O²/FLP Suite cluster by passing a `--mesosUrl` parameter. If you do this, remember to `systemctl stop o2-aliecs-core` on the head node, in order to stop the core that came with the O²/FLP Suite and use your own.

docs/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Generated API documentation is available on [pkg.go.dev](https:///pkg.go.dev/git
44

55
The release log is managed via [GitHub](https://github.com/AliceO2Group/Control/releases/).
66

7-
Bugs go to [JIRA](https://alice.its.cern.ch/jira/browse/OCTRL).
7+
Bugs go to [JIRA](https://its.cern.ch/jira/projects/OCTRL/issues).
88

99
## Release Procedure
1010

docs/handbook/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ for examples of call roles that reference a variety of integration plugins.
199199
The state machine callback moments are exposed to the AliECS workflow template interface and can be used as triggers or synchronization points for integration plugin function calls. The `call` block can be used for this purpose, with similar syntax to the `task` block used for controllable tasks. Its fields are as follows.
200200

201201
* `func` - mandatory, it parses as an [`antonmedv/expr`](https://github.com/antonmedv/expr) expression that corresponds to a call to a function that belongs to an integration plugin object (e.g. `bookkeeping.StartOfRun()`, `dcs.EndOfRun()`, etc.).
202-
* `trigger` - mandatory, the expression at `func` will be executed once the state machine reaches this moment. For possible values, see [State machine triggers](/docs/handbook/operation_order.md#state-machine-triggers)
202+
* `trigger` - mandatory, the expression at `func` will be executed once the state machine reaches this moment. For possible values, see [State machine triggers](operation_order.md#state-machine-triggers)
203203
* `await` - optional, if absent it defaults to the same as `trigger`, the expression at `func` needs to finish by this moment, and the state machine will block until `func` completes.
204204
* `timeout` - optional, Go `time.Duration` expression, defaults to `30s`, the maximum time that `func` should take. The value is provided to the plugin via `varStack["__call_timeout"]` and the plugin should implement a timeout mechanism. The ECS will not abort the call upon reaching the timeout value!
205205
* `critical` - optional, it defaults to `true`, if `true` then a failure or timeout for `func` will send the environment state machine to `ERROR`.

docs/handbook/operation_order.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Environment operation order
22

33
This chapter attempts to document the order of important operations done during environment transitions.
4-
Since AliECS is an evolving system, the information presented here might be out-of-date, thus please refer to event handling in [core/environment/environment.go](https://github.com/AliceO2Group/Control/blob/master/core/environment/environment.go) and plugin calls in [ControlWorkflows/workflows/readout-dataflow.yaml](https://github.com/AliceO2Group/ControlWorkflows/blob/master/workflows/readout-dataflow.yaml) for the ultimate source of truth.
4+
Since AliECS is an evolving system, the information presented here might be out-of-date, thus please refer to event handling in [environment.go][https://github.com/AliceO2Group/Control/blob/master/core/environment/environment.go) and plugin calls in [ControlWorkflows/workflows/readout-dataflow.yaml](https://github.com/AliceO2Group/ControlWorkflows/blob/master/workflows/readout-dataflow.yaml) for the ultimate source of truth.
55
Also, please report to the ECS developers any inaccuracies.
66

77
## State machine triggers

docs/metrics.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ECS and aliecs.run are values.
5959
6) space - divides fields and timestamp
6060
7) timestamp - (optional) int64 value of unix timestamp in ns
6161

62-
In order to provide support for this format we introduced Metric structure in [common/monitoring/metric.go](../common/monitoring/metric.go).
62+
In order to provide support for this format we introduced Metric structure in [common/monitoring/metric.go](https://github.com/AliceO2Group/Control/blob/master/common/monitoring/metric.go).
6363
Following code shows how to create a Metric with `measurement` as measurement name,
6464
one tag `tag1=val1` and field `field1=42u`:
6565

@@ -70,7 +70,7 @@ m.SetFieldUInt64("field1", 42)
7070
```
7171

7272
However we also need to be able to store metrics, so these can be scraped correctly.
73-
This mechanism is implemented in [common/monitoring/monitoring.go](../common/monitoring/monitoring.go).
73+
This mechanism is implemented in [common/monitoring/monitoring.go](https://github.com/AliceO2Group/Control/blob/master/common/monitoring/monitoring.go).
7474
Metrics endpoint is run by calling `Run(port, endpointName)`. As this method is blocking
7575
it is advised to call it from `goroutine`. After this method is called we can than send
7676
metrics via methods `Send` and `SendHistogrammable`. If you want to send simple metrics
@@ -92,7 +92,7 @@ Example for this use-case is duration of some function,
9292
eg. measure sending batch of messages. If we want the best coverage of metrics possible
9393
we can combine both of these to measure amount of messages send per batch and
9494
also measurement duration of the send. For example in code you can take a look actual
95-
actual code in [writer.go](../common/event/writer.go) where we are sending multiple
95+
actual code in [writer.go](https://github.com/AliceO2Group/Control/blob/master/common/event/writer.go) where we are sending multiple
9696
fields per metric and demonstrate full potential of these metrics.
9797

9898
Previous code example will result in following metrics to be reported:
@@ -203,7 +203,7 @@ if different points, but creating statistical report as mentioned in previous pa
203203
### Event loop
204204

205205
In order to send metrics from unlimited amount of goroutines, we need to have
206-
robust and thread-safe mechanism. It is implemented in [common/monitoring/monitoring.go](../common/monitoring/monitoring.go)
206+
robust and thread-safe mechanism. It is implemented in [common/monitoring/monitoring.go](https://github.com/AliceO2Group/Control/blob/master/common/monitoring/monitoring.go)
207207
as event loop (`eventLoop`) that reads data from two buffered channels (`metricsChannel` and `metricsHistosChannel`)
208208
with one goroutine. Apart from reading messages from these two channels event loop also handles
209209
scraping requests from `http.Server` endpoint. As the http endpoint is called by a
@@ -219,8 +219,8 @@ which are consumed by event loop.
219219
In order to correctly implement behaviour described in the part about Aggregation
220220
we use the same implementation in two container aggregating objects
221221
`MetricsAggregate`, `MetricsReservoirSampling` implemented in files
222-
[common/monitoring/metricsaggregate.go](../common/monitoring/metricsaggregate.go)
223-
and [metricsreservoirsampling.go](../common/monitoring/metricsreservoirsampling.go)
222+
[common/monitoring/metricsaggregate.go](https://github.com/AliceO2Group/Control/blob/master/common/monitoring/metricsaggregate.go)
223+
and [metricsreservoirsampling.go](https://github.com/AliceO2Group/Control/blob/master/common/monitoring/metricsreservoirsampling.go)
224224
in the same directory. The implementation is done as different buckets
225225
in map with distinct keys (`metricsBuckets`). These keys need to be unique
226226
according to the timestamp and tags. We use struct `key` composed

hacking/COG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ In production, AliECS will manage and push all configuration to active tasks, bu
4444

4545
Every task still has their own configuration file, with paths such as `/etc/flp.d/qc/*.json` for QualityControl and `/home/flp/readout.cfg` for Readout. These paths can be edited by the user, and any changes affect all newly launched instances of the task.
4646

47-
All configuration file paths used by tasks can be found in the task descriptors of the workflow configuration repository in use. For more information on workflow configuration repositories, see [the `coconut repository` reference](/coconut/doc/coconut_repository.md). The default workflow configuration repository which comes pre-loaded with AliECS is accessible at [AliceO2Group/ControlWorkflows](https://github.com/AliceO2Group/ControlWorkflows) (all task descriptor files are found in the `tasks` directory).
47+
All configuration file paths used by tasks can be found in the task descriptors of the workflow configuration repository in use. For more information on workflow configuration repositories, see [the `coconut repository` reference](../coconut/doc/coconut_repository.md). The default workflow configuration repository which comes pre-loaded with AliECS is accessible at [AliceO2Group/ControlWorkflows](https://github.com/AliceO2Group/ControlWorkflows) (all task descriptor files are found in the `tasks` directory).
4848

4949
* **modify an existing workflow or task?**
5050

51-
You are free to keep as many workflow configuration repositories as you wish in your AliECS instance. For more information on workflow configuration repositories, see [the `coconut repository` reference](/coconut/doc/coconut_repository.md).
51+
You are free to keep as many workflow configuration repositories as you wish in your AliECS instance. For more information on workflow configuration repositories, see [the `coconut repository` reference](../coconut/doc/coconut_repository.md).
5252

5353
Changes to a configuration repository are immediately available after running `coconut repo refresh`. There is no support in the AliECS GUI at this time.
5454

mkdocs-dev.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
site_name: aliecs-dev
2+
3+
nav:
4+
- 'Contributing': '/docs/CONTRIBUTING.md'
5+
- 'Development': '/docs/development.md'
6+
- 'Package pkg.go.dev': 'https://pkg.go.dev/github.com/AliceO2Group/Control'
7+
- 'Building': '/docs/building.md'
8+
- 'Makefile reference': '/docs/makefile_reference.md'
9+
- 'Component Configuration': '/docs/handbook/appconfiguration.md'
10+
- 'Running': 'docs/running.md'
11+
- 'Metrics': '/docs/metrics.md'
12+
- 'OCC API debugging': '/docs/using_grpcc_occ.md'

mkdocs.yml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,29 @@ site_name: aliecs
22

33
nav:
44
- 'Handbook':
5-
- Introduction: handbook/index.md
6-
- Overview: handbook/overview.md
7-
- Basic Concepts: handbook/concepts.md
8-
- Environment Operation Order: handbook/operation_order.md
9-
- Configuration:
10-
- Workflow Configuration: handbook/configuration.md
11-
- Apricot Usage: './apricot/docs/apricot.md'
12-
- Apricot HTTP API: './apricot/docs/apricot_http_service.md'
13-
- Interfaces:
14-
- AliECS gRPC API: apidocs_aliecs.md
15-
- Apricot gRPC API: apidocs_apricot.md
16-
- OCC gRPC API (Protobuf based): apidocs_occ.md
17-
- Kafka: kafka.md
18-
- Workflow Variables: '../controlworkflows/README.md'
19-
- 'Command Reference':
20-
- coconut:
21-
- Overview: './coconut/README.md'
22-
- coconut: './coconut/doc/coconut.md'
23-
- coconut about: './coconut/doc/coconut_about.md'
24-
- coconut configuration: './coconut/doc/coconut_configuration.md'
25-
- coconut environment: './coconut/doc/coconut_environment.md'
26-
- coconut info: './coconut/doc/coconut_info.md'
27-
- coconut repository: './coconut/doc/coconut_repository.md'
28-
- coconut role: './coconut/doc/coconut_role.md'
29-
- coconut task: './coconut/doc/coconut_task.md'
30-
- coconut template: './coconut/doc/coconut_template.md'
31-
- peanut: './occ/peanut/README.md'
32-
- 'FAQ': faq.md
5+
- 'Introduction': 'docs/handbook/introduction.md'
6+
- 'Basic Concepts': 'docs/handbook/concepts.md'
7+
- 'Design Overview': 'docs/handbook/overview.md'
8+
- 'Workflow and Task Config.': 'docs/handbook/configuration.md'
9+
- 'Environment Operation Order': 'docs/handbook/operation_order.md'
10+
- 'Workflow Variables': '../controlworkflows'
11+
- 'Component reference':
12+
- 'AliECS GUI': 'hacking/COG.md'
13+
- 'AliECS core':
14+
- 'Integrated Services': 'core/integration/README.md'
15+
- 'Protocol': 'docs/apidocs_aliecs.md'
16+
- 'coconut':
17+
- 'Overview': 'coconut/README.md'
18+
- 'Command Ref.': 'coconut/doc/coconut.md'
19+
- 'apricot':
20+
- 'Overview': 'apricot/README.md'
21+
- 'HTTP Service': 'apricot/docs/apricot_http_service.md'
22+
- 'Protocol': 'docs/apidocs_apricot.md'
23+
- 'Command Ref.': 'apricot/docs/apricot.md'
24+
- 'occ':
25+
- 'Overview': 'occ/README.md'
26+
- 'Example': 'occ/occlib/examples/dummy-process/README.md'
27+
- 'Protocol': 'docs/apidocs_occ.md'
28+
- 'peanut':
29+
- 'Overview': 'occ/peanut/README.md'
30+
- 'Event Service': 'docs/kafka.md'

0 commit comments

Comments
 (0)