Skip to content

Commit

Permalink
Merge branch 'review46'
Browse files Browse the repository at this point in the history
  • Loading branch information
cviolbarbosa committed Sep 26, 2024
2 parents bc5159d + e6c47f5 commit fd0d7a5
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 47 deletions.
71 changes: 32 additions & 39 deletions demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.5'
services:

# ----------------- Control Tower Database and Message Broker -----------------
# ----------------- Control Tower Database and Message Broker -----------------

local_postgres:
image: postgres:13
Expand All @@ -16,55 +16,53 @@ services:
networks:
- control-tower-net



local_rabbitmq:
image: rabbitmq:3-management
image: rabbitmq:3-management
hostname: local_rabbitmq
volumes:
- rbmq_data:/var/lib/rabbitmq/

ports:
- 5672:5672
- 15672:15672
ports:
- 5672:5672
- 15672:15672

networks:
- control-tower-net

# ----------------- HelyOS Core -----------------
# ----------------- HelyOS Core -----------------

helyos_core:
image: helyosframework/helyos_core:test

ports:
- 5002:5002 # Websocket
- 5000:5000 # GraphQL
- 8080:8080 # HelyOS Dashboard

- 5002:5002 # Websocket
- 5000:5000 # GraphQL
- 8080:8080 # HelyOS Dashboard

volumes:
- ./settings/config:/etc/helyos/config/
- ./settings/db_initial_data/:/etc/helyos/db_initial_data/
- ./settings/rsa_keys/helyos_private.key:/etc/helyos/.ssl_keys/helyos_private.key:ro
- ./settings/rsa_keys/helyos_public.key:/etc/helyos/.ssl_keys/helyos_public.key:ro

environment: # Check the documentation for more details: https://helyos-manual.readthedocs.io/en/latest/2-helyos-configuration/getting-started.html#helyos-settings
# DATABASE
- PGUSER=helyos_db_admin
environment:
# Check the documentation for more details: https://helyos-manual.readthedocs.io/en/latest/2-helyos-configuration/getting-started.html#helyos-settings
# DATABASE
- PGUSER=helyos_db_admin
- PGPASSWORD=helyos_secret
- PGHOST=local_postgres
- PGDATABASE=smartfarm_db
- PGHOST=local_postgres
- PGDATABASE=smartfarm_db
- PGPORT=5432

# GRAPHQL VARIABLES
- GQLPORT=5000

# RABBITMQ
- RBMQ_HOST=local_rabbitmq
# RABBITMQ
- RBMQ_HOST=local_rabbitmq
- RBMQ_PORT=5672
- RBMQ_API_PORT=15672
- RBMQ_SSL=False
- RBMQ_API_SSL=False
- RBMQ_API_SSL=False

# RBMQ ACCOUNTS
- CREATE_RBMQ_ACCOUNTS=True
Expand All @@ -73,67 +71,62 @@ services:
- AGENT_AUTO_REGISTER_TOKEN=0001-0002-0003-0000-0004

# HelyOS SETTINGS
- RUN_MODE=production # test | production | migration
- MESSAGE_RATE_LIMIT=50
- RUN_MODE=production # test | production | migration
- MESSAGE_RATE_LIMIT=50
- MESSAGE_UPDATE_LIMIT=20


networks:
- control-tower-net

depends_on:
- local_postgres
- local_rabbitmq



# ----------------- A Simple Truck Simulator -----------------
# ----------------- A Simple Truck Simulator -----------------

agent_simulator_1:
image: helyosframework/helyos_agent_slim_simulator:0.7.5


environment:

# AGENT ID
- UUID=Ab34069fc5-fdgs-434b-b87e-f19c5435113
- ASSIGNMENT_FORMAT=trajectory # fixed | trajectory | straight_to_destination | trucktrix-path
- UUID=Ab34069fc5-fdgs-434b-b87e-f19c5435113
- ASSIGNMENT_FORMAT=trajectory # fixed | trajectory | straight_to_destination | trucktrix-path
- NAME=MY_TRACTOR
- X0=-28000
- Y0=29000
- ORIENTATION=0.329
- VELOCITY=1.8
- VELOCITY=1.8
- VEHICLE_PARTS=2
- YARD_UID=1
- UPDATE_RATE=10

