{"id":20661811,"url":"https://github.com/mirantis/kqueen","last_synced_at":"2025-04-07T10:20:25.530Z","repository":{"id":25725063,"uuid":"104763063","full_name":"Mirantis/kqueen","owner":"Mirantis","description":"Kubernetes queen - cluster manager","archived":false,"fork":false,"pushed_at":"2022-12-08T02:09:14.000Z","size":3246,"stargazers_count":136,"open_issues_count":16,"forks_count":33,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-03-31T09:04:40.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mirantis.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-25T14:47:07.000Z","updated_at":"2024-12-14T15:35:03.000Z","dependencies_parsed_at":"2023-01-14T03:17:43.266Z","dependency_job_id":null,"html_url":"https://github.com/Mirantis/kqueen","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirantis%2Fkqueen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirantis%2Fkqueen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirantis%2Fkqueen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirantis%2Fkqueen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mirantis","download_url":"https://codeload.github.com/Mirantis/kqueen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631833,"owners_count":20970069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T19:11:44.022Z","updated_at":"2025-04-07T10:20:25.509Z","avatar_url":"https://github.com/Mirantis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"KQueen - Kubernetes cluster manager\n===================================\n\n\n.. image:: https://travis-ci.org/Mirantis/kqueen.svg?branch=master\n    :target: https://travis-ci.org/Mirantis/kqueen\n\n.. image:: https://badge.fury.io/py/kqueen.svg\n    :target: https://badge.fury.io/py/kqueen\n\n.. image:: https://coveralls.io/repos/github/Mirantis/kqueen/badge.svg?branch=master\n    :target: https://coveralls.io/github/Mirantis/kqueen?branch=master\n\n.. image:: https://readthedocs.org/projects/kqueen/badge/?version=master\n    :target: http://kqueen.readthedocs.io/en/master/?badge=master\n\nOverview\n--------\n\nMore information about KQueen Architecture and use cases is described in `RATIONALE \u003cRATIONALE.md\u003e`_ file.\n\nRequirements\n------------\n\n-  Python v3.6 and higher.\n-  Pip v3 and higher.\n-  Docker stable release (v17.03 and higher is preferable).\n-  Docker-compose stable release (v1.16.0 and higher is preferable).\n\n\nDemo environment\n----------------\n\n- Make sure you can reach Jenkins server defined in `JENKINS_API_URL` variable in file `kqueen/config/prod.py`.\n- Run these commands to run Kqueen API and UI in containers.\n\n  ::\n\n    docker-compose -f docker-compose.yml -f docker-compose.demo.yml up\n\n  or with mounted etcd data directory:\n\n  ::\n\n    docker-compose -f docker-compose.etcd-volume.yml -f docker-compose.demo.yml up\n\n- You can login using user `admin` and password `default`.\n  Default username and password can be changed in `docker-compose.demo.yml` file before first start of API.\n\n\n- Navigate to UI\n\n  * http://127.0.0.1:5080/\n  * http://127.0.0.1:5000/api/docs/\n\n\nDevelopment\n-----------\n\n- Install dependencies\n\n    ::\n\n      # Debian/Ubuntu\n      sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev\n\n      # RedHat/CentOS:\n      sudo yum install python-devel openldap-devel\n\n- Prepare python virtual environment\n\n  ::\n\n    python -m ensurepip --default-pip\n    pip install --user pipenv\n    pipenv --python 3.6\n    pipenv install --dev\n\n    pipenv shell\n\n\n- Start docker container with etcd storage\n\n  ::\n\n    docker-compose up -d\n\n- Initialize kqueen db: add *admin* user with *default* password\n\n  ::\n\n     ./bootstrap_admin.py DemoOrg demoorg admin default\n\n- Create directories to store Kqueen data and log files\n\n  .. code-block:: bash\n\n    mkdir - m 666 /var/log/kqueen-api\n    mkdir - m 666 /opt/kqueen\n\n- Install kubespray or provide path to the existing installation by specifying ``KS_KUBESPRAY_PATH`` in the config file\n\n .. code-block:: bash\n\n    git clone -b v2.5.0 https://github.com/kubernetes-incubator/kubespray.git \u0026\u0026 \\\n    pip install -r kubespray/requirements.txt\n\n- You can start KQueen API service directly\n\n  ::\n\n    kqueen \u0026\n    chrome --new-tab http://127.0.0.1:5000/api/docs/\n\n- Prepare kubernetes config file\n\n Kubernetes configuration file that describes existing cluster can be used in Kqueen.\n Rename it with *kubernetes_remote* and place to the root of the project.\n For test purposes this file can be empty, but should be added manually.\n\n\nHow-to's\n^^^^^^^^\n\n- Clean etcd storage after previous runs\n\n  ::\n\n    etcdctl rm --recursive /kqueen\n\n- Add admin user, organization, mock clusters and provisioners to etcd storage at once, execute the following\n\n  ::\n\n    ./devenv.py\n\n- To add a single *admin* user with *default* password within associated *DemoOrg* organization in provided *demoorg* namespace, execute the following\n\n  ::\n\n    ./bootstrap_admin.py DemoOrg demoorg admin default\n\n- Test access token. *curl*,  *jq* should be installed in your system\n\n  ::\n\n    TOKEN=$(curl -s -H \"Content-Type: application/json\" --data '{\"username\":\"admin\",\"password\":\"default\"}' -X POST localhost:5000/api/v1/auth | jq -r '.access_token')\n    echo $TOKEN\n    curl -H \"Authorization: Bearer $TOKEN\" localhost:5000/api/v1/clusters\n\n- Set up flask shell for manual testing and debugging\n\n  ::\n\n    export FLASK_APP=kqueen.server\n    export prometheus_multiproc_dir=$(mktemp -d)\n    flask shell\n\n- Update Docker image with code changes\n\nThere are two ways to test development changes. First is automatic: create a separate branch and push PR, then TravisCI\nbuild image and push it on Docker Hub automatically. Second one is just rebuild kqueen api-image locally:\n\n  ::\n\n   docker build -t kqueen/api:your_tag .\n\nConfiguration\n-------------\n\nWe load configuration from file ``config/dev.py`` by default and this\ncan be configured by ``KQUEEN_CONFIG_FILE`` environment variable. Any\nenvironment variable matching name ``KQUEEN_*`` will be loaded and saved\nto configuration.\n\nDocumentation\n-------------\n\nFull documentation can be found at\n`kqueen.readthedocs.io \u003chttp://kqueen.readthedocs.io\u003e`__.\n\nAPI reference is defined at `api.yml \u003chttps://github.com/Mirantis/kqueen/blob/master/kqueen/blueprints/api/api3_0.yml\u003e`_\nand Swagger UI is available at ``\u003ckqueen_api_url\u003e/api/docs``\n\n.. |Build Status| image:: https://travis-ci.org/Mirantis/kqueen.svg?branch=master\n   :target: https://travis-ci.org/Mirantis/kqueen\n.. |PyPI version| image:: https://badge.fury.io/py/kqueen.svg\n   :target: https://badge.fury.io/py/kqueen\n.. |Coverage Status| image:: https://coveralls.io/repos/github/Mirantis/kqueen/badge.svg?branch=master\n   :target: https://coveralls.io/github/Mirantis/kqueen?branch=master\n\nDEMOs\n-----\n\n**Generic KQueen Overview**\n\n.. image:: https://img.youtube.com/vi/PCAwCxPQc2A/0.jpg\n   :target: https://www.youtube.com/watch?v=PCAwCxPQc2A\u0026t=1s\n\n**AKS (Azure) in KQueen**\n\n.. image:: https://img.youtube.com/vi/xHydnJGcs2k/0.jpg\n   :target: https://youtu.be/xHydnJGcs2k\n\n**Network policy management in KQueen**\n\nThe following video provides an overview on how to manage the Calico network policy\nfor a Kubernetes cluster provisioned with Google Kubernetes Engine using KQueen.\n\n.. image:: https://img.youtube.com/vi/MYXFI75Fm10/0.jpg\n   :target: https://youtu.be/MYXFI75Fm10\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirantis%2Fkqueen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirantis%2Fkqueen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirantis%2Fkqueen/lists"}