coffea-casa icon indicating copy to clipboard operation
coffea-casa copied to clipboard

Develop a set of scripts to populate automatically Coffea-casa OD and CMS e-groups

Open oshadura opened this issue 2 years ago • 0 comments

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

oshadura avatar Mar 28 '22 13:03 oshadura