1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

moved all configuration / deployment configs to Demo repo

This commit is contained in:
Steffen Vogel 2017-08-03 17:28:34 +02:00
parent 8abd8feb92
commit b626c65dd3
11 changed files with 0 additions and 415 deletions

4
.gitmodules vendored
View file

@ -1,4 +0,0 @@
[submodule "backend"]
path = backend
url = ../VILLASweb-backend.git
branch = develop

View file

@ -1,3 +0,0 @@
FROM nginx:stable-alpine
COPY etc/nginx/villas.conf /etc/nginx/conf.d/default.conf

View file

@ -1,3 +0,0 @@
FROM villas/node:latest
COPY etc/node/*.conf /etc/villas/node/

Binary file not shown.

View file

@ -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/

View file

@ -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"

View file

@ -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;
}
}

View file

@ -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 <stvogel@eonerc.rwth-aachen.de>
* @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 <http://www.gnu.org/licenses/>.
*********************************************************************************/
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 } ) }
);

View file

@ -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 <stvogel@eonerc.rwth-aachen.de>
* @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 <http://www.gnu.org/licenses/>.
*********************************************************************************/
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
}
);

View file

@ -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 <stvogel@eonerc.rwth-aachen.de>
* @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 <http://www.gnu.org/licenses/>.
*********************************************************************************/
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 }
);

View file

@ -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