Some helper functions for on/off boarding automation.
The reporting code is in nimda/services.py.
The default output folder is output
and the default log file is nimda.log
,
which can be changed in the config file (see example config/devops.ini
).
- DynamoDB
UserAccounts
:- Write user accounts' details to
DatabaseUserAccountsSummary.json
. - Write the following summary to
nimda.log
:- Total number of users
- Total number of active users
- Write user accounts' details to
- Bitbucket:
- Write current users of each Team to
BitbucketUsers-team-x.csv
. - Write the following summary to
nimda.log
:- Users not in database
- Total number of users
- Write current users of each Team to
- Confluence:
- Write current users of all groups to
ConfluenceUsers.csv
. - Write the following summary to
nimda.log
:- Users shall have been off boarded (i.e. status in database is not active)
- Users not in database
- Total number of users assigned to any group
- Write current users of all groups to
- Flowdock:
- Write current users having email address found in database to
FlowdockUsers.csv
. - Write the following summary to
nimda.log
:- Users shall have been off boarded (i.e. status in database is not active)
- Users not in database
- Total number of users
- Write current users having email address found in database to
- Jenkins:
- Write current users of all groups to
JenkinsUsers.csv
. - Write the following summary to
nimda.log
:- Users shall have been off boarded (i.e. status in database is not active)
- Total number of users
- Write current users of all groups to
- JIRA:
- Write current users of all groups to
JiraUsers.csv
. - Write the following summary to
nimda.log
:- Users shall have been off boarded (i.e. status in database is not active)
- Users not in database
- Total number of users assigned to any group
- Write current users of all groups to
-
UserAccounts (DynamoDB):
- Set
status
fromactive
tosuspended
- Unset
bitbucket
attribute - Unset
confluence
attribute - Unset
flowdock
attribute - Unset
jenkins
attribute - Unset
jira
attribute
- Set
-
Bitbucket:
- Remove all user access (actual license counts) in the team(s).
-
Confluence:
- Remove user from all groups
- Revoke (Confluence) application access (actual license counts)
- Deactivate user (not deleted)
-
Flow:
- Remove user from the organisation
-
Jenkins:
- Delete user (Jenkins actually does not delete a user but hides it from all views).
- WON'T DO: Not removing user from Role because the api is crap and does not only requires to post all users' permission details.
-
JIRA:
- Remove user from all groups
- Revoke (JIRA) application access (actual license counts)
- Deactivate user (not deleted)
Similar to Off-boarding (at the moment), except
- UserAccounts (DynamoDB):
- Set
status
fromactive
totransferred
- Set
- No Confluence off boarding (Confluence is shared with all Biarri groups)
- No Flowdock off boarding (Flowdock is shared with all Biarri groups)
UserAccounts
(DynamoDB):- Set
gmail
with the given user name - Set
active
toactive
- Set
- (TODO)
-
Use
boto3
to interact with DynamoDB. -
Use
pybitbucket
to interact with Bitbucket; require to write additional functions to support some user management functions. -
Use
requests
to write a client to interact with Confluence REST API.
Note that it's theusername
required forauth
. -
Use
requests
to write a client to interact with Flowdock REST API.
Note that it's theuser email address
required forauth
. -
Use
requests
to write a client to interact with Jenkins API.
Note that it's theusername
required forauth
. -
Use
jira
to interact with JIRA; require to write additional functions to support some user management functions.
Note that it's theuser email address
required forauth
.
-
Update the config file (see
config/devops.ini
). -
pip install
the latest version ofnimda
. -
For reporting:
nimda --config config/devops.ini
-
To off board a user:
nimda --config config/devops.ini --offboard [gmail-acc-name e.g. firstname.lastname]
-
To transfer a user to other business group:
nimda --config config/devops.ini --transfer [gmail-acc-name e.g. firstname.lastname]
-
User
--help
to see all options.
Linux
virtualenv env
. env/bin/activate
pip install -e .
Windows
virtualenv env
env\Scripts\activate
pip install -e .
Linux
./test.sh
Windows
test.bat