|
1 | 1 | :title: Concepts |
2 | | -:description: Concepts of the Deis application platform. Deploy and scale |
3 | | - twelve-factor apps. Learn about clusters, builds, releases, run and |
4 | | - backing services. |
| 2 | +:description: Deis scales Twelve-Factor apps as containers over a cluster of machines. |
5 | 3 |
|
6 | 4 | .. _concepts: |
7 | 5 |
|
8 | 6 | Concepts |
9 | 7 | ======== |
| 8 | +Deis is a lightweight, flexible and powerful application platform that |
| 9 | +deploys and scales :ref:`concepts_twelve_factor` apps as |
| 10 | +:ref:`concepts_docker` containers across :ref:`concepts_clusters` of |
| 11 | +:ref:`concepts_coreos` machines. |
10 | 12 |
|
11 | | -Deis is an application platform that deploys and scales `Twelve-Factor`_ apps |
12 | | -using clusters of `CoreOS`_ nodes, `Docker`_ containers and `Nginx`_ proxies. |
| 13 | +.. _concepts_twelve_factor: |
| 14 | + |
| 15 | +Twelve-Factor |
| 16 | +------------- |
| 17 | +The `Twelve-Factor App`_ is a DevOps manifesto for building and |
| 18 | +deploying scalable, modern applications and services. |
| 19 | + |
| 20 | +We consider it an invaluable synthesis of much experience with |
| 21 | +software-as-a-service apps in the wild, especially on the |
| 22 | +Heroku platform. |
| 23 | + |
| 24 | +Deis works best with applications in a `Twelve-Factor App`_ style. |
| 25 | +Following the twelve-factor model, Deis enforces a strict separation of |
| 26 | +the :ref:`Build and Run <concepts_build_release_run>` stages. |
| 27 | + |
| 28 | +.. _concepts_docker: |
| 29 | + |
| 30 | +Docker |
| 31 | +------ |
| 32 | +`Docker`_ is an open source project to pack, ship and run any |
| 33 | +application as a lightweight, portable, self-sufficient container. |
| 34 | + |
| 35 | +When you deploy an app with ``git push deis master``, Deis builds and |
| 36 | +packages it as a Docker image, then distributes it as Docker containers |
| 37 | +across your cluster. |
| 38 | + |
| 39 | +(Deis itself is also a set of coordinated Docker containers.) |
| 40 | + |
| 41 | +.. _concepts_coreos: |
| 42 | + |
| 43 | +CoreOS |
| 44 | +------ |
| 45 | +`CoreOS`_ is a lean new Linux distribution, rearchitected for features |
| 46 | +needed by modern infrastructure stacks and targeted at massive |
| 47 | +server deployments. |
| 48 | + |
| 49 | +Deis applications are containers running on CoreOS machines, which can |
| 50 | +be private or public cloud instances, or bare metal. CoreOS clusters |
| 51 | +allow Deis to host applications and services at scale with |
| 52 | +high resilience. |
| 53 | + |
| 54 | +Yet Deis and CoreOS run identically in a Vagrant virtual machine on |
| 55 | +your laptop, for convenient testing and rapid development. |
| 56 | + |
| 57 | +.. _concepts_clusters: |
13 | 58 |
|
14 | 59 | Clusters |
15 | 60 | -------- |
16 | | -A :ref:`cluster` is a set of nodes used to host applications |
17 | | -or services. |
| 61 | +A :ref:`cluster` is a named group of CoreOS machines, or hosts. A |
| 62 | +Deis cluster runs jobs on these hosts to distribute applications and |
| 63 | +services intelligently across its resources. |
| 64 | + |
| 65 | +Once a cluster is created with the Deis command-line client, developers |
| 66 | +can create applications and deploy them across the cluster with a simple |
| 67 | +`git push deis master` command. |
| 68 | + |
| 69 | +.. _concepts_applications: |
18 | 70 |
|
19 | 71 | Applications |
20 | 72 | ------------ |
21 | | -An :ref:`application` lives on a :ref:`cluster`, where it uses |
22 | | -:ref:`Containers <container>` to process requests and to run background tasks |
23 | | -for a deployed git repository. |
24 | | -Developers use :ref:`Applications <application>` to push code, change config, |
25 | | -scale containers, view logs, or run admin commands -- |
| 73 | +An :ref:`application`, or app, lives on a :ref:`cluster`, where it uses |
| 74 | +:ref:`Containers <container>` to process requests and run tasks for a |
| 75 | +deployed git repository. |
| 76 | + |
| 77 | +Developers use :ref:`Applications <application>` to push code, change |
| 78 | +configuration, scale containers, view logs, or run admin commands -- |
26 | 79 | regardless of the cluster's underlying infrastructure. |
27 | 80 |
|
| 81 | +.. _concepts_build_release_run: |
| 82 | + |
28 | 83 | Build, Release, Run |
29 | 84 | ------------------- |
30 | | -Deis enforces strict separation between Build and Run stages, following |
31 | | -the `Twelve-Factor model`_. |
32 | | - |
33 | | -Build Stage |
34 | | -^^^^^^^^^^^ |
35 | | -The :ref:`Controller` includes a *gitreceive* hook that receives |
36 | | -incoming git push requests over SSH and builds applications |
37 | | -inside ephemeral Docker containers. |
38 | | -Tarballs of the /app directory are extracted into a slug and exposed |
39 | | -on the Controller using an Nginx static file server. |
40 | | -The slug is later downloaded by the runtime layer and bind-mounted |
41 | | -into a Docker container for execution. |
42 | | - |
43 | | -Release Stage |
44 | | -^^^^^^^^^^^^^ |
45 | | -During the release stage, a :ref:`build` is combined with :ref:`config` |
46 | | -to create a new numbered :ref:`release`. |
47 | | -The release stage is triggered any time a new build is created or |
48 | | -config is changed, making it easy to rollback code and configuration. |
49 | | - |
50 | | -Run Stage |
51 | | -^^^^^^^^^ |
52 | | -The run stage updates Chef databags and `converges`_ all nodes in the formation. |
53 | | -The databag specifies the current application releases, |
54 | | -the placement of containers across the runtime layer, |
55 | | -and the configuration of the proxy layer. |
56 | | -SSH is used to converge nodes in runtime layers followed |
57 | | -by nodes in proxy layers, making zero downtime deployment possible. |
| 85 | + |
| 86 | +.. _concepts_backing_services: |
58 | 87 |
|
59 | 88 | Backing Services |
60 | 89 | ---------------- |
61 | | -In keeping with `Twelve-Factor`_ methodology, `backing services`_ like |
62 | | -databases, queues and storage are decoupled and attached using `environment |
63 | | -variables`_. This allows applications to use backing services provided by |
64 | | -other applications, or external/third-party services accessible over the network. |
65 | | -The use of environment variables makes it easy to swap backing services |
66 | | -when necessary. |
| 90 | +Deis treats databases, caches, storage, messaging systems, and other |
| 91 | +`backing services`_ as attached resources, in keeping with Twelve-Factor |
| 92 | +best practices. |
| 93 | + |
| 94 | +Applications can be decoupled this way, using simple |
| 95 | +`environment variables`_ to configure and attach to any services needed. |
| 96 | +Apps are then free to scale up independently, to use services provided |
| 97 | +by other apps, or to switch easily to external or third-party vendor |
| 98 | +services. |
67 | 99 |
|
68 | 100 | See Also |
69 | 101 | -------- |
70 | 102 | * :ref:`Developer Guide <developer>` |
71 | | -* :ref:`Operations Guide <developer>` |
72 | | -* `The Twelve-Factor App <http://12factor.net/>`_ |
| 103 | +* :ref:`Operations Guide <operations>` |
| 104 | +* The `Twelve-Factor App`_ |
73 | 105 |
|
74 | | -.. _`Twelve-Factor`: http://12factor.net/ |
75 | | -.. _`CoreOS`: https://coreos.com/ |
| 106 | + |
| 107 | +.. _`Twelve-Factor App`: http://12factor.net/ |
76 | 108 | .. _`Docker`: http://docker.io/ |
77 | | -.. _`Nginx`: http://wiki.nginx.org/Main |
78 | | -.. _`Chef Databag`: http://docs.opscode.com/essentials_data_bags.html |
79 | | -.. _`Twelve-Factor model`: http://12factor.net/build-release-run |
| 109 | +.. _`CoreOS`: https://coreos.com/ |
| 110 | +.. _`Build and Run`: http://12factor.net/build-release-run |
80 | 111 | .. _`backing services`: http://12factor.net/backing-services |
81 | 112 | .. _`environment variables`: http://12factor.net/config |
82 | | -.. _`converges`: http://docs.opscode.com/essentials_nodes_chef_run.html |
|
0 commit comments