diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 7aee965..0000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "backend"] - path = backend - url = ../VILLASweb-backend.git - branch = develop diff --git a/Dockerfile.nginx b/Dockerfile.nginx deleted file mode 100644 index 14e8087..0000000 --- a/Dockerfile.nginx +++ /dev/null @@ -1,3 +0,0 @@ -FROM nginx:stable-alpine - -COPY etc/nginx/villas.conf /etc/nginx/conf.d/default.conf diff --git a/Dockerfile.node b/Dockerfile.node deleted file mode 100644 index a778e3c..0000000 --- a/Dockerfile.node +++ /dev/null @@ -1,3 +0,0 @@ -FROM villas/node:latest - -COPY etc/node/*.conf /etc/villas/node/ diff --git a/VILLAS.archive b/VILLAS.archive deleted file mode 100644 index 0167f76..0000000 Binary files a/VILLAS.archive and /dev/null differ diff --git a/docker-compose-production.yml b/docker-compose-production.yml deleted file mode 100644 index 2f229e0..0000000 --- a/docker-compose-production.yml +++ /dev/null @@ -1,61 +0,0 @@ -version: "2" - -volumes: - database: - driver: local - website: - -services: - # Build the frontend with node into a Docker volume - # This container does nothing useful beside providing an - # assets container to the nginx service - frontend: - image: villas-web - volumes: - - website:/usr/src/app/build - - nginx: - image: nginx:stable-alpine - ports: - - "80:80" - - "443:443" - volumes: - - website:/www - - ./etc/nginx:/etc/nginx/conf.d/ - - # The VILLASweb backend - backend: - image: villas-backend - environment: - - NODE_ENV=production - restart: always - - # The MongoDB database for the VILLASweb backend - database: - image: mongo:latest - user: mongodb - volumes: - - database:/data/db - restart: always - user: mongodb - - # AMQP broker for VILLAScontroller -# broker: -# image: rabbitmq:management -# environment: -# RABBITMQ_DEFAULT_USER: "villas" -# RABBITMQ_DEFAULT_PASS: "s3c0sim4!" -# ports: -# - "8080:15672" -# - "5672:5672" -# networks: -# villas: - - # VILLASnode, the gateway between UDP and WebSocket traffic - node: - image: villas/node - privileged: true - restart: always - command: node /etc/villas/node/websocket-demo.conf - volumes: - - ./etc/node:/etc/villas/node/ diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 8fa9a85..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,74 +0,0 @@ -version: "2" - -volumes: - database: - driver: local - website: - -services: - # Build the frontend with node into a Docker volume - # This container does nothing useful beside providing an - # assets container to the nginx service - frontend: - build: - context: . - volumes: - - website:/usr/src/app/build - - nginx: - build: - context: . - dockerfile: Dockerfile.nginx - ports: - - "80:80" - - "443:443" - volumes: - - website:/www - - # The VILLASweb backend - backend: - build: backend - environment: - - NODE_ENV=production - restart: always - - # The MongoDB database for the VILLASweb backend - database: - image: mongo:latest - user: mongodb - volumes: - - database:/data/db - restart: always - user: mongodb - - # AMQP broker for VILLAScontroller -# broker: -# image: rabbitmq:management -# environment: -# RABBITMQ_DEFAULT_USER: "villas" -# RABBITMQ_DEFAULT_PASS: "s3c0sim4!" -# ports: -# - "8080:15672" -# - "5672:5672" - - # VILLASnode, the gateway between UDP and WebSocket traffic - node: - build: - context: . - dockerfile: Dockerfile.node - privileged: true - restart: always - command: node /etc/villas/node/websocket-demo.conf - volumes: - - /villas:/villas - - ./etc/node:/etc/villas/node - - # Web Interface for MongoDB - mongo-express: - image: mongo-express - environment: - ME_CONFIG_MONGODB_SERVER: database - ME_CONFIG_BASICAUTH_USERNAME: admin - ME_CONFIG_BASICAUTH_PASSWORD: "mongo-admin" - ports: - - "8081:8081" diff --git a/etc/nginx/villas.conf b/etc/nginx/villas.conf deleted file mode 100644 index d738a4b..0000000 --- a/etc/nginx/villas.conf +++ /dev/null @@ -1,50 +0,0 @@ -server { - listen 80 default_server; - server_name VILLASweb; - - # backend location - location /api/ { - proxy_redirect off; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # rewrite url to exclude /api on context broker side - rewrite ^/api/?(.*) /api/$1 break; - - proxy_pass http://backend:4000/; - } - - location /public { - proxy_pass http://backend:4000/public; - } - - location /ws/api/ { - proxy_pass http://node/api/; - } - - location /ws { - proxy_pass http://node/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - - # frontend location - location / { - root /www; - index index.html; - - try_files $uri $uri/ /index.html; - } - - # error pages - error_page 404 /404.html; - location = /404.html { - root /usr/share/nginx/html; - } - - error_page 500 502 503 504 50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } -} diff --git a/etc/node/websocket-demo-files.conf b/etc/node/websocket-demo-files.conf deleted file mode 100644 index 840e6d4..0000000 --- a/etc/node/websocket-demo-files.conf +++ /dev/null @@ -1,78 +0,0 @@ -/** Example configuration file for VILLASnode. - * - * The syntax of this file is similar to JSON. - * A detailed description of the format can be found here: - * http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files - * - * @author Steffen Vogel - * @copyright 2017, Institute for Automation of Complex Power Systems, EONERC - * @license GNU General Public License (version 3) - * - * VILLASnode - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - *********************************************************************************/ - -stats = 2; - -nodes = { - file_ssA = { - type = "file", - - in = { -# uri = "https://OOKc0UfswqvgRp0@rwth-aachen.sciebo.de/public.php/webdav/inl-csu/ssA_cosim_inl-csu_20170726_03-28-21.csv", - uri = "/villas/data/GenericCoSimExmp/inl-csu/ssA_cosim_inl-csu_20170726_03-28-21.csv" - eof = "rewind" - } - }, - file_ssB = { - type = "file", - - in = { -# uri = "https://OOKc0UfswqvgRp0@rwth-aachen.sciebo.de/public.php/webdav/inl-csu/ssB_cosim_inl-csu_20170726_03-27-19.csv", - uri = "/villas/data/GenericCoSimExmp/inl-csu/ssB_cosim_inl-csu_20170726_03-27-19.csv" - eof = "rewind" - } - } - sig_1 = { - type = "signal", - - signal = "mixed", - values = 4, - rate = 50, - frequency = 0.5 - stddev = 0.2 - }, - ws_sig = { - type = "websocket", - vectorize = 10, - }, - ws_ssA = { - type = "websocket", - vectorize = 1, - }, - ws_ssB = { - type = "websocket", - vectorize = 1, - } -}; - -############ List of paths ############ - -paths = ( - { in = "sig_1", out = "ws_sig", hooks = ( { type = "stats" } ) }, - - { in = "file_ssA", out = "ws_ssA", hooks = ( { type = "decimate", ratio = 200 } ) }, - { in = "file_ssB", out = "ws_ssB", hooks = ( { type = "decimate", ratio = 200 } ) } -); diff --git a/etc/node/websocket-demo.conf b/etc/node/websocket-demo.conf deleted file mode 100644 index 11dbe01..0000000 --- a/etc/node/websocket-demo.conf +++ /dev/null @@ -1,60 +0,0 @@ -/** Example configuration file for VILLASnode. - * - * The syntax of this file is similar to JSON. - * A detailed description of the format can be found here: - * http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files - * - * @author Steffen Vogel - * @copyright 2017, Institute for Automation of Complex Power Systems, EONERC - * @license GNU General Public License (version 3) - * - * VILLASnode - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - *********************************************************************************/ - -nodes = { - sig_1 = { - type = "signal", - - signal = "mixed", - values = 4, - rate = 25 - }, - ws_1 = { - type = "websocket", - description = "Demo Channel", - vectorize = 10, - source = { - simulator = "OP5600", - location = "ACS lab" - }, - series = ( - { label = "Random walk", unit = "V" }, - { label = "Sine", unit = "A" }, - { label = "Rect", unit = "Var"}, - { label = "Ramp", unit = "°C" } - ) - } -}; - -############ List of paths ############ - -paths = ( - { - in = "sig_1", - out = "ws_1", - reverse = false - } -); diff --git a/etc/node/websocket.conf b/etc/node/websocket.conf deleted file mode 100644 index 3a16599..0000000 --- a/etc/node/websocket.conf +++ /dev/null @@ -1,57 +0,0 @@ -/** Example configuration file for VILLASnode. - * - * The syntax of this file is similar to JSON. - * A detailed description of the format can be found here: - * http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files - * - * @author Steffen Vogel - * @copyright 2017, Institute for Automation of Complex Power Systems, EONERC - * @license GNU General Public License (version 3) - * - * VILLASnode - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - *********************************************************************************/ - -nodes = { - ws_1 = { - type = "websocket", - description = "Demo Channel", - #vectorize = 10, - source = { - simulator = "OP5600", - location = "ACS lab" - }, - series = ( - { label = "Random walk", unit = "V" }, - { label = "Sine", unit = "A" }, - { label = "Rect", unit = "Var"}, - { label = "Ramp", unit = "°C" } - ) - }, - udp_1 = { - type = "socket", - layer = "udp", - - remote = "signal:12001" - local = "node:12000" - }, -}; - - -############ List of paths ############ - -paths = ( - { in = "udp_1", out = "ws_1", reverse = true } -); diff --git a/sample-data.sh b/sample-data.sh deleted file mode 100755 index b0e4aec..0000000 --- a/sample-data.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -DIR=$(basename $(pwd)) - -ACTION=${1:-import} -CONTAINER=${2:-${DIR}_database_1} -NETWORK=${4:-${DIR}_villas} -DATABASE=${3:-VILLAS} - -DOCKEROPTS="--interactive --tty --rm --network ${NETWORK} --volume $(pwd):/tmp" - -case ${ACTION} in - import) - docker run ${DOCKEROPTS} mongo:latest bash -c 'mongorestore --verbose --host '${CONTAINER}' --gzip --archive=/tmp/'${DATABASE}'.archive' - ;; - - save) - docker run ${DOCKEROPTS} mongo:latest bash -c 'mongodump --verbose --host '${CONTAINER}' --db '${DATABASE}' --gzip --archive=/tmp/'${DATABASE}'.archive' - ;; - - *) - echo "Usage: $0 (import|save) [MONGODB_CONTAINER [DATABASE [NETWORK]]]" - ;; -esac -