|Version 11 (modified by 10 years ago) ( diff ),|
Table of Contents
Templates allow selecting alternate configuration sets.
This allows a separation between Code & Settings.
This reduces the need for deployment branches & hence reduces the risk of forking.
Builds on the 000_config.py configuration template and DeveloperGuidelines/PrePopulate.
End-User wishing to trial the System
The end-user would like to download & run immediately with the minimimum of up-front configuration possible - the defaults should be sufficient to get started with.
If they must select between alternate options then they'd definitely want this to be done through the web browser.
- perhaps the most useful would be a single web page with a list of Templates to choose from, witha big button to say 'OK' to proceed with the default.
Once they've played around some & wish to customise it, then they would like to be able to configure options via WebSetup.
Once they decide to go into production, it would be really useful to be able to save all the settings they've made in their local instance to a file & then use this file to configure their server instance. This could include population of lookup lists being saved as CSVs and then compressing these into a single file to be uncompressed on the server.
The deployer wants to be walked through the different settings...ideally through a WebSetup Wizard, however they're OK at doing this through a text file or CLI prompts if-required.
They want to minimise the number of interrupts during the setup process - i.e. they would like to run a single script to download/install all the software & then run through a single set of configuration options. The current supported installation scripts do this reasonably well, e.g. InstallationGuidelines/Linux/Server/CherokeePostgreSQL
The developer/tester would like to be able to quickly move their system between different configuration options. This would typically happen as part of their 'clean' script, so could be done via the CLI
They would like to distinguish between the settings which relate to the profile template from the settings which are about their machine instance (Debug, SMTP, Database, API Keys, etc)
They would like to select between prepopulate options when using a single configuration template. e.g. IFRC 000_config.py can be used with IFRC, IFRC_Train or ["IFRC_Train", "IFRC_Demo"], but we don't want to have to maintain 3x 000_config.py files.
The old deployment_templates/000_config.py always had regular merge conflicts with deployment branches, so separating these into separate template folders should improve things.
We would like to minimise the differences between the different templates so all the non-default ones should only enable what they need in order to minimise maintenance.
We need a front-end decision maker to decide which template(s) we are using:
- configuration settings: 000_config.py
- prepopulate: tasks.cfg
- tbc Theme: static/styles/sahana.css, views/layout.html, modules/eden/layouts.py
- tbc Menus: modules/eden/menus.py, models/01_menu.py
- tbc Message Parser
This front-end should be bypassable via deployment scripts. (i.e. the deployment scripts prompt the deployer via a CLI if not hard-coded).
This front-end selection should use a simple Web Setup (local deployments) to select between templates.
Split 000_config.py into 2 files:
- Machine-specific configuration (Debug, SMTP, Database, API Keys, etc)
- Instance-type configuration
Have 2 settings:
- Template: For which 000_config extensions to use
- Prepopulate: Any additional prepopulate folders to add to the list (comes from the template)
Build the running 000_config.py from the default file, with modifications based on the selected Template
- so don't simply file copy but use some intelligence to uncomment/modify options in the default file
Currently 000_config calls the prepopulate options.
- selecting between alternate 000_config.py files requires external shell scripting, which bypasses the hmac_key automation
We should move template selection to TEMPLATE in 0000_template.py?
- move the CANARY_UPDATE_CHECK_ID back to 0000_update_check.py to make it easier to write the 0000_template.py?
- Profile Layer
- Profile Templates Plan
- Splitting up CSS into separate files