Home
by Mariano Montone
Contents
1. This option is set to its default value Database server Web server Authentication gt General preferences Logging Save Restore E Section saved Configurations can be loaded and saved They are serialized in XML format The default filename is acme config but it can be changed if desired Configuration options editing happens on the right panel of the configurations navigator A specific option editor is offered for each type of option and each option documentation is displayed too When trying to save a configuration section it is ensured that required options options declared with required enabled in the configuration schema are filled Options that are not currently set have their default value if any Also options can be set and unset Setting a configuration option means setting the configuration option in the cur rent configuration to the value being shown in the option editor Unsetting a configuration option means removing the option value setting from the current configuration Chapter 6 Examples 14 6 Examples Schemas definitions lt schemas gt lt schema name Web gt lt documentation gt lt documentation gt lt section name Web server gt lt documentation gt lt documentation gt lt option name Host gt lt documentation gt Server host lt documentation gt lt type name String gt lt required gt True lt required gt lt default gt http localhost
2. setup py install That installs acme the acme binary on usr local bin After that you can run acme typing acme at the shell 1 3 Feedback Mail marianomontone at gmail dot com with feedback 1 4 Conventions Hear are some coding conventions we d like to follow e We do believe in documentation Document your variables functions macros and classes Besides provide a documentation from a wider perspective Provide diagrams and arquitecture documentation examples and tutorials too Consider using an auto matic documentation generator see the bitacora package in the dependencies e We don t want functions to be shorter than the should nor longer than they should There is no every function should have at most ten lines of code rule We think that coding is like literature to a great extent So you should strive for beauty and clarity Chapter 2 Overview 2 2 Overview Acme is an Application Configuration ManagEr It is written in Python and provides a Tk GUI at the moment The idea is to define configuration schemas and get a proper way of e Sharing and versioning your project s configuration schemas but not your configura tions That way you avoid overwriting configurations from different developers Each developer has his own configurations that need to match the configuration schemas in the project Whenever a project s configuration schema changes each developer is reponsible of updating his configurations to match the
3. value 6ed9d9 gt j lt configuration gt lt configurations gt 6 1 Use cases 6 1 1 Debugging 6 1 2 Logging 6 1 3 Testing 6 1 4 Deployment Chapter 7 Frontend 7 Frontend Configurations can be edited from a Tk interface 17 Chapter 8 Custom option types 8 Custom option types How to define custom option types 18 Chapter 9 Language bindings 19 9 Language bindings There are language bindings implemented for Python PHP and Common Lisp for the moment Bindings can be found in the bindings directory For how they are used look at the tests in the corresponding directory In general bindings ivoke acme from the command line using JSON for communication Chapter 10 System reference 10 System reference 20 Chapter 11 References 11 References 21 Chapter 12 Index 12 Index 12 1 Concept Index A bectemerewevetkentpewerereteQeve configuration schema esse eee eee CONVENTIONS maraca raras D ele EE dependency ausser deployment 21 NM ENEE EES ELE seas ieee F feedback seio ne filename london p sews Een I installation s ociisccrteriisicriisaniieniriiaris introduction oie serco esiin odoro eese 12 2 Class Index Index is nonexistent 12 3 Function Index Index is nonexistent 12 4 Variable Index Index is nonexistent 22 L steuer 12 l gging i stpRES ee u 16 N DUIDber cuoc ipse nee DE da dul OPLION a air 9 option types 141 EU A
4. ie 2 EE 21 at ET 3 SOCHION crecio oo 8 inem D SUMMALY EE 1 T COST un i kaad LEERE ERES aaa 16 inge PP 12
5. inspect config INSPECT_CONFIG g GET get GET set SET config CONFIG Inspect a configuration A CSV Comma separated values list with lt option path gt lt value gt lt option type gt lt origin gt Get an option value Set an option value Edit a specific configuration validation VALIDATION validate VALIDATE validate all json setup debug DEBUG Enable or disable configurations validation Validate a configuration Pass the configuration name Validate all configurations Use JSON for communication Edit configuration schemas Run in debug mode Provide the debugging level one off DEBUG or INFO Chapter 4 Configuration schemas 7 4 Configuration schemas Configuration schemas define the configurations structure They have a name a list of parents and a list of sections with options definitions New configuration schema ee Name My application schema Parents Web Log Database App Remove Documentation My application configuration schemd Ses Configuration schemas can be composed by inheriting from multiple parents Configura tion sections from the parents appear in the child configuration schema For instance a full stack web framework configuration schema could inherit from a generic Web schema for web server configuration and another Database schema for database connection configuration Chapter 4 Configuration schemas 8 Configuration schemas have se
6. lt default gt lt option gt lt option name Port gt lt documentation gt Port number lt documentation gt lt type name Number gt lt required gt True lt required gt lt default gt 8080 lt default gt lt option gt lt section gt lt section name Authentication gt lt documentation gt lt documentation gt lt option name Authentication enabled gt lt documentation gt Enable authentication lt documentation gt lt type name Boolean gt lt required gt False lt required gt lt option gt lt section gt lt section name General preferences gt lt documentation gt lt documentation gt lt option name Font size gt lt documentation gt Font size lt documentation gt lt type name Number gt lt required gt True lt required gt lt option gt lt section name Colors gt lt documentation gt lt documentation gt lt option name Background color gt lt documentation gt Background color lt documentation gt lt type name Color gt lt required gt True lt required gt lt option gt lt section gt lt section gt lt schema gt lt schema name App gt Chapter 6 Examples 15 lt documentation gt lt documentation gt lt parent name Database gt lt parent name Web gt lt parent name Log gt lt schema gt lt schema name Log gt lt documentation gt lt documentation gt lt section name Logging gt lt documentation gt lt documentation gt lt optio
7. new schemas e Being able to define configuration schemas from the GUI with no need for programming for most cases e Provide configurations documentation and validation e Edit configurations from a GUI e Define your own option configurations types and provide validation for them Chapter 3 Running 3 3 Running 3 1 Running overview Acme is run invoking acme command from the command line By default it runs in normal mode that means it opens a GUI for adding removing and editing configurations A configurations schemas files is required By default Acme looks for acme schema in the current directory It shows and errors if it can not find it A different file or location can be specified through the schemas SCHEMAS option If the schemas file is found then it is parsed and loaded The schemas file is in XML format Apart from that Acme maintains configurations in another file which by default is acme config It can be specified to be something else through the configs CONFIGS option 3 2 Running modes Acme can be run in three different modes fundamentally e Normal mode this mode is invoked running acme with no special arguments from the command line apart from the schema and configs arguments In this mode the standard configuration navigation UI is opened This UI si meant for end users The user can create remove and edit his configurations from here He doesn t need to know how to build a configuration sc
8. Acme A configuration management utility User manual Release 0 1 by Mariano Montone Table of Contents 1 e o sense ea bd uo 1 ll SUMMA tr a deed 1 1 2 Installation sun seta ee eek il E Heed back ui meer E EE GU Der Re E RN X eere pans 1 1 4 Conventions mu a il 2 Eenegung ENEE NEE e NS adu 2 SE 3 3 1 Running overview 0 cc cece ccc Inh 3 3 2 Running modes nro ea nenn 3 3 3 Command line summary 0000 cece eee eee eens 5 4 Configuration schemas saauaaana snaa T 4 1 Schema sections 8 4 2 Schema options 000 rer kincaid iiics nn 9 4 2 1 Options dependencies oocccoocccccnncnccnn eee eee ees 10 4 8 Built in option epes dl 4 3 1 oe ee A dad 11 43 2 Numb cc a a x baled es 11 4 8 8 Boolean 0 c ccc ccc inni nen e dl SE WT ae aan did 12 EE GENEE 12 4 3 6 Filename 0c ccc cece cee eee nnnnes 12 43 6 CHOICE ki nesepi ua baad EE EE EE E 12 E cr Ds qe Nee da aha 12 5 Configurations sss sess 13 6 Examples seccinvidamasor rr ad C doce 14 6 1 se Cases a ana a Ba 16 6 1 1 Debugging essen E eee eee pis 16 GE MOPPING sse ae dared ale bales 16 6 1 3 E KE TEE 16 6 14 Deployment sense es pen 16 7T Kronen ida era 17 8 Custom option types 18 9 Language bindings 19 10 System reference 0 cece eee eee 20 11 References 21 12 TEEN 22 12 1 Concept
9. Indeks 0 cece nen 22 12 2 Class Index ci 8 82282 Slaw ge eed idu ARS 22 12 3 Function India ks 22 12 4 Variable Index 0 22 0000 hr Re nn 22 This manual is for Acme version 0 1 Copyright c 2013 Mariano Montone Permission is granted to copy distribute and or modify this document under the terms of the GNU Free Documentation License Version 1 3 or any later version published by the Free Software Foundation with no Invariant Sections with the Front Cover texts being A GNU Manual and with the Back Cover Texts as in a below A copy of the license is included in the section entitled GNU Free Documentation License a The FSF s Back Cover Text is You have the freedom to copy and modify this GNU manual Buying copies from the FSF supports it in developing GNU and promoting software freedom This document is part of a collection distributed under the GNU Free Docu mentation License If you want to distribute this document separately from the collection you can do so by adding a copy of the license to the document as described in section 6 of the license Chapter 1 Introduction 1 1 Introduction Acme is an Application Configuration ManagEr You can get a copy and this manual at http mmontone github io acme 1 1 Summary Acme is an Application Configuration ManagEr 1 2 Installation Download Acme or clone the git repository from https github com mmontone acme Then run sudo sudo python
10. SQL To specify that we can use the following dependencies ex pression Database Engine MySQL This way the Storage engine option will only be editable when the Database Engine is set to MySQL Chapter 4 Configuration schemas Dependency expressions can be added in the schema option editing screen 11 Schemas Help Quit Schemas configurator gt Web b App gt Log Database Database server Engine Storage engine A Storage engine option Name Storage engine Type Choice MyISAM Remove InnoDB InnoDB Add Default value Is required lv MySQL storage engine Documentation r Dependencies Database Database server Engine MySQL TE EZ 4 3 Built in option types 4 3 1 String The String option type ensures that the the option value is of type string 4 3 2 Number The Number option type ensures that the the option value is of type Number 4 3 3 Boolean The boolean option type ensures that the the option value is of type boolean True or False Chapter 4 Configuration schemas 12 4 3 4 Email The email option type ensures that the the option value is a valid email string 4 3 5 Url The url option ensures that the the option value is a valid url 4 3 6 Filename The pathaname option type ensures that the the option value is a valid pathname and the file or directory exists 4 3 7 Choice The C
11. ctions each containing other sections and schema options The schemas sections and options can be manipulated in the tree appearing on the left of the configuration schemas navigator r Schemas configurator Schemas Help Quit ir Database configuration schema Web gt Web server gt Authentication App gt General preferences Log App 9 Log gt Logging Database Name Database Parents Web Database server engine Documentation 4 1 Schema sections Each configuration schema section has a name a documentation subsections and a list of option schemas Sections subsections and sections options can all be added and removed from the tree widget on the left of the schemas navigator Chapter 4 Configuration schemas 9 4 2 Schema options Options in schemas have a name and a type Schemas configurator xXx Schemas Help Quit Engine option Web gt Web server Name Engine P Authentication Type Choice gt General preferences Postgresql pum App Mysql x Log gt Logging Add Database Database server Is required lv The database engine Documentation J DS The type of option determines the possible values that can be assigned to it in configura tions The option type can be String Number Boolean Email URI Filename Directory Color Tim
12. erver host Documentation Save Restore Remove e Full mode this mode is invoked running acme with the full option from the command line In this mode both the configurations navigator and the configurations schemas navigator are available in two different tabs Chapter 3 Running This is an example of Acme running in full mode Configurations Schemas Help Configurator Quit Dev Test Prod Configurations Configuration schemas Dev configuration Schema App r Database server engine required Postgresql The database engine Mysql Web server Authentication gt General preferences Logging Save Restore 3 3 Command line gt acme h summary usage acme h f s SCHEMAS c CONFIGS 1 i INSPECT CONFIG Le GET set SET config CONFIG validation VALIDATION validate VALIDATE validate all json setup debug DEBUG Acme Application Configuration ManagEr optional arguments h help f full s SCHEMAS schemas c CONFIGS configs show this help message and exit Run the full acme both configurations and schemas navigation SCHEMAS The configuration schemas files Default is acme schema CONFIGS The configurations file Default is acme config Chapter 3 Running 1 list configs List configurations i INSPECT_CONFIG
13. ezone Language Country Currency Date Time Datetime etc Some of them will be described later When editing configurations each option is edited with its corre Chapter 4 Configuration schemas 10 sponding editor depending on the type of option For instance options of type Date are edited using a calendar Expire required lt lt lt December 2013 gt gt gt pan 16 17 18 19 20 21 22 23 24 25 26 SE 28 29 30 31 0 o zo Apart from name and type schema options specify if it required for the option to be assigned a value in the configuration Also they can have a default value in case the user doesn t assign one in the configuration They also have a documentation string This is very important for the end user to know the option meaning 4 2 1 Options dependencies It often happens that some options only make sense when some others are set to certain values For instance if we are configuring a database then specific database engine options should only be available when the the specific engine is selected Or a list of options make sense only when a boolean option is enabled Acme has support for that by attaching a dependencies expression to an option schema The dependency expression is written in a very simple domain specific language They are basically boolean expressions with options being referenced Example MySQL supports two storage engines MyISAM and InnoDB but this option only makes sense for My
14. hema although that is not difficult at all as we will see Apart from that when editing the configuration the user gets a hopefully decent UI with custom option editors depending on the type of options and validation This is an example of Acme running in normal mode Configurator Configurations Help Quit Dev E Test Dev configuration Prod Schema App be server Host http localhost Server host This option is set to its default value Port 8080 Port number m This option is set to its default value Database server Web server Authentication P General preferences Logging Save Restore Section saved Chapter 3 Running 4 e Setup mode this mode is invoked running acme with the setup option from the command line In this mode the configuration schemas navigator UI is opened The developer can create remove and edit configuration schemas from here Configuration schemas are descriptions of how configurations should be with nested sections and different type of options He can build the application specific configuration schemas from here This is an example of Acme running in setup mode Schemas configurator TOM Schemas Help Quit Host option 7 Web Name Host Web server Type String Port Default value M Authentication http localhost Authentication enabled Is required v b General preferences App P Log gt Database S
15. hoice option type ensures that the option value is one of the options listed 4 3 8 List The List option type ensures that the option value is a subset of the options listed Chapter 5 Configurations 13 5 Configurations Configurations are instances of Configuration schemas much like objects are instances of classes in object oriented programming languages That is configurations structure is determined by the configuration schema they belong to In particular their sections are that of their configuration schemas and their options values depend on the option schemas defined in the configruration schemas Configurations belong to one and only one configuration schema and that s compulsory as it can be expected Besides configurations can inherit from each other a configura tion can inherit from another configuration and overwrite its parent options values A configuration can have one and only one parent o no parent this is different from config uration schemas that can have several parents An understandable restriction is that the configuration parent schema has to be the same that the configuration schema Configurations can be added and removed from the list appering on the left of the configurations navigator Configurator Configurations Help Quit Dev E Test Dev configuration Prod Schema App Web server Host http localhost Server host This option is set to its default value _ Port 8080 Port number
16. n name Logfile gt lt documentation gt Where the logging happens lt documentation gt lt type name Filename gt lt required gt True lt required gt lt option gt lt option name Expire gt lt documentation gt Expiration lt documentation gt lt type name Datetime gt lt required gt True lt required gt lt option gt lt section gt lt schema gt lt schema name Database gt lt documentation gt lt documentation gt lt section name Database server gt lt documentation gt lt documentation gt lt option name engine gt lt documentation gt The database engine lt documentation gt lt type name Choice gt lt option value Postgresql gt lt option value Mysql gt lt type gt lt required gt True lt required gt lt option gt lt section gt lt schema gt lt schemas gt Configurations definitions lt configurations gt lt configuration name Dev gt lt schema name App gt lt option path Database Database server engine value Postgresql gt lt configuration gt lt configuration name Test gt lt schema name App gt lt parent name Dev gt lt option path Database Database server engine value Mysql gt Chapter 6 Examples 16 lt configuration gt lt configuration name Prod gt lt schema name Web gt lt option path Web Authentication Authentication enabled value True gt lt option path Web General preferences Colors Background color
Download Pdf Manuals
Related Search
Related Contents
RADIO DE DUCHA MODELO: BT-41 Manual de Instrucciones American Standard Williamsburg Kitchen Faucets 4751 Series User's Manual Maintenance-SPX4_page de garde - Fra.ai ローリングベース Filtro Cartucho HEC-RAS Analysis CYBEX 2.GO baby carrier IPCAM User`s Manual Sun StorEdge S1 Array Installation and Maintenance Manual Copyright © All rights reserved.
Failed to retrieve file