joseadp / tma-planning

Planning component validates the rules to decide on creating a plan for adaptation or not.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository is DEPRECATED! The development continues in the ATMOSPHERE project

TMA Planning

This project aims to:

  • Consume the items from a topic queue;
  • Check if the scores from the queue are in the proper threshold;
  • Add a action item to a queue when an adaption is needed.

Prerequisites

This component requires the software available in tma-utils.

Installation

This is a simple module to validate the score of the metrics from Kubernetes.

To build the jar, you should run the following command on the worker node:

sh build.sh

The planning will consume the items from the topic topic-planning, and it will add new topics to topic-execute. To create the topic, you should run on the master node:

kubectl exec -ti kafka-0 -- kafka-topics.sh --create --topic topic-execute --zookeeper zk-0.zk-hs.default.svc.cluster.local:2181 --partitions 1 --replication-factor 1

To deploy the pod in the cluster, you should run the following command on the master node:

kubectl create -f tma-planning.yaml

You can also check the items on topic. In order to do that, you should connect to the Kafka pod and execute the consumer:

kubectl exec -ti kafka-0 -- bash
kafka-console-consumer.sh --topic topic-execute --bootstrap-server localhost:9093

About

Planning component validates the rules to decide on creating a plan for adaptation or not.


Languages

Language:Java 94.7%Language:Dockerfile 4.9%Language:Shell 0.3%