Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
maystery committed Feb 25, 2019
2 parents 051a93b + 2986020 commit 66d87ed
Show file tree
Hide file tree
Showing 7 changed files with 340 additions and 119 deletions.
5 changes: 3 additions & 2 deletions user_documentation/Makefile
Expand Up @@ -5,7 +5,7 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = micado
SOURCEDIR = .
SOURCEDIR = ./rst
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
Expand All @@ -17,4 +17,5 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

304 changes: 222 additions & 82 deletions user_documentation/rst/application_description.rst

Large diffs are not rendered by default.

44 changes: 35 additions & 9 deletions user_documentation/rst/deployment.rst
Expand Up @@ -23,12 +23,15 @@ For cloud interfaces supported by MiCADO:
For the MiCADO master:

* Ubuntu 16.04
* 2GHz CPU & 2GB RAM
* (Minimum) 2GHz CPU & 2GB RAM
* (Recommended) 2GHz CPU & 4GB RAM

For the host where the Ansible playbook is executed (differs depending on local or remote):

* Ansible 2.4 or greater
* curl
* jq (to pretty-format API responses)
* wrk (to load test nginx & wordpress demonstrators)

Ansible
-------
Expand Down Expand Up @@ -58,6 +61,28 @@ To install curl on Ubuntu, use this command:

To install curl on other operating systems follow the `official installation guide <https://curl.haxx.se/download.html>`__.

jq
----

To install jq on Ubuntu, use this command:

::

sudo apt-get install jq

To install jq on other operating systems follow the `official installation guide <https://stedolan.github.io/jq/download/>`__.

wrk
----

To install wrk on Ubuntu, use this command:

::

sudo apt-get install wrk

To install wrk on other operating systems check the sidebar on the `github wiki <https://github.com/wg/wrk/wiki>`__.

Installation
============

Expand All @@ -68,14 +93,14 @@ Step 1: Download the ansible playbook.

::

curl --output ansible-micado-0.7.1.tar.gz -L https://github.com/micado-scale/ansible-micado/releases/download/v0.7.1/ansible-micado-0.7.1.tar.gz
tar -zxvf ansible-micado-0.7.1.tar.gz
cd ansible-micado-0.7.1/
curl --output ansible-micado-0.7.2.tar.gz -L https://github.com/micado-scale/ansible-micado/releases/download/v0.7.2/ansible-micado-0.7.2.tar.gz
tar -zxvf ansible-micado-0.7.2.tar.gz
cd ansible-micado-0.7.2/

Step 2: Specify cloud credential for instantiating MiCADO workers.
------------------------------------------------------------------

MiCADO master will use this credential to start/stop VM instances (MiCADO workers) to host the application and to realize scaling. Credentials here should belong to the same cloud as where MiCADO master is running. We recommend making a copy of our predefined template and edit it. MiCADO expects the credential in a file, called credentials-cloud-api.yml before deployment. Please, do not modify the structure of the template!
MiCADO master will use this credential against the cloud API to start/stop VM instances (MiCADO workers) to host the application and to realize scaling. Credentials here should belong to the same cloud as where MiCADO master is running. We recommend making a copy of our predefined template and edit it. MiCADO expects the credential in a file, called credentials-cloud-api.yml before deployment. Please, do not modify the structure of the template!

::

Expand Down Expand Up @@ -112,7 +137,7 @@ Specify the provisioning method for the x509 keypair used for TLS encryption of
* The 'self-signed' option generates a new keypair with the specified hostname as subject (or 'micado-master' if omitted).
* The 'user-supplied' option lets the user add the keypair as plain multiline strings (in unencrypted format) in the ansible_user_data.yml file under the 'cert' and 'key' subkeys respectively.

Specify the default username and password for the administrative we user in the the ``authentication`` subtree.
Specify the default username and password for the administrative user in the ``authentication`` subtree.

Optionally you may use the Ansible Vault mechanism as described in Step 2 to protect the confidentiality and integrity of this file as well.

Expand Down Expand Up @@ -163,7 +188,7 @@ We recommend making a copy of our predefined template and edit it. Use the templ

Edit the ``hosts`` file to set ansible variables for MiCADO master machine. Update the following parameters:

* **ansible_host**: specifies the publicly reachable ip address of MiCADO master. Set the public or floating ip of the master regardless the deployment method is remote or local. The ip specified here is used by the Dashboard for webpage redirection as well
* **ansible_host**: specifies the publicly reachable ip address of MiCADO master. Set the public or floating ``IP`` of the master regardless the deployment method is remote or local. The ip specified here is used by the Dashboard for webpage redirection as well
* **ansible_connection**: specifies how the target host can be reached. Use "ssh" for remote or "local" for local installation. In case of remote installation, make sure you can authenticate yourself against MiCADO master. We recommend to deploy your public ssh key on MiCADO master before starting the deployment
* **ansible_user**: specifies the name of your sudoer account, defaults to "ubuntu"
* **ansible_become**: specifies if account change is needed to become root, defaults to "True"
Expand Down Expand Up @@ -204,5 +229,6 @@ Accessing user-defined service

In case your application contains a container exposing a service, you will have to ensure the following to access it.

* First set **kompose.service.type: 'nodeport'** in the TOSCA description of your app. More information on this in the section of the documentation titled **application description**
* The container will be accessible at *<IP>:<port>* . Both can be found on the Kubernetes Dashboard, with **IP** under *Nodes > my_micado_vm > Addresses* and with **port** under *Discovery and load balancing > Services > my_app > Internal endpoints*
* First set **nodePort: xxxxx** (where xxxxx is a port in range 30000-32767) in the **properties: ports:** TOSCA description of your docker container. More information on this in the :ref:`applicationdescription`
* The container will be accessible at *<IP>:<port>* . Both, the IP and the port values can be extracted from the Kubernetes Dashboard (in case you forget it). The **IP** can be found under *Nodes > my_micado_vm > Addresses* menu, while the **port** can be found under *Discovery and load balancing > Services > my_app > Internal endpoints* menu.

