Hello folks, In this sprint, I've been working on the story 40, which is about $subject. TL;DR; I tried as much as possible to split up this effort into small chunk which are now ready to be reviewed: https://softwarefactory-project.io/r/#/q/topic:ansible-generic https://softwarefactory-project.io/r/#/q/topic:mysql-access
Below is the reasoning behind those patches chains.
1/ Expose role variables in rolename/defaults/main.yml
Right now, roles assume there are readily available variables, such as
{{fqdn}}, which really prevents using a single role out of the box.
The solution to that problem is to use generic role variables
(defaults/main.yml) and only uses those inside the role.
Already merged example for the gerrit role:
https://softwarefactory-project.io/r/5961
2/ Introduces sfconfig.py to generate group vars
There is now a new step to override the role defaults/main.yml variables
using a script called sfconfig.py. For example this script replaces the
"gerrit_mysql_host" by the hostname of the host running the mysql
service. Eventually this script would replace the sfconfig.sh to have a
more formal configuration process.
3/ Remove include_vars
Some roles are using include_vars to access different variables, which
like 1/, really prevents using a single role out of the box. Moreover
this have the side-effect of reloading the defaults variable and discard
the group vars override. This work is now almost completed and the
changes are:
https://softwarefactory-project.io/r/#/q/topic:ansible-generic
4/ Remove sfcreds
The secrets are currently managed in a centralized way using the
sfcreds.yaml file. I have proposed to move all secrets to role variables
using the special value of "CHANGE_ME". Then the sfconfig.py
automatically replaces them by UUIDs and then store them in a new file
called secrets.yaml (stored in /var/lib/software-factory/).
https://softwarefactory-project.io/r/#/c/6013
5/ Decouple the create_databases.sql
The last item I wanted to address is the intricate sf-mysql role. There
is now a new "mysql_databases" variable that contains a list of:
database name, source host, username and password. The sfconfig.py
script now references each services' databases only when the roles are
used. This work is now completed and the changes are:
https://softwarefactory-project.io/r/#/q/topic:mysql-access
That's it folks!
-Tristan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Softwarefactory-dev mailing list [email protected] https://www.redhat.com/mailman/listinfo/softwarefactory-dev
