Master- /Diplomstudium: Software Engineering - Internet Computing Master's Thesis Presentation Configuration Management with Libelektra Bernhard Denner Technische Universität Wien Faculty of Informatics Institute of Computer Languages Supervisor: Ao.Univ.-Prof.Dipl.-Ing. Dr.techn. Franz Puntigam Co-Supervisor: Univ.Ass.Dipl.-Ing. Dr.techn. Markus Raab Introduction and Motivation Configuration Management (CM) Tools - Automatic and reproducible management of computer systems - Desired system state defined by code Configuration Files - Plain text - Different formats: INI, XML, JSON, custom Approach Results ERB KDB 500 1000 1500 2000 2500 3000 3500 RQ: How does our approach perform against existing Puppet file modification concepts? Case Study: - Is our solution ready for real-world scenarios? User Study: - Does our solution increase the usabiltiy and maintainability? - Intra-subject SW-experiment - 4 Puppet programming tasks in up to 3 variants - Measure task duration times - Subjective impressions of participants (voting from 1 - 5) Combine Puppet + Libelektra - Puppet as frontend to express needs - Libelektra as backend to modify configuration files Puppet extension puppet-libelektra - Treat configuration settings as first class citizen - One language construct to define configuration settings for different configuration file formats - Brings all features of Libelektra to Puppet puppet-libelektra extends Puppet DSL by two new types: - kdbkey defines a single configuration setting, with optional metadata (validation properties...) - kdbmount describes how Libelektra should integrate a configuration file, if not already done by the application Problem - How to handle configuration file changes in a uniform way? - Abstraction for configuration settings? - Syntax and semantic awareness? Libelektra: configuration framework - Configuration settings as key-value pairs - Hierarchical shared key space - Plugin architecture, extensible kdbmount { 'system/sw/myapp': file => '/etc/myapp/config.ini', plugins => ['ini', 'range', 'enum'] } kdbkey { 'system/sw/myapp/instances': ensure => present, value => ${instance_count}, comments => 'configures the number ...', check => { 'range' => '1-10' } } Methods Kontakt: [email protected], [email protected], https://libelektra.org Case Study puppet-libelektra was used to manage a continuous integration and Web-hosting system User Study SW-experiment with 14 subjects, all students without Puppet experience - significant shorter development times for creating or updating configuration files compared to other general purpose strategies - almost at the same level with format specific strategies - no productivity improvement in code maintenance general purpose strategies KDB ERB AUG ... puppet-libelektra ... Ruby ERB template engine ... Augeas format specific: HOST INI ... edit /etc/hosts files ... edit INI files ERB HOST INI AUG KDB 1 2 3 4 5 Create new configuration files from scratch Maintenance of existing Puppet code Subjective Usability Ratings Task duration time (seconds) Usability rating: 1 (very good) ... 5 (very bad) ERB KDB 1000 2000 3000 4000 Update configuration files HOST/INI AUG KDB 1000 2000 3000 4000 Backend System Main System Apache Web Server libelektra.org webpage sub-domain redirects Jenkins reverse proxy Jenkins Build Server Docker Build slaves Build slaves Build Slave Build System Build slaves Build System Build slaves Build System Build Slave Snippet-sharing REST Backend Build Slave Puppet Agent Module puppet-libelektra libelektra-core system/sw/myapp system/network/hosts hosts ini /etc/myapp/config.ini [general] instances = 5 domain = example.com [logging] log_level = info /etc/hosts 127.0.0.1 localhost 192.168.1.3 bbnode1 node1 192.168.1.4 bbnode2 node2 192.168.1.10 bbclient1 client1 Puppet - Open source CM-tool - Declariative domain specific language (DSL) - Modify configuration files in different ways CM-Tool Agent CM-Tool Agent CM-Tool Agent package { 'firefox': ensure => installed } file { '/etc/resolv.conf': ensure => file, content => "search ${domain}" } abstraction high low enforce