ska-telescope / tmc-prototype

The repository for TMC evolutionary prototype.
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Documentation Status

TABLE OF CONTENTS

1 Introduction

This is the repository for the TMC evolutionary prototype. Ska-tmc-sdpleafnodes aims to realize TMC SdpLeafNodes Monitoring and Control functionality, and utilizes the platform, tools and technology specified for the SKA construction.

The ska-tmc-sdpleafnodes utilizes the base classes created in-line with the SKA Control System Guidelines and Tango coding standards. Developed in Python 3.7 (PyTango 9.3.3), it is a single repository which releases a single package called ska-tmc-sdpleafnodes. ska-tmc-sdpleafnodes contains two sub packages - SdpMasterLeafNode and SdpSubarrayLeafNode. CentralNode device is implementated in a separate gitlab repository which is available at https://gitlab.com/ska-telescope/ska-tmc-centralnode . SubarrayNode device is implemented in a separate gitlab repository which is available at https://gitlab.com/ska-telescope/ska-tmc-subarraynode . SKA-TMC-SDPLEAFNODES addresses the following architectural aspects and functionality:

1.1 Architecture

1.2 TMC Functionality

NOTE: Refer to the Demo link provided in the Documentation section for more details.

2 Prerequisites

3 Installing, configuring and running the ska-tmc-sdpleafnodes

3.1 Installing dependencies

Since the SKA-TMC-SDPLEAFNODES is developed using LMC Base and SKA-TMC_Common classes, we need to install them prior to running ska-tmc-sdpleafnodes.

Use following commmand to install all necessary dependencies on your virtual environment: poetry install

4 Testing

4.1 Unit Testing

As depicted above, the higher level of TMC SDP leaf nodes are dependent on lower level devices in normal operation. However for better testability, the unit testing is carried out by mocking the dependent devices. This enables us to test each of the nodes independently without setting up the entire hierarchy of control nodes. In order to execute the entire suit of test cases in the repository, a command in makefile is implemented. \ The command to run the unit tests in python virtual environment is: make python-test \

4.2 Integration Testing

Note: This section will soon be updated.

Integration Testing is performed on SKA Integration on K8S environment. For this testing TMC-SDPLEAFNODES image is required to build locally or need to be available on Nexus repository. All the Dependent Nodes are mocked in our kubernetes cluster, while integration testing. The command to run the Integration tests is: make k8s-test \

4.3 Manual Testing

The SKA-TMC-SDPLEAFNODES can be deployed in the development environment. The TMC-SDPLEAFNODES needs to be deployed in kubernetes environment. The deployment consists of real TMC SDP leaf nodes and mocked dependent nodes(SDP).

4.3.1 System Requirements

Following are the system requirements to deploy the TMC-SDPLEAFNODES:

Requirement Minimum Recommended
CPU cores 4 8
RAM 8 GB 16 GB
Storage 64 GB 100 GB

4.3.2 Deploying TMC

This section is TBD: Deploy the TMC-SDPLEAFNODES using make k8s-install-chart command. The make k8s-watch command can be used to monitor the pods to ensure all required pods are up and running.

4.3.3 Deleting the deployment and clean up

The command make k8s-uninstall-chart deletes the deployment from kubernetes cluster. The command make k8s-clean performs cleanup like deleting the kubernetes namespace. This is optional.

5 Formatting & Linting

Pylint, code analysis tool used for the linting in the SKA-TMC-SDPLEAFNODES. Configuration for linting is provided in .pylintrc file. For the code analysis of entire TMC-SDPLEAFNODES, a command in the makefile is implemented.

The command used for formatting is: make python-format

The command used for linting is: make python-lint

After completion of linting job, linting.xml file is generated, which is used in generation of lint errors, lint failures and lint tests gitlab badges.

6 Documentation