diff --git a/readme.md b/readme.md index 9264fec7c8f6eb99bfa86cda810d058085a198c9..2be225d66b040a1cce46985300eed4eb6575c344 100644 --- a/readme.md +++ b/readme.md @@ -150,6 +150,55 @@ This is the main deployment script. If you start it without parameter it will loop over all existing profiles. You can add an existing profile name to limit the execution to that profile only. +### ./bin/create_config.sh + +The script is used to read a template (*.erb) to replace simple placeholders +by regex `<\%\=\ *\@replace\[\"$key\"\]\ *\%>` with a value coming from one or more +replacement data files. The output will be written to a target file. + +```txt + +===== IML DEPLOYMENT :: replace variables in erb syntax ===== + +template : +output : +replacements: replace*.txt + +ERROR: missing params. +create_config.sh TEMPLATE-FILE OUTFILE [optional: REPLACE-DATA-FILE] +``` + +A sample replacement file is profiles/example/replace.txt: + +```txt +# ---------------------------------------------------------------------- +# REPLACEMENTS +# ---------------------------------------------------------------------- +# +# SYNTAX: +# key=value +# +# - no spaces around first "=" +# - value can contain any char, no quoting +# ---------------------------------------------------------------------- + +dbhost=localhost +dbuser=fred +dbpassword=vom-jupiter +dbport=3306 + +api-key=12345678 + +# ---------------------------------------------------------------------- +``` + +The idea for several replacent files is that different groups can set +their replacement data: + +* sysadmins add connections and credentials to needed services/ database connections +* developers add api keys and other internal values +* ... + ### ./bin/getfile.sh With getfile.sh you can access the software archive.