-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into prs/python-build-scripts
- Loading branch information
Showing
20 changed files
with
270 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,3 +89,4 @@ cython_debug/ | |
data.yaml | ||
config.yaml | ||
.ceph | ||
.k8s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
COLOUR_GREEN=\033[0;32m | ||
COLOUR_RED=\033[0;31m | ||
COLOUR_BLUE=\033[0;34m | ||
COLOUR_END=\033[0m | ||
|
||
.DEFAULT_GOAL:=help | ||
|
||
# Get needed paths and information from locally installed librados | ||
RADOSLIB_VERSION := 2.0.0 | ||
GENERAL_LIB_LOCATION := $(shell pip show rados | grep -oP "(?<=Location: ).*") | ||
RADOSLIB_INSTALLED_VERSION := $(shell pip show rados | grep Version | awk '{print $$2}') | ||
|
||
.PHONY: help | ||
help: ## Display this help message | ||
@echo -e '${COLOUR_RED}Usage: make <command>${COLOUR_END}' | ||
@cat $(MAKEFILE_LIST) | grep '^[a-zA-Z]' | \ | ||
awk -F ':.*?## ' 'NF==2 {printf " %-26s%s\n\n", $$1, "${COLOUR_GREEN}"$$2"${COLOUR_END}"}' | ||
|
||
.PHONY: setup | ||
setup: setup-pre-commit check-radoslib setup-venv ## Setup the pre-commit environment and then the venv environment | ||
|
||
.PHONY: setup-pre-commit | ||
setup-pre-commit: | ||
pip install --user pre-commit && pre-commit install | ||
|
||
.PHONY: setup-venv | ||
setup-venv: | ||
python -m venv --system-site-packages ./.venv && \ | ||
source ./.venv/bin/activate && \ | ||
pip install --ignore-installed -r requirements.txt | ||
|
||
.PHONY: update-requirements | ||
update-requirements: ## Update the requirements.txt with newer versions of pip packages | ||
source ./.venv/bin/activate && \ | ||
pip freeze -l > requirements.txt | ||
|
||
.PHONY: check-radoslib | ||
check-radoslib: ## Checks if radoslib is installed and if it contains the right version | ||
@if [ -z "$(GENERAL_LIB_LOCATION)" ]; then \ | ||
echo -e "${COLOUR_RED}ERROR: 'rados' library not found. Please make sure it's installed.${COLOUR_END}"; \ | ||
exit 1; \ | ||
fi | ||
@if [ "$(RADOSLIB_INSTALLED_VERSION)" != "$(RADOSLIB_VERSION)" ]; then \ | ||
echo -e "${COLOUR_RED}ERROR: Incorrect version of 'rados' library found. Expected version $(RADOSLIB_VERSION), found $$RADOSLIB_INSTALLED_VERSION.${COLOUR_END}"; \ | ||
exit 1; \ | ||
fi | ||
|
||
.PHONY: run-local-rookify | ||
run-local-rookify: ## Runs rookify in the local development environment (requires setup-venv) | ||
$(eval PYTHONPATH="${PYTHONPATH}:$(pwd)/src") | ||
source ./.venv/bin/activate && \ | ||
cd src && python3 -m rookify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,24 @@ requires = [ "setuptools", "wheel" ] | |
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
dynamic = ["version"] | ||
requires-python = ">=3.9" | ||
|
||
name = "Rookify" | ||
description = "Enable Ceph-Cluster migrations to Rook" | ||
readme = "README.md" | ||
authors = [{name = "Sovereign Cloud Stack Developers", email = "[email protected]"}] | ||
license = {file = "LICENSE"} | ||
classifiers = [ | ||
"Intended Audience :: System Administrators", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Environment :: Console", | ||
"Topic :: System :: Clustering", | ||
"Topic :: System :: Systems Administration", | ||
"Topic :: Utilities" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://scs.community" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,5 @@ | ||
[metadata] | ||
name = Rookify | ||
description = Enable Ceph-Cluster migrations to Rook | ||
long_description = Rookify is designed to facilitate a smooth and efficient transition for existing Ceph clusters to a Rook-managed Ceph cluster environment. | ||
platforms = any | ||
author = Sovereign Cloud Stack Developers | ||
author_email = [email protected] | ||
license = Apache | ||
url = https://scs.community | ||
classifiers = | ||
Intended Audience :: System Administrators | ||
License :: OSI Approved :: Apache License | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
Environment :: Console | ||
Topic :: System :: Clustering | ||
Topic :: System :: Systems Administration | ||
Topic :: Utilities | ||
|
||
[options] | ||
install_requires=file:requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# type: ignore | ||
|
||
from .main import AnalyzeCephHandler | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# type: ignore | ||
|
||
from .main import ExampleHandler | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# type: ignore | ||
|
||
from .main import MigrateMonitorsHandler | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# type: ignore | ||
|
||
from .main import MigrateOSDsHandler | ||
|
||
|
Oops, something went wrong.