Skip to content

Commit ce2afc6

Browse files
committed
Started on docs
1 parent 03ed368 commit ce2afc6

1 file changed

Lines changed: 100 additions & 2 deletions

File tree

docs/installation/vagrant.rst

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,105 @@
55
Vagrant Installation
66
====================
77

8-
**COMING SOON**
8+
For trying out Deis, or for doing development on Deis, you can provision a
9+
controller using Vagrant and VirtualBox. We recommend you use the binary
10+
installer of Vagrant 1.3.5 from vagrantup.com and the 4.2.18 version of
11+
VirtualBox.
912

10-
For now, please consult the contrib/vagrant/README.md file in the source code.
13+
.. include:: steps1-2.txt
1114

15+
3. Provision a Deis Controller
16+
------------------------------
17+
18+
The `Amazon EC2 API Tools`_ are used by the provisioning script to create an
19+
EC2 Security Group and Keypair. Please install them and ensure they are
20+
available in your $PATH:
21+
22+
.. code-block:: console
23+
24+
$ ec2-describe-regions # List regions to see if EC2 tools work
25+
REGION eu-west-1 ec2.eu-west-1.amazonaws.com
26+
REGION sa-east-1 ec2.sa-east-1.amazonaws.com
27+
...
28+
29+
The `knife`_ EC2 plugin is used to bootstrap the controller. It should
30+
have been installed by ``bundle install``:
31+
32+
.. code-block:: console
33+
34+
$ knife ec2 flavor list # List instance types to see if knife-ec2 works
35+
ID Name
36+
c1.medium High-CPU Medium
37+
c1.xlarge High-CPU Extra Large
38+
...
39+
40+
Run the EC2 provisioning script, which takes several minutes to complete:
41+
42+
.. code-block:: console
43+
44+
$ ./contrib/ec2/provision-ec2-controller.sh us-west-2
45+
Creating security group: deis-controller
46+
+ ec2-create-group deis-controller -d 'Created by Deis'
47+
GROUP sg-fe82aaaa deis-controller Created by Deis
48+
+ set +x
49+
Authorizing TCP ports 22,80,443,514 from 0.0.0.0/0...
50+
+ ec2-authorize deis-controller -P tcp -p 22 -s 0.0.0.0/0
51+
+ ec2-authorize deis-controller -P tcp -p 80 -s 0.0.0.0/0
52+
...
53+
ec2-198-51-100-22.us-west-2.compute.amazonaws.com
54+
ec2-198-51-100-22.us-west-2.compute.amazonaws.com Chef Client finished, 74 resources updated
55+
Instance ID: i-2be2411c
56+
Flavor: m1.large
57+
Image: ami-ca63fafa
58+
Region: us-west-2
59+
Availability Zone: us-west-2b
60+
Security Groups: deis-controller
61+
Public DNS Name: ec2-198-51-100-22.us-west-2.compute.amazonaws.com
62+
Public IP Address: 198.51.100.22
63+
Run List: recipe[deis::controller]
64+
+ set +x
65+
Please ensure that "deis-controller" is added to the Chef "admins" group.
66+
67+
.. include:: steps3-4.txt
68+
69+
5. Register With the Controller
70+
-------------------------------
71+
72+
Registration will discover SSH keys automatically and use the
73+
`standard environment variables`_ **AWS_ACCESS_KEY** and **AWS_SECRET_KEY** to
74+
configure the EC2 provider with your credentials.
75+
76+
.. code-block:: console
77+
78+
$ sudo pip install deis
79+
$ deis register http://deis.example.com
80+
username: myuser
81+
password:
82+
password (confirm):
83+
email: myuser@example.com
84+
Registered myuser
85+
Logged in as myuser
86+
87+
Found the following SSH public keys:
88+
1) id_rsa.pub
89+
Which would you like to use with Deis? 1
90+
Uploading /Users/myuser/.ssh/id_rsa.pub to Deis... done
91+
92+
Found EC2 credentials: AKIAJTVXXXXXXXXXXXXX
93+
Import these credentials? (y/n) : y
94+
Uploading EC2 credentials... done
95+
96+
6. Deploy a Formation and App
97+
-----------------------------
98+
99+
Create a formation and scale it:
100+
101+
.. code-block:: console
102+
103+
$ deis formations:create dev --flavor=ec2-us-west-2
104+
$ deis nodes:scale dev runtime=1
105+
106+
.. include:: step6.txt
107+
108+
.. _`Amazon EC2 API Tools`: http://aws.amazon.com/developertools/Amazon-EC2/351
109+
.. _`standard environment variables`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html#set_aws_credentials_linux

0 commit comments

Comments
 (0)