Skip to content

Commit a4ffa1f

Browse files
committed
Added the installation doc, from the project README.
1 parent cbe5145 commit a4ffa1f

2 files changed

Lines changed: 191 additions & 12 deletions

File tree

docs/contributing/devsetup.rst

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ To contribute code back to Deis, you must also have a GitHub.com account
3030
in order to create a pull request.
3131

3232

33-
Fetch Git Repositories
34-
----------------------
33+
Clone the Deis Repositories
34+
---------------------------
3535

3636
.. code-block:: console
3737
@@ -69,19 +69,35 @@ Please see the `virtualenv documentation`_ for more details on python virtual
6969
environments.
7070

7171

72-
Install knife.rb
73-
----------------
72+
Configure the Chef Server
73+
-------------------------
74+
75+
Deis requires a Chef Server. `Sign up for a free Hosted Chef
76+
account`_ if you don’t have one. You’ll also need a `Ruby`_ runtime with RubyGems
77+
in order to install the required Ruby dependencies.
78+
79+
.. code-block:: console
80+
81+
$ bundle install # install ruby dependencies
82+
$ berks install # install cookbooks into your local berkshelf
83+
$ berks upload # upload cookbooks to the chef server
7484
75-
** Coming soon... ***
7685
7786
78-
Set Up a Chef Account
79-
---------------------
87+
Provision a Deis Controller
88+
---------------------------
89+
90+
The `Amazon EC2 API Tools`_ will be used to setup basic EC2 infrastructure.
91+
The `Knife EC2 plugin`_ will be used to bootstrap the controller.
92+
93+
.. code-block:: console
8094
81-
** Coming soon... ***
95+
$ contrib/provision-ec2-controller.sh
8296
8397
8498
.. _`virtualenv documentation`: http://www.virtualenv.org/en/latest/
8599
.. _`Python`: http://python.org/
86100
.. _`Ruby`: http://ruby-lang.org/
87101
.. _`Amazon EC2 API Tools`: http://aws.amazon.com/developertools/Amazon-EC2/351
102+
.. _`Sign up for a free Hosted Chef account`: https://getchef.opscode.com/signup
103+
.. _`Knife EC2 plugin`: https://github.com/opscode/knife-ec2

docs/gettingstarted/installation.rst

Lines changed: 167 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,171 @@
77
Installation
88
============
99

