Package: kqueen
OverviewMore information about KQueen Architecture and use cases is described inRATIONALEfile.RequirementsPython v3.6 and higher.Pip v3 and higher.Docker stable release (v17.03 and higher is preferable).Docker-compose stable release (v1.16.0 and higher is preferable).Demo environmentMake sure you can reach Jenkins server defined inJENKINS_API_URLvariable in filekqueen/config/prod.py.Run these commands to run Kqueen API and UI in containers.docker-compose -f docker-compose.yml -f docker-compose.demo.yml upor with mounted etcd data directory:docker-compose -f docker-compose.etcd-volume.yml -f docker-compose.demo.yml upYou can login using useradminand passworddefault.
Default username and password can be changed indocker-compose.demo.ymlfile before first start of API.Navigate to UIhttp://127.0.0.1:5080/http://127.0.0.1:5000/api/docs/DevelopmentInstall dependencies# Debian/Ubuntu
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

# RedHat/CentOS:
sudo yum install python-devel openldap-develPrepare python virtual environmentpython -m ensurepip --default-pip
pip install --user pipenv
pipenv --python 3.6
pipenv install --dev

pipenv shellStart docker container with etcd storagedocker-compose up -dInitialize kqueen db: addadminuser withdefaultpassword./bootstrap_admin.py DemoOrg demoorg admin defaultYou can start KQueen API service directlykqueen &
chrome --new-tab http://127.0.0.1:5000/api/docs/Prepare kubernetes config fileKubernetes configuration file that describes existing cluster can be used in Kqueen.
Rename it withkubernetes_remoteand place to the root of the project.
For test purposes this file can be empty, but should be added manually.How-to’sClean etcd storage after previous runsetcdctl rm --recursive /kqueenAdd admin user, organization, mock clusters and provisioners to etcd storage at once, execute the following./devenv.pyTo add a singleadminuser withdefaultpassword within associatedDemoOrgorganization in provideddemoorgnamespace, execute the following./bootstrap_admin.py DemoOrg demoorg admin defaultTest access token.curl,jqshould be installed in your systemTOKEN=$(curl -s -H "Content-Type: application/json" --data '{"username":"admin","password":"default"}' -X POST localhost:5000/api/v1/auth | jq -r '.access_token')
echo $TOKEN
curl -H "Authorization: Bearer $TOKEN" localhost:5000/api/v1/clustersSet up flask shell for manual testing and debuggingexport FLASK_APP=kqueen.server
export prometheus_multiproc_dir=$(mktemp -d)
flask shellUpdate Docker image with code changesThere are two ways to test development changes. First is automatic: create a separate branch and push PR, then TravisCI
build image and push it on Docker Hub automatically. Second one is just rebuild kqueen api-image locally:docker build -t kqueen/api:your_tag .ConfigurationWe load configuration from fileconfig/dev.pyby default and this
can be configured byKQUEEN_CONFIG_FILEenvironment variable. Any
environment variable matching nameKQUEEN_*will be loaded and saved
to configuration.DocumentationFull documentation can be found atkqueen.readthedocs.io.API reference is defined atapi.ymland Swagger UI is available at<kqueen_api_url>/api/docsDEMOsGeneric KQueen OverviewAKS (Azure) in KQueenNetwork policy management in KQueenThe following video provides an overview on how to manage the Calico network policy
for a Kubernetes cluster provisioned with Google Kubernetes Engine using KQueen.