Scans GitLab instance and ranks projects against a set of criteria. Can be used to identiy projects that may have too much metadata/size to reliably export or import.
Project description
Evaluate
Evaluate is a script that can be run to gather information about projects from a gitlab self-managed instance. This information is useful to the GitLab Professional Services (PS) team to accurately scope migration services.
Use Case
GitLab PS plans to share this script with a Customer to run against their self managed instance. Then the customer can send back the output files to enable GitLab engagement managers to scope engagements accurately.
Install
pip install gitlab-evaluate
Usage
System level data gathering
Evaluate is meant to be run by an administrator of a GitLab Self Managed deployment to gather data about every project on the instance.
- A GitLab system administrator should provision an access token
- Then, after installing
gitlab-evaluate
from the Install section above, - Run :point_down:
# For evaluating a GitLab instance
evaluate-gitlab -t <access-token-with-api-admin-privileges> -s https://gitlab.example.com
- This should create a file called
evaluate_output.csv
- If you're coordinating a GitLab Professional Services engageemnt, email this file to the GitLab account team.
To gather CI data from a single repo
# For evaluating a single git repo's CI readiness
evaluate-ci-readiness -r|--repo <git-repo-url>
Command help screen
usage: evaluate-gitlab [-h] [-t TOKEN] [-s SOURCE] [-f FILENAME] [-o] [-i] [-p PROCESSES]
optional arguments:
-h, --help show this help message and exit
-t TOKEN, --token TOKEN
Personal Access Token: REQ'd
-s SOURCE, --source SOURCE
Source URL: REQ'd
-f FILENAME, --filename FILENAME
CSV Output File Name. If not set, will default to 'evaluate_output.csv'
-o, --output Output Per Project Stats to screen
-i, --insecure Set to ignore SSL warnings.
-p PROCESSES, --processes PROCESSES
Number of processes. Defaults to number of CPU cores
usage: evaluate-ci-readiness [-h] [-r REPO]
optional arguments:
-h, --help show this help message and exit
-r REPO, --repo REPO Git Repository To Clone (ex: https://username:password@repo.com
Using a docker container
Docker containers with evaluate installed are also available to use.
Local usage
# Spin up container
docker run --name evaluate -it registry.gitlab.com/gitlab-org/professional-services-automation/tools/utilities/evaluate:latest /bin/bash
# In docker shell
evaluate-ci-readiness -r|--repo <git-repo-url>
evaluate-gitlab -t <access-token-with-api-admin-privileges> -s https://gitlab.example.com
Example GitLab CI job using evaluate ci readiness script
evaluate node-js:
stage: test
script:
- evaluate-ci-readiness --repo=https://github.com/nodejs/node.git
artifacts:
paths:
- node.csv
To test, consider standing up local docker container of gitlab. Provision a personal access token of a user who has system admin priviledges. Create multiple projects with varying number of commits, pipelines, merge requests, issues. Consider importing an open source repo or using GPT to add projects to the system.
Design
Design for the script can be found here
Project Thresholds
Below are the thresholds we will use to determine whether a project can be considered for normal migration or needs to have special steps taken in order to migrate
Project Data
- Pipelines - 1,500 max
- Issues - 1,500 total (not just open)
- Merge Requests - 1,500 total (not just merged)
- Container images - 20GB per project
- Packages - Any packages present
Repo Data
- commits - 20K
- branches - 1K
- tags - 1K
- Disk Size - 10GB
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gitlab_evaluate-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbe55234c9a7fada3b05f57664cf3d1cffe4cd66b32f4bb2b6e592de82e715e5 |
|
MD5 | c85d9e8b0b0fdad04e486148c93da002 |
|
BLAKE2b-256 | 5a51851733229a36e9bbc3114ba30376ca4a5be673f7050064b8901e304812f1 |