diff --git a/python3-update.md b/python3-update.md new file mode 100644 index 0000000000000000000000000000000000000000..a20bb23b78045caf669cd69766cd2d7273ecf4ab --- /dev/null +++ b/python3-update.md @@ -0,0 +1,59 @@ +Supr-ldap-integration Python3 Update Plan +========================================= + +This explains preliminary plans to update the supr-integration scripts to +python3. A repo of the code is available here: +https://gitlab.liu.se/swestore/supr-ldap-integration. The master branch is +the old python2 version. The branch with the work in progress update is +python3. + +A partially updated version is checked out at ldaptest:/opt/. I lack +sufficient knowledge to even test it so progress has stalled. + +The Current Deployed Version +============================ + +The version thats currently deployed has had a few minor changes. The code +is currently deployed to ldaptest and ldap1 in the directory /supr. Changes +since last year (2022) include: + +- Created a upstream git repository. +- Merged changes between the versions available on the two servers. +- Update the email template being sent out to new users to use current links. +- Removed all references to IPA and IRODS, as they are no longer used. + +The Update Plan +=============== + +Here are a few things that I think should change: + +- Update to python3, python2 has been deprecated for a while now. +- Have a better way of deploying the scripts. +- Have some way of managing dependencies. + +Deploy Scripts In a Better Way +------------------------------ + +I currently apply changes by pushing to the gitlab repository and then pull +the changes from the ldap_master servers. This still feels frail but is +better than copying files over. + +I have a few ideas on how this could be better: + +- Use puppet to automatically install the code +- Create a .rpm-package with the code + +Dependency Management +--------------------- + +Another related issue is how to manage dependencies, currently the code +relies on a virtual-env to install dependencies. This works but has turned +out to be tricky to automate. + +An alternative could be to if one were to install it through the package +manager to declare dependencies that way. Or if puppet is used to deploy, +then dependencies could be installed that way, with or without virtual-envs. + +I also believe that the file supr.py belongs to another package but has been +included by copying it into the repo. It would be good to include it as a +proper dependency instead.