Merge remote-tracking branch 'origin/master'

This commit is contained in:
Marco Zeisler 2021-06-17 22:44:54 +02:00
commit f56bb7c4e7
10 changed files with 19 additions and 16 deletions

View File

@ -1,6 +1,7 @@
import pickle
import threading
import time
import os
from datetime import datetime
from circuitbreaker import circuit
@ -13,7 +14,7 @@ from pika.exceptions import AMQPConnectionError
SWITCHING_TIME = 15
# Scale speed of switching by factor x
SCALING = 6
SCALING = int(os.environ['DSE2021_SCALING'])
class TrafficLight:

View File

@ -1,6 +1,7 @@
import pickle
import threading
import time
import os
from datetime import datetime
from typing import Union
@ -19,7 +20,7 @@ STARTING_POINT = geopy.Point(47.89053, 16.20703)
# Driving direction in degrees: 0=N, 90=E, 180=S, 270=W
BEARING = 2
# Scale speed of vehicles by factor x
SCALING = 6
SCALING = int(os.environ['DSE2021_SCALING'])
# in km/h
STARTING_VELOCITY = 130 * SCALING
# Interval between status updates in seconds (is not scaled)

View File

@ -1,6 +1,7 @@
import datetime
import pickle
import sys
import os
from typing import List, Dict
from datetime import datetime, timedelta
from math import floor
@ -22,7 +23,7 @@ sys.modules['target_velocity'] = target_velocity
ENTITY_IDENT_URL = 'http://entityident:5002/api/v1/resources/'
SCALING = 6
SCALING = int(os.environ['DSE2021_SCALING'])
class Orchestrator:

View File

@ -3,4 +3,4 @@ kind: ConfigMap
metadata:
name: scaling-configmap
data:
scaling: "1"
DSE2021_SCALING: "2"

View File

@ -23,11 +23,11 @@ spec:
- containerPort: 80
resources: {}
env:
- name: SCALING
- name: DSE2021_SCALING
valueFrom:
configMapKeyRef:
name: scaling-configmap
key: scaling
key: DSE2021_SCALING
restartPolicy: Always
serviceAccountName: ""
volumes: null

View File

@ -23,11 +23,11 @@ spec:
- containerPort: 5002
resources: {}
env:
- name: SCALING
- name: DSE2021_SCALING
valueFrom:
configMapKeyRef:
name: scaling-configmap
key: scaling
key: DSE2021_SCALING
restartPolicy: Always
serviceAccountName: ""
volumes: null

View File

@ -23,11 +23,11 @@ spec:
- containerPort: 5001
resources: {}
env:
- name: SCALING
- name: DSE2021_SCALING
valueFrom:
configMapKeyRef:
name: scaling-configmap
key: scaling
key: DSE2021_SCALING
restartPolicy: Always
serviceAccountName: ""
volumes: null

View File

@ -21,11 +21,11 @@ spec:
name: ifeed
resources: {}
env:
- name: SCALING
- name: DSE2021_SCALING
valueFrom:
configMapKeyRef:
name: scaling-configmap
key: scaling
key: DSE2021_SCALING
restartPolicy: Always
serviceAccountName: ""
volumes: null

View File

@ -21,11 +21,11 @@ spec:
name: orchestration
resources: {}
env:
- name: SCALING
- name: DSE2021_SCALING
valueFrom:
configMapKeyRef:
name: scaling-configmap
key: scaling
key: DSE2021_SCALING
restartPolicy: Always
serviceAccountName: ""
volumes: null

View File

@ -23,11 +23,11 @@ spec:
- containerPort: 5004
resources: {}
env:
- name: SCALING
- name: DSE2021_SCALING
valueFrom:
configMapKeyRef:
name: scaling-configmap
key: scaling
key: DSE2021_SCALING
restartPolicy: Always
serviceAccountName: ""
volumes: null