DB_CHECK
A tool for checking specifications requirements of a complex database infrastructure
Matteo Gazzurelli - Summer Student - IT-DB-DBB - CERN
Mariusz Piorkowski - Supervisor - IT-DB-DBB - CERN
martedì 14 agosto 12
© All Right Reserved
1
Introduction
✤
About myself
✤
About work at Cern
martedì 14 agosto 12
2
The problem:
✤
Why they need such a tool?
✤
Check if there are any misconfigurations in the existing
infrastructure
✤
Standardize DB VMs
✤
Keep informations up to date
martedì 14 agosto 12
3
The solution: Db_check
✤
Overview of the tool
Main
arguments
conventions.cfg
[SECTION]
key:value
✤
Centralized
✤
Extensible
(Micro Framework)
[name]_except.cfg
✤
Easy to learn
[name]_engine.py
✤
Practical
utility.py
List of values
logic.py
report.py
martedì 14 agosto 12
4
At the beginning
✤
Where it all started, first development:
✤
Written in Perl
✤
Less Modular
✤
Main is not generic
martedì 14 agosto 12
5
Why Python, why not Perl?
✤
Easy to learn
✤
✤
Important for occasional users
More readable code
✤
Improved code maintenance
martedì 14 agosto 12
6
How does it work - Main.py
✤
The router: main.py
✤
Arguments are required
✤
Need to provide an Entities_list
✤
--help
martedì 14 agosto 12
7
How does it work - Configurations
✤
conventions.cfg
✤
exception_[module].cfg
✤
Utility functions widely used in the tool
martedì 14 agosto 12
[SECTION]
Key = Value
Key = Value
...
#COMMENTS
[SECTION]
Key = Value
Key = Value
...
8
How does it work - Engines
✤
Gentlemen start your “engines”
✤
Three engines for now:
✤
✤
LDAP / SYSCTRL
✤
ORACLE
✤
SSH
Retrieve informations only
martedì 14 agosto 12
9
How does it work - Engine / 2
✤
Structure of an engine
constructor
function for
parse conventions
function for
begin tests
__init__
parse_config
begin_test
custom
functions ...
martedì 14 agosto 12
Required
Optional
10
How does it work - Logic
✤
logic.py
✤
Compare dictionaries
✤
Crosschecks
✤
Extensible
martedì 14 agosto 12
11
How does it work - Report
✤
report.py
✤
Email
✤
File
✤
Std output
martedì 14 agosto 12
12
The philosophy about make it
open-source
✤
Any advice or tips are welcome
✤
Looking for external contributors
✤
Abstraction of whole process
✤
SYSCTRL engine changed to open the project
martedì 14 agosto 12
13
Conclusion and future
developments
✤
Documentation available on TWiki page
✤
Deploy on a small scale infrastructure
✤
Use to create a template file for VMs before production
✤
Multithreading
martedì 14 agosto 12
14
Thank You
martedì 14 agosto 12
15
Scarica

DB_CHECK - Indico