Commit 66d3943f authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/integration-upm-services-develop' into 'develop'

Integrated L3 services UPM

See merge request teraflow-h2020/controller!29
parents f1cf9d5c 86444f3b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -20,4 +20,6 @@ include:
  - local: '/src/tester_functional/.gitlab-ci.yml'
  - local: '/src/automation/.gitlab-ci.yml'
  - local: '/src/policy/.gitlab-ci.yml'
  
  - local: '/src/l3_distributedattackdetector/.gitlab-ci.yml'
  - local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml'
  - local: '/src/l3_attackmitigator/.gitlab-ci.yml'
+49 −0
Original line number Diff line number Diff line
apiVersion: apps/v1
kind: Deployment
metadata:
  name: attackmitigatorservice
spec:
  selector:
    matchLabels:
      app: attackmitigatorservice
  template:
    metadata:
      labels:
        app: attackmitigatorservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: registry.gitlab.com/teraflow-h2020/controller/attackmitigator:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 10002
        env:
        - name: LOG_LEVEL
          value: "DEBUG"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10002"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10002"]
        resources:
          requests:
            cpu: 250m
            memory: 512Mi
          limits:
            cpu: 700m
            memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: attackmitigatorservice
spec:
  type: ClusterIP
  selector:
    app: attackmitigatorservice
  ports:
  - name: grpc
    port: 10002
    targetPort: 10002
+49 −0
Original line number Diff line number Diff line
apiVersion: apps/v1
kind: Deployment
metadata:
  name: centralizedattackdetectorservice
spec:
  selector:
    matchLabels:
      app: centralizedattackdetectorservice
  template:
    metadata:
      labels:
        app: centralizedattackdetectorservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: registry.gitlab.com/teraflow-h2020/controller/centralizedattackdetector:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 10001
        env:
        - name: LOG_LEVEL
          value: "DEBUG"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10001"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10001"]
        resources:
          requests:
            cpu: 250m
            memory: 512Mi
          limits:
            cpu: 700m
            memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: centralizedattackdetectorservice
spec:
  type: ClusterIP
  selector:
    app: centralizedattackdetectorservice
  ports:
  - name: grpc
    port: 10001
    targetPort: 10001
+49 −0
Original line number Diff line number Diff line
apiVersion: apps/v1
kind: Deployment
metadata:
  name: distributedattackdetectorservice
spec:
  selector:
    matchLabels:
      app: distributedattackdetectorservice
  template:
    metadata:
      labels:
        app: distributedattackdetectorservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: registry.gitlab.com/teraflow-h2020/controller/distributedattackdetector:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 10000
        env:
        - name: LOG_LEVEL
          value: "DEBUG"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10000"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10000"]
        resources:
          requests:
            cpu: 250m
            memory: 512Mi
          limits:
            cpu: 700m
            memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: distributedattackdetectorservice
spec:
  type: ClusterIP
  selector:
    app: distributedattackdetectorservice
  ports:
  - name: grpc
    port: 10000
    targetPort: 10000
+28 −0
Original line number Diff line number Diff line
syntax = "proto3";

service L3Attackmitigator{
  // Sends a greeting
  rpc SendOutput (Output) returns (EmptyMitigator) {}
  // Sends another greeting
  rpc GetMitigation (EmptyMitigator) returns (EmptyMitigator) {}
}


message EmptyMitigator {
	optional string message = 1;
}


message Output {
	float confidence = 1;
	string timestamp = 2;
	string ip_o = 3;	
	string tag_name = 4;
	int32 tag = 5;
	string flow_id = 6;
	string protocol = 7;
	string port_d = 8;
	optional string ml_id = 9;
	optional float time_start = 10;
	optional float time_end = 11;
}
Loading