generated from OS2offdig/os2-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7aded42
commit 69b612e
Showing
14 changed files
with
247 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Clevertrack | ||
layout: default | ||
parent: Extractors | ||
has_children: false | ||
--- | ||
# Clevertrack | ||
|
||
Clevertrack uses a method of patching already read trips. | ||
If one does not patch you would continuously have to load already _known_ trips, because it's not possible to query | ||
based off of vehicle id. Hence, you have to define a date from which you want to load trips, and manage patching. | ||
|
||
The connection requires a `TOKEN` environment which is a classic uid format. | ||
In addition, you should provide a pickle path to; | ||
- `CAR_TRIPS_IDS` : path to a pickle that stores mapping between vehicle ids and patched trips | ||
- `PATCHED_IDS` : path to a pickle that stores record of patched trips | ||
|
||
|
||
Use the `docker-compose-extractor.yaml` file and define the functions you want to use in the extractor: | ||
|
||
| function | description | | ||
|------------------|--------------------------------------| | ||
| set-vehicles | syncs the vehicles | | ||
| set-roundtrips | loads, aggregate and save roundtrips | | ||
| patch-roundtrips | patches read trips on the connection | | ||
|
||
|
||
``` | ||
["/bin/sh", "-c", "python -m fleetmanager.extractors.clevertrack set-vehicles && python -m fleetmanager.extractors.clevertrack set-roundtrips && python -m fleetmanager.extractors.clevertrack patch-roundtrips"] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Extractors | ||
layout: default | ||
nav_order: 4 | ||
has_children: true | ||
--- | ||
|
||
# Extractors | ||
The extractors are an important part of FleetOptimiser, which asserts that data is synced from the fleetmanagement systems. | ||
The extractor will synchronise available metadata with vehicles, and will delta load the latest trips. | ||
Trips will be aggregated from single GPS logs, to an aggregated format that will only contain coordinates of a saved start location, | ||
such that the system does not save sensitive information. | ||
|
||
|
||
The amount of exposed metadata differ from system to system, so with some integrations there are more sanitation of data. | ||
|
||
|
||
All extractors expect the following env variables: | ||
|
||
| env | description | | ||
|-----|-------------| | ||
| DB_NAME | name of the database | | ||
| DB_USER | user of the database | | ||
| DB_PASSWORD | password of the user on the database | | ||
| DB_URL | host and port to the database | | ||
| DB_SERVER | dialect and driver | | ||
| TRIP_DURATION | maximum duration of a roundtrip | | ||
| MAX_DATE | first delta load date | | ||
| DESCRIPTION_FIELDS | additional fields to save from APIs | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: FleetComplete | ||
layout: default | ||
parent: Extractors | ||
has_children: false | ||
--- | ||
# FleetComplete | ||
|
||
The FleetComplete extractor expects the connection key to be present in the env as a single string, like: | ||
|
||
``` | ||
KEYS=keyToFleetComplete | ||
``` | ||
|
||
|
||
Use the `docker-compose-extractor.yaml` file and define the functions you want to use in the extractor: | ||
|
||
| function | description | | ||
|------------------| ----------- | | ||
| set-starts | loads and saves new locations | | ||
| set-vehicles | syncs the vehicles | | ||
| set-roundtrips | loads, aggregate and save roundtrips | | ||
| clean-roundtrips | deletes X (keep_data in DB) month old roundtrips | | ||
|
||
|
||
|
||
``` | ||
entrypoint: ["/bin/sh", "-c", "python -m fleetmanager.extractors.fleetcomplete set-starts && python -m fleetmanager.extractors.fleetcomplete set-vehicles && python -m fleetmanager.extractors.fleetcomplete set-roundtrips && python -m fleetmanager.extractors.fleetcomplete clean-roundtrips"] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Gamfleet | ||
layout: default | ||
parent: Extractors | ||
has_children: false | ||
--- | ||
# Gamfleet | ||
|
||
You must modify the urls in the Gamfleet extractor code in order to point to the correct endpoints. | ||
|
||
To make the load more effective, we use a `LOAD_RECORD_PATH` to store load history of each vehicle. | ||
This asserts that we don't load _old_ unusable trips. | ||
|
||
- `LOAD_RECORD_PATH` : path to json history (optional) | ||
- `KEY` : key to the Gamfleet API | ||
|
||
Use the `docker-compose-extractor.yaml` file and define the functions you want to use in the extractor: | ||
|
||
| function | description | | ||
|------------------| ----------- | | ||
| set-starts | loads and saves new locations | | ||
| set-vehicles | syncs the vehicles | | ||
| set-roundtrips | loads, aggregate and save roundtrips | | ||
| clean-roundtrips | deletes X (keep_data in DB) month old roundtrips | | ||
|
||
|
||
|
||
``` | ||
entrypoint: ["/bin/sh", "-c", "python -m fleetmanager.extractors.gamfleet set-starts && python -m fleetmanager.extractors.gamfleet set-vehicles && python -m fleetmanager.extractors.gamfleet set-roundtrips && python -m fleetmanager.extractors.gamfleet clean-roundtrips"] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: MileageBook | ||
layout: default | ||
parent: Extractors | ||
has_children: false | ||
--- | ||
# MileageBook | ||
|
||
The MileageBook extractor expects the connection key as environment variable: | ||
|
||
``` | ||
KEY=apiKey | ||
``` | ||
|
||
|
||
Use the `docker-compose-extractor.yaml` file and define the functions you want to use in the extractor: | ||
|
||
| function | description | | ||
|------------------| ----------- | | ||
| set-starts | loads and saves new locations | | ||
| set-vehicles | syncs the vehicles | | ||
| set-roundtrips | loads, aggregate and save roundtrips | | ||
| clean-roundtrips | deletes X (keep_data in DB) month old roundtrips | | ||
|
||
|
||
``` | ||
entrypoint: ["/bin/sh", "-c", "python -m fleetmanager.extractors.fleetcomplete set-starts && python -m fleetmanager.extractors.fleetcomplete set-vehicles && python -m fleetmanager.extractors.fleetcomplete set-roundtrips && python -m fleetmanager.extractors.fleetcomplete clean-roundtrips"] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Puma | ||
layout: default | ||
parent: Extractors | ||
has_children: false | ||
--- | ||
# Puma | ||
|
||
PUMA connection requires VPN access, which details will not be explained here. | ||
In addition to VPN access, it's also required to have read access to the PUMA database. | ||
|
||
We use a load record path to make loading of trips more efficient. In order not to continuously load unused _old_ trips. | ||
|
||
- `LOAD_RECORD_PATH` : path to a json mapping that stores load history | ||
- `FORVALTNINGER` : list of forvaltninger to load trips from | ||
- `PUMA_DRIVER` : the dialect of puma connection | ||
- `PUMA_USER` : user on the puma connection | ||
- `PUMA_URL` : url to the puma connection | ||
- `PUMA_NAME` : name of the puma connection | ||
- `PUMA_PASSWORD` : password to the puma connection | ||
|
||
|
||
Use the `docker-compose-extractor.yaml` file and define the functions you want to use in the extractor: | ||
|
||
| function | description | | ||
|------------------| ----------- | | ||
| set-starts | loads and saves new locations | | ||
| set-vehicles | syncs the vehicles | | ||
| set-roundtrips | loads, aggregate and save roundtrips | | ||
| clean-roundtrips | deletes X (keep_data in DB) month old roundtrips | | ||
|
||
|
||
``` | ||
entrypoint: ["/bin/sh", "-c", "python -m fleetmanager.extractors.puma set-starts && python -m fleetmanager.extractors.puma set-vehicles && python -m fleetmanager.extractors.puma set-roundtrips && python -m fleetmanager.extractors.puma clean-roundtrips"] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: SkyHost | ||
layout: default | ||
parent: Extractors | ||
has_children: false | ||
--- | ||
# SkyHost | ||
|
||
First version extracts data through a SOAP API. The environment must contain variable `KEYS` with value string that evaluates to list of strings e.g. | ||
|
||
``` | ||
KEYS="['firstKey', 'secondKey']" | ||
``` | ||
|
||
Use the `docker-compose-extractor.yaml` file and define the entrypoints function you want to use | ||
|
||
| function | description | | ||
| -------- | ----------- | | ||
| set-trackers | syncs the vehicles | | ||
| set-roundtrips | loads, aggregate and save roundtrips | | ||
| clean-roundtrips | deletes X (keep_data in DB) month old roundtrips | | ||
|
||
```` | ||
entrypoint: ["/bin/sh", "-c", "python -m fleetmanager.extractors.skyhost set-trackers && python -m fleetmanager.extractors.skyhost set-roundtrips && python -m fleetmanager.extractors.skyhost clean-roundtrips"] | ||
```` | ||
|
||
|
||
# SkyHost V2 | ||
|
||
Second version uses the rest api, and uses env variables `ACCOUNT_IDS` and `API_KEYS` as a comma-separated list. | ||
Each connection has exactly one account id and one api key. E.g. | ||
|
||
``` | ||
ACCOUNT_IDS="accountId#1,accountId#2" | ||
API_KEYS="apiKey#1,apiKey#2" | ||
``` | ||
|
||
Use the `docker-compose-extractor.yaml` file and define the functions you want to use in the extractor: | ||
|
||
| function | description | | ||
|--------------------| ----------- | | ||
| set-allowed-starts | loads and saves new locations | | ||
| set-trackers | syncs the vehicles | | ||
| set-roundtrips | loads, aggregate and save roundtrips | | ||
| clean-roundtrips | deletes X (keep_data in DB) month old roundtrips | | ||
|
||
|
||
```` | ||
entrypoint: ["/bin/sh", "-c", "python -m fleetmanager.extractors.skyhost set-allowed-starts && python -m fleetmanager.extractors.skyhost set-trackers && python -m fleetmanager.extractors.skyhost set-roundtrips && python -m fleetmanager.extractors.skyhost clean-roundtrips"] | ||
```` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters