Robot Introduction

Introduction

  • Robot is the Regional Cloud Virtual Infrastructure Component of the CloudCIX platform.

  • Robot is a stateless application developed in Python.

  • Robot is the name given to (all) the software running on the Region Appliance.

  • Robot is arguably the most important piece of software in the CloudCIX platform because it is responsible for building all of the customer requested infrastructure.

  • If you think of CloudCIX as a declarative system where a User defines their infrastructure requirements, then the function of Robot is to instantiate the required infrastructure to match the users declared requirements. Robot creates, updates, and deletes Virtual Infrastructure(VI).

  • Robot is connected to CloudCIX Management network to communicate with all the Physical Infrastructure (PI) in the Region.

../_images/RobotLayers.png

Architecture

Overview

Robot is a comprehensive software system designed to facilitate the creation and management of virtual infrastructure in cloud environments. It operates through a layered architecture, consisting of four distinct layers, each serving a specific purpose in the resource provisioning process.

Layers

  1. Core Layer
    • Responsible for orchestrating the resource provisioning process.

    • Manages multiple resources at a time with help of Celery.

  2. Driver Layer
    • Comprised of individual Python packages, each catering to different resource instantiating requirements.

    • Manages resource states (eg requested, building, running, unresourced).

    • Implements locking mechanisms to prevent simultaneous use of physical infrastructure by multiple resources.

  3. Primitives Layer
    • Abstracts hardware-related information using a Region’s config.json file.

    • Defines bash scripts that execute resource instantiating actions on physical infrastructure.

    • Executes tasks via dedicated and unique scripts called primitives, each serving a specific purpose for a particular resource.

  4. RCC (Reliable Communication Connection) Layer
    • Serves as an interface between the Primitives layer and the Physical Infrastructure.

    • Facilitates reliable communication and transmission of bash scripts from primitives to the physical infrastructure.

Each layer plays a vital role in the overall functionality of Robot, contributing to the seamless creation and management of virtual resources in a Region.

Robot Deployment Architecture

Overview

The Robot system is deployed on a single machine using distinct Docker containers, each serving a specific function within the system’s architecture. These containers collectively facilitate the operation and management of Robots functionalities.

  • core

  • worker

  • rabbitmq

  • pgsqllocks

  • flower

  • jaeger

The docker-compose file that defines the containers and networking can be found on GitHub

Docker Container Details

  1. core
    • Executes the mainloop.py script which is continuously sending requests to the CloudCIX IaaS (Infrastructure as a Service) API to identify resources for provisioning.

    • Responsible for sending each resource in the mainloop response to the Celery queue, managed by the broker RabbitMQ via its dispatcher.

  2. worker
    • Hosts and manages the Celery task queuing system.

    • Responsible for handling and ochestrating task instances for resource provisioning by recieving tasks from RabbitMQ. The message of the task e.g. virtual_router.build, informs the worker which driver and function it is to call.

  3. rabbitmq
    • Operates as a message queuing system to store tasks sent by the core and collected by the workers.

    • Facilitates seamless communication and task distribution within the system.

  4. pgsqllocks - Postgres Database which manages the locking mechanism of infrastructure in a Region.

  5. flower
    • Serves as a GUI (Graphical User Interface) for RabbitMQ.

    • Provides a visual representation and management interface for RabbitMQ functionalities.

  6. jaeger
    • Dedicated to transferring span or time trace information to PAT.

Other than these Robot also,
  • Sends email notifications of request status to the users and developers in case of failures.

  • Supports Logstash from the ELK stack for logging activity.

The deployment architecture utilizes these containers to create an efficient and scalable environment for Robot operations. Each container fulfills a specific role in the system, contributing to its overall functionality and performance.

PAT Support

Logstash

  • Robot has logging capabilitie to send logs to its COPs ELK stack instance monitored by the PAT.

  • The “LOGSTASH_URL” is a field in settings file which is supplied to Robot by the environment variable file created during the POD installation.

  • Sending logs is an optional service in Robot.

InfluxDB

  • Robot sends the traces of the duration of certain steps in services that can take significant time to its COPs InfluxDB instance monitored by the PAT via its jaeger container.

  • Using the Jaeger UI the PAT can visualize the actual time duration of certain steps which can be used in analysis of Robots performance.