# RABBITMQ
- RBMQ_HOST=local_rabbitmq
# RABBITMQ
- RBMQ_HOST=local_rabbitmq
- RBMQ_PORT=5672
# - RBMQ_USERNAME= using REGISTRATION_TOKEN instead
# - RBMQ_PASSWORD= using REGISTRATION_TOKEN instead
- REGISTRATION_TOKEN=0001-0002-0003-0000-0004

networks:
- control-tower-net
- control-tower-net

depends_on:
- helyos_core
- local_rabbitmq
- local_rabbitmq

command: ["python", "main.py"]
command: [ "python", "main.py" ]

deploy:
restart_policy:
condition: on-failure
delay: 15s
max_attempts: 5
window: 60s

window: 60s

networks:
control-tower-net:
external: false
external: false

volumes:
postgres_data:
Expand Down
2 changes: 2 additions & 0 deletions demo/settings/config/microservices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
enable: true
apikey: "CN783V9SygdG0deHgfesdfsaeNuCqwbm"
timeout: 300
description: ""

context:
map_data: true
Expand All @@ -31,6 +32,7 @@ services:
enable: true
apikey: "ABy40lwSsdfafasdBiCbvU2hVEeY7t"
timeout: 180
description: ""

context:
map_data: true
Expand Down
8 changes: 4 additions & 4 deletions helyos_dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion helyos_dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"bootstrap": "^5.3.2",
"cheap-ruler": "^3.0.2",
"core-js": "^3.38.0",
"helyosjs-sdk": "2.1.0",
"helyosjs-sdk": "2.1.2",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"rxjs": "^7.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,17 @@ <h4>{{ selectedItem.name }}</h4>
</fieldset>
</div>

<div class="row">
<fieldset class="form-group col-xl-12">
<label for="description"> Description </label>
<textarea
id="description"
class="form-control"
[(ngModel)]="selectedItem.description"
name="description"></textarea>
</fieldset>
</div>

<button class="btn btn-primary" type="submit" (click)="editItem(selectedItem)">Save</button>
<button class="btn btn-secondary" type="reset" (click)="getItem(selectedItem.id)">Cancel</button>
</form>
Expand Down
7 changes: 4 additions & 3 deletions helyos_database/db_schema/0004_services_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ CREATE TABLE IF NOT EXISTS public.services (
require_agents_data boolean DEFAULT true,
require_mission_agents_data boolean DEFAULT true,
require_map_data boolean DEFAULT true,
require_map_objects text[] DEFAULT ARRAY['__all__']

require_map_objects text[] DEFAULT ARRAY['__all__'],
description character varying DEFAULT ''
);


Expand All @@ -39,4 +39,5 @@ comment on column services.is_dummy is '@ do not dispatch request; just copy req
comment on column services.health_endpoint is '@ end-point that returns status 2XX when service is healthy';
comment on column services.unhealthy is '@ Is microservice unhealthy?';
comment on column services.availability_timeout is '@ maximum time helyos will hold a request waiting for the system to be healthy';
comment on column services.filter_map_objects is '@ array used to filter map objects by type to be included in the helyOS context, sent to the microservice.';
comment on column services.filter_map_objects is '@ array used to filter map objects by type to be included in the helyOS context, sent to the microservice.';
comment on column services.description is '@ description of service';
1 change: 1 addition & 0 deletions helyos_server/src/modules/read_config_yml.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ const flattenServicesData = (jsonObj) => {
timeout: "result_timeout",
availability_timeout: "availability_timeout",
health_endpoint: "health_endpoint",
description: "description",
context: {
all_agents_data: "require_agents_data",
mission_agents_data: "require_mission_agents_data",
Expand Down

0 comments on commit fd0d7a5

Please sign in to comment.