Skip to content

Commit a27500b

Browse files
author
Gabriel Monroy
committed
initial pass at developer guide and operations guide
1 parent 946c5a7 commit a27500b

52 files changed

Lines changed: 1233 additions & 201 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/deis.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -625,17 +625,10 @@ def auth_register(self, args):
625625
'<controller>': controller}
626626
if self.auth_login(login_args) is False:
627627
print('Login failed')
628-
return
629-
print()
630-
self.keys_add({})
631-
print()
632-
self.providers_discover({})
633-
print()
634-
print('Use `deis formations:create <id> --flavor=ec2-us-east-1`'
635-
' to create a new formation')
636628
else:
637629
print('Registration failed', response.content)
638630
return False
631+
return True
639632

640633
def auth_cancel(self, args):
641634
"""
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/components/flavor.rst

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
:title: Flavor
2+
:description: A Deis flavor defines the configuration for nodes in a layer, including their provider type and launch parameters.
3+
:keywords: flavor, deis, nodes, configuration
4+
5+
.. _flavor:
6+
7+
Flavor
8+
======
9+
A flavor defines the configuration for :ref:`Nodes <node>` in a :ref:`Layer`.
10+
Flavors are used by the :ref:`Provider` API to customize cloud server configuration.
11+
Configuration parameters include region/location, server size and OS image.
12+
13+
Default Flavors
14+
---------------
15+
Each Deis user account contains a set of default :ref:`Flavors <flavor>`
16+
for each :ref:`provider`. Typically, there is one flavor for each region/location.
17+
In the case of the EC2 provider, the default flavors include:
18+
19+
* ec2-us-east-1
20+
* ec2-us-west-1
21+
* ec2-us-west-2
22+
* ec2-eu-west-1
23+
* ec2-ap-northeast-1
24+
* ec2-ap-southeast-1
25+
* ec2-ap-southeast-2
26+
* ec2-sa-east-1
27+
28+
Each of these default flavors uses a specific instance size and an optimized EC2 AMI
29+
that speeds boot times during scale operations. Other providers come with default
30+
flavors that are similarly optimized.
31+
32+
Creating a Flavor
33+
-----------------
34+
Let's create a new flavor from scratch using the EC2 provider. Our goals are:
35+
36+
#. Use the us-east-1 region
37+
#. Use a custom base image (EC2 AMI)
38+
#. Use the m1.large instance type
39+
40+
To create the flavor we'll use the "deis flavors:create" command.
41+
We must pass it a name for the flavor (ec2-custom), the provider type (ec2)
42+
and some JSON that defines the configuration we want.
43+
44+
.. code-block:: console
45+
46+
$ deis flavors:create ec2-custom --provider=ec2 --params='
47+
> {"region": "us-east-1", "image": "ami-fa99c193", "size": "m1.large"}'
48+
ec2-custom
49+
50+
.. info:
51+
Each provider supports different JSON fields. Consult the provider
52+
documentation under Server Reference for more details.
53+
54+
Nice work! We now have an "ec2-custom" flavor built to our specifications.
55+
56+
Viewing a Flavor
57+
----------------
58+
To make sure a flavor is correct, we can use "deis flavors:info".
59+
60+
.. code-block:: console
61+
62+
$ deis flavors:info ec2-custom
63+
{
64+
"updated": "2013-11-26T22:15:34.520Z",
65+
"uuid": "86213a3e-62f6-4d9b-91a9-7cf65c33ba6f",
66+
"created": "2013-11-26T22:15:34.520Z",
67+
"params": "{\"region\": \"us-east-1\", \"image\": \"ami-fa99c193\", \"size\": \"m1.large\"}",
68+
"provider": "ec2",
69+
"owner": "gabrtv",
70+
"id": "ec2-custom"
71+
}
72+
73+
Updating a Flavor
74+
-----------------
75+
Let's go back and hardcode a zone in our "ec2-custom" flavor. The process is similar:
76+
77+
.. code-block:: console
78+
79+
$ deis flavors:update ec2-custom '{"zone": "us-east-1a"}'
80+
{
81+
"updated": "2013-11-26T22:25:17.260Z",
82+
"uuid": "86213a3e-62f6-4d9b-91a9-7cf65c33ba6f",
83+
"created": "2013-11-26T22:15:34.520Z",
84+
"params": "{\"region\": \"us-east-1\", \"image\": \"ami-fa99c193\", \"zone\": \"us-east-1a\", \"size\": \"m1.large\"}",
85+
"provider": "ec2",
86+
"owner": "gabrtv",
87+
"id": "ec2-custom"
88+
}
89+
90+
Great. We now have our zone inside the "params" field.
91+
Notice how the other fields were kept even though we didn't specify, for example, a region.
92+
This behavior makes it easy to update flavors in place.
93+
94+
Deleting a Flavor
95+
-----------------
96+
Before you delete a flavor, make sure servers in Deis-land aren't using it.
97+
The "deis flavors:delete" command is simple.
98+
99+
.. code-block:: console
100+
101+
$ deis flavors:delete ec2-custom

docs/components/formation.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,62 @@ Formation
99
A :ref:`formation` is a set of infrastructure used to host :ref:`Applications <application>`.
1010
Each formation includes :ref:`Layers <layer>` of :ref:`Nodes <node>`
1111
that provide different services to the formation.
12+
13+
Creating a Formation
14+
--------------------
15+
Creating a formation is easy...
16+
17+
.. code-block:: console
18+
19+
$ deis formations:create test
20+
Creating formation... done, created test
21+
22+
Viewing a Formation
23+
-------------------
24+
We can take a peek at our new formation using "deis formations:info":
25+
26+
.. code-block:: console
27+
28+
$ deis formations:info test
29+
=== test Formation
30+
{
31+
"updated": "2013-11-26T22:43:37.854Z",
32+
"uuid": "6955c2a8-8505-413b-90b2-305daebdbbf9",
33+
"created": "2013-11-26T22:43:37.854Z",
34+
"domain": null,
35+
"owner": "gabrtv",
36+
"nodes": "{}",
37+
"id": "test"
38+
}
39+
40+
=== test Layers
41+
42+
=== test Nodes
43+
44+
This formation has no :ref:`Layers <layer>` and no :ref:`Nodes <node>`
45+
-- so it can't do much yet.
46+
It's also important to note that "domain" is null.
47+
Without a domain a formation can only host one application at a time.
48+
49+
Updating a Formation
50+
--------------------
51+
We can update the formation with "deis formations:update". Let's give our
52+
formation a "domain" so we can have it host multiple applications later
53+
once we scale some proxy nodes and setup wildcard DNS.
54+
55+
.. code-block:: console
56+
57+
$ deis formations:update test --domain=deisapp.com
58+
{
59+
"updated": "2013-11-26T22:54:46.708Z",
60+
"uuid": "6955c2a8-8505-413b-90b2-305daebdbbf9",
61+
"created": "2013-11-26T22:43:37.854Z",
62+
"domain": "deisapp.com",
63+
"owner": "gabrtv",
64+
"nodes": "{}",
65+
"id": "test"
66+
}
67+
68+
Converging a Formation
69+
----------------------
70+
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
:title: Terms
2-
:description: Deis Terminology
3-
:keywords: terms, terminology, glossary
1+
:title: Deis Components, Usage and Terminolody
2+
:description: Deis Components, Usage and Terminology
3+
:keywords: components, usage, terms, terminology, glossary
44

5-
.. _terms:
5+
.. _components:
66

77

8-
Terms
9-
=====
8+
Components
9+
==========
1010

1111
.. toctree::
1212
:maxdepth: 1
File renamed without changes.

0 commit comments

Comments
 (0)