10-
A typical Deis deployment consists of a Deis `Controller`_ in charge of:
10+
.. commented-out
11+
A typical Deis deployment consists of a Deis `Controller`_ in charge of:
1112
12-
* Processing :ref:`Client API <client>` calls
13-
* Managing Chef :ref:`Nodes <node>`
14-
* Managing Docker :ref:`Containers <container>`
13+
* Processing :ref:`Client API <client>` calls
14+
* Managing Chef :ref:`Nodes <node>`
15+
* Managing Docker :ref:`Containers <container>`
16+
17+
18+
Follow the steps below to install your own Deis platform on EC2. To complete the
19+
installation process, you will need `Git`_, `RubyGems`_, `Pip`_, the `Amazon EC2 API Tools`_,
20+
`EC2 Credentials`_, and a Chef Server with a working `Knife`_ client.
21+
22+
*Please note: Deis is still under active development. It should not yet be used in production.*
23+
24+
1. Clone the Deis Repository
25+
----------------------------
26+
27+
.. code-block:: console
28+
29+
$ git clone https://github.com/opdemand/deis.git
30+
$ cd deis
31+
32+
2. Configure the Chef Server
33+
----------------------------
34+
35+
Deis requires a Chef Server. `Sign up for a free Hosted Chef account`_ if you don’t have one.
36+
You’ll also need a `Ruby`_ runtime with `RubyGems`_ in order to install the required
37+
Ruby dependencies.
38+
39+
.. code-block:: console
40+
41+
$ bundle install # install ruby dependencies
42+
$ berks install # install cookbooks into your local berkshelf
43+
$ berks upload # upload cookbooks to the chef server
44+
45+
46+
3. Provision a Deis Controller
47+
------------------------------
48+
49+
The `Amazon EC2 API Tools`_ will be used to setup basic EC2 infrastructure. The
50+
`Knife`_ EC2 plugin will be used to bootstrap the controller.
51+
52+
.. code-block:: console
53+
54+
$ contrib/provision-ec2-controller.sh
55+
usage: contrib/provision-ec2-controller.sh [region]
56+
$ contrib/provision-ec2-controller.sh us-west-2
57+
Creating security group: deis-controller
58+
+ ec2-create-group deis-controller -d 'Created by Deis'
59+
GROUP sg-7c40f317 deis-controller Created by Deis
60+
+ set +x
61+
Authorizing TCP ports 22,80,443 from 0.0.0.0/0...
62+
+ ec2-authorize deis-controller -P tcp -p 22 -s 0.0.0.0/0
63+
+ ec2-authorize deis-controller -P tcp -p 80 -s 0.0.0.0/0
64+
+ ec2-authorize deis-controller -P tcp -p 443 -s 0.0.0.0/0
65+
+ set +x
66+
Creating new SSH key: deis-controller
67+
+ ec2-create-keypair deis-controller
68+
+ chmod 600 /home/myuser/.ssh/deis-controller
69+
+ set +x
70+
Saved to /home/myuser/.ssh/deis-controller
71+
Created data_bag[deis-build]
72+
Created data_bag[deis-formations]
73+
Updated data_bag_item[deis-build::gitosis]
74+
Provisioning deis-controller with knife ec2...
75+
...
76+
77+
78+
4. Install the Deis Client
79+
--------------------------
80+
81+
Install the Deis client using `Pip`_. Registration will discover SSH keys
82+
automatically and use the `standard environment variables`_ to configure the EC2 provider.
83+
84+
.. code-block:: console
85+
86+
$ sudo pip install deis
87+
$ deis register http://my-deis-controller.fqdn
88+
username: myuser
89+
password:
90+
email: myuser@example.com
91+
Registered myuser
92+
Logged in as myuser
93+
94+
Found the following SSH public keys:
95+
1) id_rsa.pub
96+
Which would you like to use with Deis? 1
97+
Uploading /Users/myuser/.ssh/id_rsa.pub to Deis... done
98+
99+
Found EC2 credentials: AKIAJTVXXXXXXXXXXXXX
100+
Import these credentials? (y/n) : y
101+
Uploading EC2 credentials... done
102+
103+
104+
5. Create & Scale a Formation
105+
-----------------------------
106+
107+
Find an application you’d like to deploy, or clone `an example app`.
108+
Change into the application directory and use `deis create` to initialize a
109+
new formation in a specific EC2 region. Use the `deis layers:scale` command
110+
to provision nodes that will be dedicated to this formation.
111+
112+
.. code-block:: console
113+
114+
$ cd <my-application-repo>
115+
$ deis create --flavor=ec2-us-west-2
116+
Creating formation... done, created peachy-waxworks
117+
Git remote deis added
118+
119+
Creating runtime layer... done
120+
Creating proxy layer... done
121+
122+
Use deis layers:scale proxy=1 runtime=1 to scale a basic formation
123+
124+
$ deis layers:scale proxy=1 runtime=1
125+
Scaling layers... but first, coffee!
126+
...done in 232s
127+
128+
Use `git push deis master` to deploy to your formation
129+
130+
131+
6. Deploy your Application
132+
--------------------------
133+
134+
Use `git push deis master` to deploy your application. Deis will
135+
automatically deploy Docker containers and configure Nginx proxies to
136+
route requests to your application.
137+
138+
To learn more, use `deis help` or browse `the documentation`_.
139+
140+
.. code-block:: console
141+
142+
$ git push deis master
143+
Counting objects: 146, done.
144+
Delta compression using up to 8 threads.
145+
Compressing objects: 100% (122/122), done.
146+
Writing objects: 100% (146/146), 21.54 KiB, done.
147+
Total 146 (delta 84), reused 47 (delta 22)
148+
Node.js app detected
149+
-----> Resolving engine versions
150+
Using Node.js version: 0.10.15
151+
Using npm version: 1.2.30
152+
...
153+
-----> Building runtime environment
154+
-----> Discovering process types
155+
Procfile declares types -> web
156+
157+
-----> Compiled slug size: 4.7 MB
158+
Launching... done, v2
159+
160+
-----> peachy-waxworks deployed to Deis
161+
http://ec2-54-214-143-104.us-west-2.compute.amazonaws.com ...
162+
163+
$ curl -s http://ec2-54-214-143-104.us-west-2.compute.amazonaws.com
164+
Powered by Deis!
165+
166+
167+
.. _`Git`: http://git-scm.com
168+
.. _`RubyGems`: http://rubygems.org/pages/download
169+
.. _`Pip`: http://www.pip-installer.org/en/latest/installing.html
170+
.. _`Amazon EC2 API Tools`: http://aws.amazon.com/developertools/Amazon-EC2/351
171+
.. _`EC2 Credentials`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html#set_aws_credentials_linux
172+
.. _`Knife`: http://docs.opscode.com/knife.html
173+
.. _`Sign up for a free Hosted Chef account`: https://getchef.opscode.com/signup
174+
.. _`Ruby`: http://ruby-lang.org/
175+
.. _`standard environment variables`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html#set_aws_credentials_linux
176+
.. _`an example app`: https://github.com/opdemand/example-nodejs-express
177+
.. _`the documentation`: http://docs.deis.io/

0 commit comments

Comments
 (0)