coffea-casa
coffea-casa copied to clipboard
Develop a set of scripts to populate automatically Coffea-casa OD and CMS e-groups
The goal is to enable automatic synchronization of users using Coffea-casa OD and CMS AFs using Jupyterhub APIs. Scripts should be integrated into CI/CD and to be able also scheduled on demand.
Currenlty procedure is done manually using two requests:
curl -X 'GET' -H "Authorization: token xxxx" 'https://coffea.casa/hub/api/users?state=active' -H 'accept: application/json' | python -mjson.tool | jq '.[].name' > cms-users.txt
curl -X 'GET' -H "Authorization: token xxxx" 'https://coffea.casa/hub/api/users?state=inactive' -H 'accept: application/json' | python -mjson.tool | jq '.[].name' >> cms-users.txt
and after finished by generating and uploading prepared csv file directly in the coffea-casa-od-users
and coffea-casa-cms-users
e-group settings: https://aisdocs.web.cern.ch/display/ED/3.5.+Export+and+Import+members
More info in the GH issue #222