Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates to make endpoint and parser work dynamically with sentilo noi… #48

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ services:
- ./mittaridatapumppu-endpoint:/home/app
- ./fvhiot-python/fvhiot:/home/app/fvhiot
environment:
DEVREG_ENDPOINTS_URL: "http://deviceregistry:8000/api/v1/hosts/localhost/"
DEVREG_API_TOKEN: "abcdef1234567890abcdef1234567890abcdef12"
ENDPOINT_CONFIG_URL: "http://deviceregistry:8000/api/v1/hosts/localhost/"
DEVICE_REGISTRY_TOKEN: "abcdef1234567890abcdef1234567890abcdef12"
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
UVICORN_LOG_LEVEL: "debug"
UVICORN_RELOAD: "true"
Expand All @@ -27,7 +27,7 @@ services:
parser-digita:
image: ghcr.io/city-of-helsinki/mittaridatapumppu-parser:latest
build: ./mittaridatapumppu-parser
container_name: parser-digita
container_name: parser
depends_on:
kafka:
condition: service_healthy
Expand All @@ -38,10 +38,9 @@ services:
# Kafka client config
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
KAFKA_GROUP_ID: "digita_dev"
KAFKA_PARSED_DATA_TOPIC_NAME: "digita.parseddata"
KAFKA_RAW_DATA_TOPIC_NAME: "digita.rawdata"
# Parser config
DEVICE_REGISTRY_URL: "http://deviceregistry:8000/api/v1"
DEVICE_REGISTRY_ENDPOINTS_URL: "http://deviceregistry:8000/api/v1/hosts/localhost/"
DEVICE_REGISTRY_TOKEN: abcdef1234567890abcdef1234567890abcdef12
# Debug config
DEBUG: 1
Expand Down
2 changes: 1 addition & 1 deletion fvhiot-python
18 changes: 18 additions & 0 deletions mittaridatapumppu-deviceregistry/devices/fixtures/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,23 @@
"kafka_parsed_data_topic": "digita.parsed",
"kafka_group_id": "digita_dev"
}
},
{
"model": "endpoints.endpoint",
"pk": 3,
"fields": {
"created_at": "2023-10-06T12:00:00.042Z",
"updated_at": "2023-10-06T12:00:00.042Z",
"host": 1,
"endpoint_path": "/api/v1/cesva",
"http_request_handler": "endpoints.sentilo.cesva",
"auth_token": "abc123",
"data_source": "sentilo.cesva.http",
"properties": null,
"allowed_ip_addresses": "",
"kafka_raw_data_topic": "cesva.rawdata",
"kafka_parsed_data_topic": "cesva.parsed",
"kafka_group_id": "cesva_dev"
}
}
]
2 changes: 1 addition & 1 deletion mittaridatapumppu-endpoint
2 changes: 1 addition & 1 deletion mittaridatapumppu-parser