Skip to content

Commit

Permalink
Merge pull request #34 from Mirantis/update-devent
Browse files Browse the repository at this point in the history
Update devenv
  • Loading branch information
tomkukral authored Oct 13, 2017
2 parents 0033949 + 8ec8018 commit 73b5715
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 80 deletions.
43 changes: 43 additions & 0 deletions RATIONALE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Rationale

Kubernetes is today's probably the most promising container orchestration platform and it is gaining huge momentum. There are many different installation tools and hosted solutions:

* [Kubespray](https://github.com/kubernetes-incubator/kubespray)
* [Kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/)
* [Kubernetes Salt formula](https://github.com/salt-formulas/salt-formula-kubernetes)


* [Google Container engine](https://cloud.google.com/container-engine)
* [Azure Container Service](https://azure.microsoft.com/en-us/services/container-service/)


There is no need to develop new installation method because we already have many sufficient solutions and Kubernetes instllation isn't a rocket science.
However, there are still customers strugling to integrate Kubernetes because of missing solution for complex orchestration of multiple clusters. In this document we aim to address these problems and propose architecture.

## User stories

I'm application **developer** and I'd like to have a tool to quickly spin-up the cluster and run my application on it. I have multiple applications and need to have multiple clusters for different application. It would be nice to have a possibility to run diffirent application versions in on cluster.

I'm KaaS administration and I need be able to manage all the clusters for our internal customers. I need to list then, control resources and get basic overview about each cluster. I can do administration manualy but I'd like to be able to kill some dead minions and replace them easily. Autoscaling clusters (with predefined range) would be a nice bonus.


## Architecture

We have one central backend service (called *queen*) and this service listens for user requests (via API) and can orchestrate and operate clusters.

### Required actions - MVP

* **Create cluster** - This action will be used to deploy new clusters. However, *queen* service don't deploy cluster on it's own but I uses another service (Jenkins, GKE, ..) to create this cluster.
* **Read cluster information** - Read information about new (and existing) cluster and provide this information to users and administrators. This information must include endpoint for Kubernetes API server and all required credentials (token, basic auth or certificates)
* **Deploy application** - This will connect to cluster and deploy the application. TODO: define format (apply YAMLs, Helm, ...)
* **Delete cluster** - destroy the cluster

### Additional actions

* **Check** - read cluster information and give information about node usage and running workload
* **Scale** - add or remove minions
* **Backup** - backup resources in cluster and provide guidance for PV backup
* **Update** - install newer version of Kubernetes
* **Autoscale** - watch Kubernetes scheduler or pods and start new minions when all existing minions are fully utilized
* **Manage addons** - enable or disable cluster addons

48 changes: 4 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# KaaS
# KQueen - Kubernetes cluster manager

[![Build Status](https://travis-ci.org/Mirantis/kqueen.svg?branch=master)](https://travis-ci.org/Mirantis/kqueen)
[![PyPI version](https://badge.fury.io/py/kqueen.svg)](https://badge.fury.io/py/kqueen)
[![Coverage Status](https://coveralls.io/repos/github/Mirantis/kqueen/badge.svg?branch=master)](https://coveralls.io/github/Mirantis/kqueen?branch=master)
Expand All @@ -21,47 +22,6 @@ We load configuration from file `config_dev.py` by default and this can be confi
| --- | --- | --- | --- |
| `KQUEEN_CONFIG_FILE` | Environment variable | `config_dev.py` | Configuration file to load |

## Documentation

## Rationale

Kubernetes is today's probably the most promising container orchestration platform and it is gaining huge momentum. There are many different installation tools and hosted solutions:

* [Kubespray](https://github.com/kubernetes-incubator/kubespray)
* [Kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/)
* [Kubernetes Salt formula](https://github.com/salt-formulas/salt-formula-kubernetes)


* [Google Container engine](https://cloud.google.com/container-engine)
* [Azure Container Service](https://azure.microsoft.com/en-us/services/container-service/)


There is no need to develop new installation method because we already have many sufficient solutions and Kubernetes instllation isn't a rocket science.
However, there are still customers strugling to integrate Kubernetes because of missing solution for complex orchestration of multiple clusters. In this document we aim to address these problems and propose architecture.

## User stories

I'm application **developer** and I'd like to have a tool to quickly spin-up the cluster and run my application on it. I have multiple applications and need to have multiple clusters for different application. It would be nice to have a possibility to run diffirent application versions in on cluster.

I'm KaaS administration and I need be able to manage all the clusters for our internal customers. I need to list then, control resources and get basic overview about each cluster. I can do administration manualy but I'd like to be able to kill some dead minions and replace them easily. Autoscaling clusters (with predefined range) would be a nice bonus.


## Architecture

We have one central backend service (called *queen*) and this service listens for user requests (via API) and can orchestrate and operate clusters.

### Required actions - MVP

* **Create cluster** - This action will be used to deploy new clusters. However, *queen* service don't deploy cluster on it's own but I uses another service (Jenkins, GKE, ..) to create this cluster.
* **Read cluster information** - Read information about new (and existing) cluster and provide this information to users and administrators. This information must include endpoint for Kubernetes API server and all required credentials (token, basic auth or certificates)
* **Deploy application** - This will connect to cluster and deploy the application. TODO: define format (apply YAMLs, Helm, ...)
* **Delete cluster** - destroy the cluster

### Additional actions

* **Check** - read cluster information and give information about node usage and running workload
* **Scale** - add or remove minions
* **Backup** - backup resources in cluster and provide guidance for PV backup
* **Update** - install newer version of Kubernetes
* **Autoscale** - watch Kubernetes scheduler or pods and start new minions when all existing minions are fully utilized
* **Manage addons** - enable or disable cluster addons

For full documenation please refer to [kqueen.readthedocs.io](http://kqueen.readthedocs.io).
2 changes: 1 addition & 1 deletion devenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
uuid_local = '2d51891a-adac-4bbc-a725-eed20cc67849'
uuid_provisioner_jenkins = 'e8de24b0-43d1-4a3c-af55-7b1d3f700554'
uuid_provisioner_local = '203c50d6-3d09-4789-8b8b-1ecb00814436'
kubeconfig_url = 'https://ci.mcp.mirantis.net/job/deploy-aws-k8s_ha_calico/199/artifact/kubeconfig'
kubeconfig_url = 'https://ci.mcp.mirantis.net/job/deploy-aws-k8s_ha_calico_sm/33/artifact/kubeconfig'


try:
Expand Down
3 changes: 3 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ help:

.PHONY: help Makefile

livehtml:
sphinx-autobuild -b html "$(SOURCEDIR)" "$(BUILDDIR)/html"

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Welcome to kqueen's documentation!
==================================

.. toctree::
:maxdepth: 2
:maxdepth: 3
:caption: Contents:

kqueen
Expand Down
2 changes: 1 addition & 1 deletion docs/kqueen.blueprints.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kqueen\.blueprints package
Flask blueprints
==========================

Subpackages
Expand Down
6 changes: 3 additions & 3 deletions docs/kqueen.provisioners.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
kqueen\.provisioners package
============================
Provisioners
=============

Submodules
----------

kqueen\.provisioners\.jenkins module
JenkinsProvisioner
------------------------------------

.. automodule:: kqueen.provisioners.jenkins
Expand Down
48 changes: 20 additions & 28 deletions docs/kqueen.rst
Original file line number Diff line number Diff line change
@@ -1,75 +1,67 @@
kqueen package
==============

Subpackages
-----------

.. toctree::

kqueen.blueprints
kqueen.provisioners
kqueen.storages

Submodules
----------
Models
-------

kqueen\.config\_dev module
--------------------------

.. automodule:: kqueen.config_dev
.. automodule:: kqueen.models
:members:
:undoc-members:
:show-inheritance:

kqueen\.kubeapi module

Kubernetes API
----------------------

.. automodule:: kqueen.kubeapi
:members:
:undoc-members:
:show-inheritance:

kqueen\.models module
Server
---------------------

.. automodule:: kqueen.models
.. automodule:: kqueen.server
:members:
:undoc-members:
:show-inheritance:

kqueen\.helpers module
Helpers
-----------------------

.. automodule:: kqueen.helpers
:members:
:undoc-members:
:show-inheritance:


kqueen\.serializers module
Serializers
--------------------------

.. automodule:: kqueen.serializers
:members:
:undoc-members:
:show-inheritance:

kqueen\.server module
---------------------

.. automodule:: kqueen.server
:members:
:undoc-members:
:show-inheritance:

kqueen\.wrappers module
Wrappers
-----------------------

.. automodule:: kqueen.wrappers
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::

kqueen.blueprints
kqueen.provisioners
kqueen.storages



Module contents
---------------
Expand Down
4 changes: 2 additions & 2 deletions docs/kqueen.storages.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
kqueen\.storages package
Model storages
========================

Submodules
----------

kqueen\.storages\.etcd module
Etcd
-----------------------------

.. automodule:: kqueen.storages.etcd
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ pytest
pytest-cov
pytest-flask
sphinx
sphinx-autobuild
sphinx_rtd_theme

0 comments on commit 73b5715

Please sign in to comment.