4 changes: 2 additions & 2 deletions user_documentation/rst/index.rst
@@ -1,7 +1,7 @@
MiCADO - autoscaling framework for Kubernetes Deployments in the Cloud
###########################################################
######################################################################

This software is developed by the `COLA project <https://project-cola.eu/>`__.
This software is developed by the `COLA project <https://project-cola.eu/>`__ and is hosted at the `MiCADO-scale github repository <https://github.com/micado-scale>`__. Please, visit the `MiCADO homepage <https://www.micado-scale.eu/>`__ for general information about the product.

Introduction
************
Expand Down
27 changes: 26 additions & 1 deletion user_documentation/rst/release_notes.rst
@@ -1,7 +1,32 @@
Release Notes
*************

**v0.7.1 (10 Jan 2018)**
**v0.7.2 (25 Feb 2019)**

- add checking for minimal memory on micado master at deployment
- support private networks on cloudsigma
- support user-defined contextualisation
- support re-use across other container & cloud orchestrators in ADT
- new TOSCA to Kubernetes Manifest Adaptor
- add support for creating DaemonSets, Jobs, StatefulSets (with limited functionality) and standalone Pods
- add support for creating PersistentVolumes & PVClaims
- add support for specifying custom service details (NodePort, ClusterIP, etc.)
- minor improvements to Grafana dashboard
- support asynchronous calls through TOSCASubmitter API
- fix kubectl error on MiCADO Master restart
- fix TOSCASubmitter rollback on errors
- fix TOSCASubmitter status & output display
- add support for encrypting master-worker communication
- automatically provision and revoke security credentials for worker nodes
- update default MTU to 1400 to ensure compatibility with OpenStack and AWS
- add Credential Store security enabler
- add Security Policy Manager security enabler
- add Image Integrity Verifier Security enabler
- add Crypto Engine security enabler
- add support for kubernetes secrets
- reimplement Credential Manager using the flask-users library

**v0.7.1 (10 Jan 2019)**

- Fix: Add SKIP back to Dashboard (defaults changed in v1.13.1)
- Fix: URL not found for Kubernetes manifest files
Expand Down
36 changes: 15 additions & 21 deletions user_documentation/rst/rest_api.rst
Expand Up @@ -5,41 +5,29 @@ REST API

MiCADO has a TOSCA compliant submitter to submit, update, list and remove MiCADO applications. The submitter exposes the following REST API:

* To launch an application specified by a TOSCA description stored locally, use this command:
* To launch an application specified by a TOSCA description stored locally (with an option in bold to specify an ID):

::

curl --insecure -s -F file=@[path to the TOSCA description] -X POST https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/launch/file/
curl --insecure -s -F file=@[path to the TOSCA template] **-F id=[APPLICATION_ID]** -X POST https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/launch/

* To launch an application specified by a TOSCA description stored locally and specify an application id, use this command:
* To launch an application specified by a TOSCA description stored behind a url (with an option in bold to specify an ID):

::

curl --insecure -s -F file=@[path to the TOSCA description] -F id=[APPLICATION_ID] -X POST https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/launch/file/

* To launch an application specified by a TOSCA description stored behind a url, use this command:

::

curl --insecure -s -d input="[url to TOSCA description]" -X POST https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/launch/url/

* To launch an application specified by a TOSCA description stored behind an url and specify an application id, use this command:

::

curl --insecure -s -d input="[url to TOSCA description]" -d id=[ID] -X POST https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/launch/url/
curl --insecure -s -d input="[url to TOSCA description]" **-d id=[APPLICATION_ID]** -X POST https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/launch/

* To update a running MiCADO application using a TOSCA description stored locally, use this command:

::

curl --insecure -s -F file=@"[path to the TOSCA description]" -X PUT https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/udpate/file/[APPLICATION_ID]
curl --insecure -s -F file=@"[path to the TOSCA description]" -X PUT https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/update/[APPLICATION_ID]

* To update a running MiCADO application using a TOSCA description stored behind a url, use this command:

::

curl --insecure -s -d input="[url to TOSCA description]" -X PUT https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/udpate/file/[APPLICATION_ID]
curl --insecure -s -d input="[url to TOSCA description]" -X PUT https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/update/[APPLICATION_ID]

* To undeploy a running MiCADO application, use this command:

Expand All @@ -57,19 +45,25 @@ MiCADO has a TOSCA compliant submitter to submit, update, list and remove MiCADO

::

curl --insecure -s -X GET https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/[APPLICATION_ID]
curl --insecure -s -X GET https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/[APPLICATION_ID]/status

* To query the full execution status of MiCADO, use this command:

::

curl --insecure -s -X GET https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/info_threads

* To query the services of a running MiCADO application, use this command:

::

curl --insecure -s -X GET https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/[APPLICATION_ID]/services
curl --insecure -s -d query='services' -X GET https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/query/[APPLICATION_ID]

* To query the nodes hosting a running MiCADO application, use this command:

::

curl --insecure -s -X GET https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/[APPLICATION_ID]/nodes
curl --insecure -s -d query='nodes' -X GET https://[username]:[password]@[IP]:[port]/toscasubmitter/v1.0/app/query/[APPLICATION_ID]



0 comments on commit 66d87ed

Please sign in to comment.