Commit 3c7bf5b1 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Try to add monitoring

parent e03fe094
......@@ -2,144 +2,138 @@ version: '3'
services:
graphite:
restart: always
image: vladwing/graphite
volumes:
- graphite_data:/opt/graphite/storage
environment:
- VIRTUAL_HOST=graphite.beia.switch
networks:
- web
- graphite
deploy:
labels:
- "traefik.backend=graphite"
- "traefik.frontend.rule=Host:graphite.beia.switch"
- "traefik.port=80"
grafana:
restart: always
image: grafana/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-secret}
- VIRTUAL_HOST=grafana.beia.switch
volumes:
- grafana_data:/var/lib/grafana
depends_on:
- graphite
networks:
- web
#monitoring_server:
#image: salmant/ul_monitoring_server_container_image
#ports:
#- "8080:8080"
#- "4242:4242"
#- "4245:4245"
#- "7199:7199"
#- "7000:7000"
#- "7001:7001"
#- "9160:9160"
#- "9042:9042"
#- "8012:8012"
#- "61621:61621"
#environment:
#- MONITORING_SERVER=monitoring_server
#- VIRTUAL_HOST=jcatascopia.beia.switch
#- VIRTUAL_PORT=8080
#networks:
#- asap
#- web
deploy:
labels:
- "traefik.backend=grafana"
- "traefik.frontend.rule=Host:grafana.beia.switch"
- "traefik.port=3000"
monitoring_server:
image: salmant/ul_monitoring_server_container_image
environment:
- MONITORING_SERVER=monitoring_server
networks:
- web
deploy:
labels:
- "traefik.backend=monitoring_server"
- "traefik.frontend.rule=Host:jcatascopia.beia.switch"
- "traefik.port=8080"
monitoring_adapter:
restart: always
image: beia/monitoring_adapter
environment:
- GRAPHITE_SERVER=graphite
- MONITORING_PREFIX=eu.beia.switch
- MONITORING_SERVER=${MONITORING_SERVER:-194.249.1.175}
- MONITORING_SERVER=monitoring_server
- LOGGING_LEVEL=${LOGGING_LEVEL:-info}
depends_on:
- graphite
#- monitoring_server
- monitoring_server
networks:
- graphite
- data
- asap
- web
data_collector:
image: beia/data_collector
environment:
# - CONFIG=config
- STATSD_HOST=monitoring_adapter
depends_on:
# - config
- monitoring_adapter
networks:
# - config
- data
- web
alerter:
image: beia/alerter
environment:
# - CONFIG=config
- STATSD_HOST=monitoring_adapter
- VIRTUAL_HOST=alerter.beia.switch
- NOTIFICATION_SERVICE=notify
depends_on:
- notify
# - config
networks:
# - config
- web
- data
# config:
# image: beia/config_manager
# environment:
# - TOSCA_URL=${TOSCA_URL:-http://www.google.com}
# networks:
# - config
deploy:
labels:
- "traefik.backend=alerter"
- "traefik.frontend.rule=Host:alerter.beia.switch"
- "traefik.port=80"
web:
image: jwilder/nginx-proxy
image: traefik
command: --web --docker.swarmmode --docker.watch --logLevel=INFO
ports:
- "80:80/tcp"
- "80:80"
- "8081:8080"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- /var/run/docker.sock:/var/run/docker.sock
deploy:
placement:
constraints: [node.role == manager]
networks:
- web
notify_asterisk:
# TODO: Add shared storage/volume for sounds
restart: always
image: dorinelfilip/ast13
environment:
# TODO: Add shared storage/volume for sounds
image: beia/asterisk
environment:
- SIP_USERNAME=55025
- SIP_HOST=sip.clickphone.ro
- SIP_PORT=${SIP_PORT:-26999}
- SIP_SECRET=beiaSWITCH
- SIP_EXTENSION=0310050728
- SIP_PEERNAME=clickphone
- ARI_USERNAME=${ARI_USERNAME:-admin}
- ARI_SECRET=${ARI_SECRET:-changeme}
networks:
- notify_asterisk
- SIP_HOST=sip.clickphone.ro
- SIP_PORT=${SIP_PORT:-26999}
- SIP_SECRET=beiaSWITCH
- SIP_EXTENSION=0310050728
- SIP_PEERNAME=clickphone
- ARI_USERNAME=${ARI_USERNAME:-admin}
- ARI_SECRET=${ARI_SECRET:-changeme}
deploy:
labels:
- "traefik.docker.network=beia_web"
networks:
- web
notify:
restart: always
image: dorinelfilip/notify
depends_on:
- notify_asterisk
- notify_redis
networks:
- notify_asterisk
- notify_redis
- notify
- asap
environment:
- ARI_URL=${ARI_URL:-http://notify_asterisk:8088}
- ARI_USERNAME=${ARI_USERNAME:-admin}
# Warning! Different ENV variable for notify & Asterisk
# TODO: Change
- ARI_PASSWORD=${ARI_SECRET:-changeme}
- REDIS_HOST=${REDIS_HOST:-notify_redis}
- REDIS_PORT=${REDIS_PORT:-6379}
- REDIS_PASSWORD=${REDIS_PASSWORD:-changeme}
- DEFAULT_SIP=${DEFAULT_SIP:-${SIP_PEERNAME}}
ports:
- "8001:80/tcp"
image: beia/notify
depends_on:
- notify_asterisk
- notify_redis
networks:
- web
# - data
# - sip
# - asap
environment:
- ARI_URL=${ARI_URL:-http://notify_asterisk:8088}
- ARI_USERNAME=${ARI_USERNAME:-admin}
# Warning! Different ENV variable for notify & Asterisk
# TODO: Change
- ARI_PASSWORD=${ARI_SECRET:-changeme}
- REDIS_HOST=${REDIS_HOST:-notify_redis}
- REDIS_PORT=${REDIS_PORT:-6379}
- REDIS_PASSWORD=${REDIS_PASSWORD:-changeme}
- DEFAULT_SIP=${DEFAULT_SIP:-${SIP_PEERNAME}}
deploy:
labels:
- "traefik.backend=notify"
- "traefik.frontend.rule=Host:notify.beia.switch"
- "traefik.port=80"
notify_redis:
restart: always
image: redis:alpine
networks:
- web
entrypoint:
- redis-server
- "--requirepass"
......@@ -147,20 +141,14 @@ services:
# of the container image is needed
- ${REDIS_PASSWORD:-changeme}
networks:
- notify_redis
- web
volumes:
- redis_data:/data
networks:
notify_redis:
notify_asterisk:
notify:
data:
web:
graphite:
asap:
volumes:
graphite_data:
grafana_data:
redis_data:
graphite_data:
grafana_data:
redis_data:
networks:
web:
......@@ -154,6 +154,11 @@
<artifactId>wadl-client-plugin</artifactId>
<version>1.1.6</version>
</dependency>
<!-- <dependency>
<groupId>net.bull.javamelody</groupId>
<artifactId>javamelody-core</artifactId>
<version>1.71.0</version>
</dependency> -->
</dependencies>
......@@ -208,7 +213,7 @@
</plugin>
<!-- <plugin>
<!-- <plugin>
<groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-maven-plugin</artifactId>
<version>2.9.1</version>
......
......@@ -61,6 +61,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.authorizeRequests()
.antMatchers("/manager/*").hasRole("ADMIN")
.and()
.authorizeRequests()
.antMatchers("/monitoring/*").hasRole("ADMIN")
.and()
.formLogin()
.and()
.httpBasic()
......
......@@ -35,7 +35,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.service.PlannerService;
import nl.uva.sne.drip.api.service.ToscaService;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse;
import org.springframework.stereotype.Controller;
......@@ -54,6 +53,7 @@ import org.springframework.web.bind.annotation.RequestParam;
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
//@MonitoredWithSpring
public class PlannerController {
@Autowired
......
#! /bin/bash
killall apt
rm /var/lib/dpkg/lock
dpkg --configure -a
apt-get update
apt-get -y upgrade
apt-get -y install software-properties-common python openssh-server sudo
......
......@@ -637,8 +637,8 @@ public class Consumer extends DefaultConsumer {
paramValue += sub.userName + " ";
// paramValue += tempInputDirPath + File.separator + sub.subTopology.accessKeyPair.SSHKeyPairId + File.separator + "id_rsa";
paramValue += vm.role + "\n";
}
//else if (vm == null || !sub.status.equals("running")) {
}
// else if (vm == null || !sub.status.equals("running")) {
// throw new Exception("A VM failed to start. Deleteing all topology");
// }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment