-
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.
scripts adapted to the new repo name readme.md
- Loading branch information
abattagl
committed
Jan 21, 2021
1 parent
17483c9
commit a4b0d23
Showing
14 changed files
with
190 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# qiot-datahub-docker | ||
## qiot-datahub-docker | ||
|
||
A set od docker-compose files to run the QIoT environment on your host machine using a OCI-compliant container engine and tools. | ||
Podman engine is recommendedthus you'll find below the prerequisited and mandatory actions to take before using these compose files: | ||
|
||
# if you want to go with podman: | ||
|
||
`$ sudo dnf install -y podman podman-compose` | ||
|
||
# Set up a dedicated container network for both your edge pods and datahub pods | ||
|
||
|
||
`$ sudo docker network create edge` - Network dedicated to the services running on the edge device | ||
/etc/cni/net.d/qiot-covid19-edge.conflist | ||
|
||
`$ sudo podman network create datahub` - Network dedicated to the services running on the datacenter | ||
/etc/cni/net.d/qiot-covid19-datahub.conflist | ||
|
||
`$ sudo docker network create qiotconnect` - Network dedicated to the interaction between the edge device and the datahub | ||
/etc/cni/net.d/qiot-covid19-edge.conflist | ||
|
||
# Tools to monitor your container engine: | ||
|
||
Docker: Portainer | ||
|
||
`docker run -d --privileged -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce` | ||
|
||
Podman: Podman Cockpit extension | ||
|
||
`sudo dnf install cockpit-podman -y` | ||
|
||
# Disable SELinux to allow containers to access persistent-volume mappings | ||
|
||
We can edit the `/etc/selinux/config` text file with our persistent setting, either enforcing, permissive, or disabled. By default this file appears as shown below. | ||
|
||
``` | ||
This file controls the state of SELinux on the system. | ||
SELINUX= can take one of these three values: | ||
enforcing - SELinux security policy is enforced. | ||
permissive - SELinux prints warnings instead of enforcing. | ||
disabled - No SELinux policy is loaded. | ||
LINUX=enforcing | ||
ELINUXTYPE= can take one of three two values: | ||
targeted - Targeted processes are protected, | ||
minimum - Modification of targeted policy. Only selected processes are protected. | ||
mls - Multi Level Security protection. | ||
SELINUXTYPE=targeted | ||
``` | ||
|
||
We can simply edit the SELINUX variable between enforcing, permissive, or disabled, as outlined in the comments of the file. After editing the file the changes will not be in place immediately and will only change after system reboot. |
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 |
---|---|---|
@@ -1,17 +1,28 @@ | ||
cd /home/abattagl/git/qiot/datahub/qiot-datahub-storer/qiot-datahub-storer-gas/ | ||
chmod +x build.sh | ||
./build.sh | ||
cd /home/abattagl/git/qiot/datahub/qiot-datahub-storer/qiot-datahub-storer-pollution/ | ||
chmod +x build.sh | ||
./build.sh | ||
cd /home/abattagl/git/qiot/datahub/qiot-datahub-aggregation/ | ||
chmod +x build.sh | ||
./build.sh | ||
cd /home/abattagl/git/qiot/datahub/qiot-datahub-query/ | ||
chmod +x build.sh | ||
./build.sh | ||
cd /home/abattagl/git/qiot/datahub/qiot-datahub-importer/ | ||
chmod +x build.sh | ||
./build.sh | ||
#cd /home/abattagl/git/qiot/datahub/qiot-datahub-importer/ | ||
#./build.sh | ||
cd /home/abattagl/git/qiot/datahub/qiot-datahub-registration/ | ||
chmod +x build.sh | ||
./build.sh | ||
cd /home/abattagl/git/qiot/datahub/qiot-datahub-endpoint/qiot-datahub-endpoint-mqtt/ | ||
chmod +x build.sh | ||
./build.sh | ||
#cd /home/abattagl/git/qiot/edge/qiot-sensors-emulator/ | ||
#chmod +x build.sh | ||
#./build.sh | ||
#cd /home/abattagl/git/qiot/edge/qiot-service/ | ||
#chmod +x build.sh | ||
#./build.sh | ||
|
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,84 @@ | ||
version: '3' | ||
services: | ||
activemq: | ||
image: vromero/activemq-artemis:2-alpine-latest | ||
container_name: "activemq" | ||
restart: "no" | ||
networks: | ||
- datahub | ||
- qiotconnect | ||
ports: | ||
- "8161:8161" | ||
# - "61616:61616" | ||
# - "5672:5672" | ||
- "1883:1883" | ||
environment: | ||
ARTEMIS_USERNAME: "quarkus" | ||
ARTEMIS_PASSWORD: "quarkus" | ||
# kafdrop: | ||
# image: obsidiandynamics/kafdrop | ||
# container_name: "kafkadrop" | ||
# restart: "no" | ||
# ports: | ||
# - "9000:9000" | ||
# environment: | ||
# KAFKA_BROKERCONNECT: "kafka:29092" | ||
# JVM_OPTS: "-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify" | ||
# depends_on: | ||
# - "kafka" | ||
kafka: | ||
image: obsidiandynamics/kafka | ||
container_name: "kafka" | ||
restart: "no" | ||
ports: | ||
- "2181:2181" | ||
- "9092:9092" | ||
environment: | ||
KAFKA_LISTENERS: "INTERNAL://:29092,EXTERNAL://kafka:9092" | ||
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:29092,EXTERNAL://kafka:9092" | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT" | ||
KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL" | ||
KAFKA_ZOOKEEPER_SESSION_TIMEOUT: "6000" | ||
KAFKA_RESTART_ATTEMPTS: "10" | ||
KAFKA_RESTART_DELAY: "5" | ||
ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: "0" | ||
mongo: | ||
image: "mongo" | ||
container_name: "mongo" | ||
environment: | ||
MONGO_INITDB_DATABASE: "qiot" | ||
#MONGO_INITDB_ROOT_USERNAME: "root" | ||
#MONGO_INITDB_ROOT_PASSWORD: "root" | ||
volumes: | ||
#- ./init-mongo.js: /docker-entrypoint-initdb.d/init-mongo.js:ro | ||
- ./volumes/mongo:/data/db | ||
ports: | ||
- "27017-27019:27017-27019" | ||
# mongo-express: | ||
# image: mongo-express | ||
# container_name: mongo-express | ||
# environment: | ||
# ME_CONFIG_MONGODB_SERVER: "mongo" | ||
# ME_CONFIG_MONGODB_PORT: "27017" | ||
# #ME_CONFIG_MONGODB_ENABLE_ADMIN: "false" | ||
# #ME_CONFIG_MONGODB_AUTH_DATABASE: "qiot" | ||
# #ME_CONFIG_MONGODB_AUTH_USERNAME: "qiot" | ||
# #ME_CONFIG_MONGODB_AUTH_PASSWORD: "qiot" | ||
# ports: | ||
# - "8081:8081" | ||
# influx: | ||
# image: "quay.io/influxdb/influxdb:v2.0.3" | ||
# container_name: "influx" | ||
# volumes: | ||
# - ./volumes/influxdb2:/root/.influxdbv2 | ||
# ports: | ||
# - "8086:8086" | ||
# - "9999:9999" | ||
networks: | ||
datahub: | ||
external: true | ||
qiotconnect: | ||
external: true | ||
default: | ||
external: | ||
name: datahub |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#docker exec -it mongoContainer mongo | ||
use qiot | ||
db.createUser( | ||
{ | ||
|
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
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
Oops, something went wrong.