@@ -16,49 +16,58 @@ VirtualBox.
1616------------------------------
1717
1818The ``Vagrantfile `` in the project root has the configuration for a Deis
19- controller. It will first need to download a base image "deis-base," which
19+ controller. Vagrant will first need to download a base image "deis-base," which
2020may take a while.
2121
22- Run the Vagrant provisioning script, which takes several minutes to complete:
22+ Run the Vagrant provisioning script, which takes several minutes to complete.
23+ Pay attention, because it will ask for confirmation that an SSH key can be
24+ added to your $HOME/.ssh/authorized_keys file:
2325
2426.. code-block :: console
2527
26- $ ./contrib/ec2/provision-ec2-controller.sh us-west-2
27- Creating security group: deis-controller
28- + ec2-create-group deis-controller -d 'Created by Deis'
29- GROUP sg-fe82aaaa deis-controller Created by Deis
30- + set +x
31- Authorizing TCP ports 22,80,443,514 from 0.0.0.0/0...
32- + ec2-authorize deis-controller -P tcp -p 22 -s 0.0.0.0/0
33- + ec2-authorize deis-controller -P tcp -p 80 -s 0.0.0.0/0
28+ $ ./contrib/vagrant/provision-controller.sh
29+ Created data_bag[deis-users]
30+ Created data_bag[deis-formations]
31+ Created data_bag[deis-apps]
32+ Booting deis-controller with 'vagrant up'
33+ ~/Projects/deis ~/Projects/deis
34+ Bringing machine 'default' up with 'virtualbox' provider...
35+ [default] Importing base box 'deis-node'...
36+ [default] Matching MAC address for NAT networking...
37+ ...
38+ [default] Running: inline script
39+ stdin: is not a tty
40+ avahi-daemon stop/waiting
41+ avahi-daemon start/running, process 1366
42+ Add the Deis Controller's SSH key to your authorized_keys file? y
43+ Generating public/private rsa key pair.
44+ Your identification has been saved in /home/vagrant/.ssh/id_rsa.
3445 ...
35- ec2-198-51-100-22.us-west-2.compute.amazonaws.com
36- ec2-198-51-100-22.us-west-2.compute.amazonaws.com Chef Client finished, 74 resources updated
37- Instance ID: i-2be2411c
38- Flavor: m1.large
39- Image: ami-ca63fafa
40- Region: us-west-2
41- Availability Zone: us-west-2b
42- Security Groups: deis-controller
43- Public DNS Name: ec2-198-51-100-22.us-west-2.compute.amazonaws.com
44- Public IP Address: 198.51.100.22
45- Run List: recipe[deis::controller]
46+ deis-controller.local - execute "bash" "/tmp/chef-script20131107-1476-la5wbp"
47+ deis-controller.local
48+ deis-controller.local
49+ deis-controller.local
50+ deis-controller.local Chef Client finished, 77 resources updated
51+ deis-controller.local
4652 + set +x
53+ Updating Django site object from 'example.com' to 'deis-controller'...
54+ Site object updated.
55+ ~/Projects/deis
4756 Please ensure that "deis-controller" is added to the Chef "admins" group.
4857
4958 .. include :: steps3-4.txt
5059
51605. Register With the Controller
5261-------------------------------
5362
54- Registration will discover SSH keys automatically and use the
55- ` standard environment variables `_ ** AWS_ACCESS_KEY ** and ** AWS_SECRET_KEY ** to
56- configure the EC2 provider with your credentials .
63+ Registration will discover the local Deis controller running in Vagrant and
64+ set up the necessary provider entry so that the controller can SSH back to
65+ the host, which is necessary to run "vagrant up" and thus scale nodes .
5766
5867.. code-block :: console
5968
6069 $ sudo pip install deis
61- $ deis register http://deis.example.com
70+ $ deis register http://deis-controller.local
6271 username: myuser
6372 password:
6473 password (confirm):
@@ -71,9 +80,8 @@ configure the EC2 provider with your credentials.
7180 Which would you like to use with Deis? 1
7281 Uploading /Users/myuser/.ssh/id_rsa.pub to Deis... done
7382
74- Found EC2 credentials: AKIAJTVXXXXXXXXXXXXX
75- Import these credentials? (y/n) : y
76- Uploading EC2 credentials... done
83+ Detected locally running Deis Controller VM
84+ Activating Vagrant as a provider... done
7785
7886 6. Deploy a Formation and App
7987-----------------------------
@@ -82,10 +90,8 @@ Create a formation and scale it:
8290
8391.. code-block :: console
8492
85- $ deis formations:create dev --flavor=ec2-us-west-2
93+ $ deis formations:create dev --flavor=vagrant-1024
8694 $ deis nodes:scale dev runtime=1
8795
8896 .. include :: step6.txt
8997
90- .. _`Amazon EC2 API Tools` : http://aws.amazon.com/developertools/Amazon-EC2/351
91- .. _`standard environment variables` : http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html#set_aws_credentials_linux
0 commit comments