-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathstellio.yml
More file actions
161 lines (153 loc) · 5.78 KB
/
stellio.yml
File metadata and controls
161 lines (153 loc) · 5.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# WARNING: Do not deploy this tutorial configuration directly to a production environment
#
# The tutorial docker-compose files have not been written for production deployment and will not
# scale. A proper architecture has been sacrificed to keep the narrative focused on the learning
# goals, they are just used to deploy everything onto a single Docker machine. All FIWARE components
# are running at full debug and extra ports have been exposed to allow for direct calls to services.
# They also contain various obvious security flaws - passwords in plain text, no load balancing,
# no use of HTTPS and so on.
#
# This is all to avoid the need of multiple machines, generating certificates, encrypting secrets
# and so on, purely so that a single docker-compose file can be read as an example to build on,
# not use directly.
#
# When deploying to a production environment, please refer to the Helm Repository
# for FIWARE Components in order to scale up to a proper architecture:
#
# see: https://github.com/FIWARE/helm-charts/
#
services:
api-gateway:
container_name: stellio-api-gateway
hostname: stellio
labels:
org.fiware: 'tutorial'
image: stellio/stellio-api-gateway:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=docker
ports:
- ${EXPOSED_PORT:-1026}:${STELLIO_PORT:-9090}
networks:
- default
search-service:
container_name: stellio-search-service
labels:
org.fiware: 'tutorial'
image: stellio/stellio-search-service:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/stellio_search
- SPRING_FLYWAY_URL=jdbc:postgresql://postgres/stellio_search
- SPRING_R2DBC_USERNAME=stellio
- SPRING_R2DBC_PASSWORD=stellio_password
- APPLICATION_AUTHENTICATION_ENABLED=false
- APPLICATION_TENANTS_0_NAME=urn:ngsi-ld:tenant:default
- APPLICATION_TENANTS_0_ISSUER=https://sso.stellio.io/auth/realms/default
- APPLICATION_TENANTS_0_DBSCHEMA=public
- APPLICATION_TENANTS_1_NAME=openiot
- APPLICATION_TENANTS_1_ISSUER=https://sso.stellio.io/auth/realms/openiot
- APPLICATION_TENANTS_1_DBSCHEMA=openiot
- APPLICATION_PAGINATION_LIMIT-DEFAULT=30
- APPLICATION_PAGINATION_LIMIT-MAX=1000
ports:
- 8083:8083
networks:
- default
restart: always
depends_on:
postgres:
condition: service_healthy
kafka:
condition: service_started
subscription-service:
container_name: stellio-subscription-service
labels:
org.fiware: 'tutorial'
image: stellio/stellio-subscription-service:${STELLIO_DOCKER_TAG}
environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_R2DBC_URL=r2dbc:postgresql://postgres/stellio_subscription
- SPRING_FLYWAY_URL=jdbc:postgresql://postgres/stellio_subscription
- SPRING_R2DBC_USERNAME=stellio
- SPRING_R2DBC_PASSWORD=stellio_password
- APPLICATION_AUTHENTICATION_ENABLED=false
- APPLICATION_TENANTS_0_NAME=urn:ngsi-ld:tenant:default
- APPLICATION_TENANTS_0_ISSUER=https://sso.stellio.io/auth/realms/default
- APPLICATION_TENANTS_0_DBSCHEMA=public
- APPLICATION_TENANTS_1_NAME=openiot
- APPLICATION_TENANTS_1_ISSUER=https://sso.stellio.io/auth/realms/openiot
- APPLICATION_TENANTS_1_DBSCHEMA=openiot
- APPLICATION_PAGINATION_LIMIT-DEFAULT=30
- APPLICATION_PAGINATION_LIMIT-MAX=1000
ports:
- 8085:8084
networks:
- default
restart: always
depends_on:
postgres:
condition: service_healthy
kafka:
condition: service_started
kafka:
labels:
org.fiware: 'tutorial'
image: confluentinc/cp-kafka:7.6.0
container_name: kafka
ports:
- 29092:29092
networks:
- default
restart: always
environment:
KAFKA_BROKER_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:29093'
KAFKA_LISTENERS: CONTROLLER://kafka:29093,PLAINTEXT://kafka:9092,PLAINTEXT_HOST://0.0.0.0:29092
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LOG4J_ROOT_LOGLEVEL: INFO
CLUSTER_ID: NjYzMTg0NDRjMzU5MTFlZm
# Databases
postgres:
labels:
org.fiware: 'tutorial'
image: stellio/stellio-timescale-postgis:${STELLIO_TIMESCALE_POSTGIS}
hostname: postgres
container_name: db-postgres
environment:
- POSTGRES_USER=stellio
- POSTGRES_PASS=stellio_password
- POSTGRES_DBNAME=stellio_search,stellio_subscription
- POSTGRES_MULTIPLE_EXTENSIONS=postgis,timescaledb,pgcrypto
- ACCEPT_TIMESCALE_TUNING=TRUE
ports:
- 5432:5432
networks:
- default
volumes:
- postgres-db:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -h localhost -U stellio"]
interval: 10s
timeout: 5s
retries: 20
start_period: 10s
# Tutorial acts as a series of dummy IoT Sensors over HTTP and connects to the Stellio Broker
tutorial:
environment:
- IOTA_DEFAULT_RESOURCE=/iot/d
- DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT} # Port used by the dummy IOT devices to receive commands
- DUMMY_DEVICES_TRANSPORT=HTTP # Default transport used by dummy Io devices
- DUMMY_DEVICES_PAYLOAD=ULTRALIGHT
- CONTEXT_BROKER=http://api-gateway:${STELLIO_PORT}/ngsi-ld/v1 # URL of the context broker to update context
networks:
default:
labels:
org.fiware: 'tutorial'
volumes:
postgres-db: ~