Skip to content

Commit 65245e2

Browse files
author
Gabriel Monroy
committed
update readme with new app-oriented workflow
1 parent c7c6e9e commit 65245e2

1 file changed

Lines changed: 44 additions & 16 deletions

File tree

README.md

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ $ git clone https://github.com/opdemand/deis.git
5151
$ cd deis
5252
```
5353

54+
Cloning the default master branch will provide you with the latest development version
55+
of Deis. If you want to deploy the latest stable release, make sure you checkout the
56+
most recent tag using ``git checkout vX.Y.Z``.
57+
5458
### 2. Configure the Chef Server
5559

5660
Deis requires a Chef Server. [Sign up for a free Hosted Chef account](https://getchef.opscode.com/signup) if you don’t have one. You’ll also need a Ruby runtime with RubyGems in order to install the required Ruby dependencies.
@@ -67,11 +71,11 @@ The [Amazon EC2 API Tools](http://aws.amazon.com/developertools/351) will be use
6771

6872
$ contrib/provision-ec2-controller.sh
6973

70-
Once the `deis-controller` node exists on the Chef server, you *must* log in to the WebUI add deis-controller to the `admins` group. This is required so the controller can delete the node and client records for any nodes bootstrapped during future `layers:scale` operations.
74+
Once the `deis-controller` node exists on the Chef server, you *must* log in to the WebUI add deis-controller to the `admins` group. This is required so the controller can delete node and client records during future scaling operations.
7175

7276
### 4. Install the Deis Client
7377

74-
Install the Deis client using [Pip](http://www.pip-installer.org/en/latest/installing.html). Registration will discover SSH keys automatically and use the [standard environment variables](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html#set_aws_credentials_linux) to configure the EC2 provider.
78+
Install the Deis client using [Pip](http://www.pip-installer.org/en/latest/installing.html) (for latest stable) or by linking `<repo>/client/deis.py` to `/usr/local/bin/deis` (for dev version). Registration will discover SSH keys automatically and use the [standard environment variables](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html#set_aws_credentials_linux) to configure the EC2 provider.
7579

7680
```bash
7781
$ sudo pip install deis
@@ -94,29 +98,41 @@ Uploading EC2 credentials... done
9498

9599
### 5. Create & Scale a Formation
96100

97-
Find an application you’d like to deploy, or clone [an example app](https://github.com/opdemand/example-nodejs-express). Change into the application directory and use `deis create` to initialize a new formation in a specific EC2 region. Use the `deis layers:scale` command to provision nodes that will be dedicated to this formation.
101+
Use the Deis client to create a new formation named "dev" that
102+
has a default layer that serves as both runtime (hosts containers)
103+
and proxy (routes traffic to containers). Scale the default layer
104+
up to two nodes.
98105

99106
```bash
100-
$ cd <my-application-repo>
101-
$ deis create --flavor=ec2-us-west-2
102-
Creating formation... done, created peachy-waxworks
103-
Git remote deis added
107+
$ deis formations:create dev --flavor=ec2-us-west-2
108+
Creating formation... done, created dev
104109

105-
Creating runtime layer... done
106-
Creating proxy layer... done
110+
Creating runtime layer... done in 1s
107111

108-
Use deis layers:scale proxy=1 runtime=1 to scale a basic formation
112+
Use `deis nodes:scale dev runtime=1` to scale a basic formation
109113

110-
$ deis layers:scale proxy=1 runtime=1
111-
Scaling layers... but first, coffee!
112-
...done in 232s
114+
$ deis nodes:scale dev runtime=2
115+
Scaling nodes... but first, coffee!
116+
...done in 251s
113117

114-
Use `git push deis master` to deploy to your formation
118+
Use `deis create --formation=dev` to create an application
115119
```
116120

117-
### 6. Deploy your Application
121+
### 6. Deploy & Scale an Application
122+
123+
Change into your application directory and use ``deis create --formation=dev``
124+
to create a new application attached to the dev formation.
125+
126+
To deploy the application, use `git push deis master`.
127+
Deis will automatically deploy Docker containers
128+
and configure Nginx proxies to route requests to your application.
118129

119-
Use `git push deis master` to deploy your application. Deis will automatically deploy Docker containers and configure Nginx proxies to route requests to your application. To learn more, use `deis help` or browse [the documentation](http://docs.deis.io).
130+
Once your application is deployed, you use ``deis scale web=4`` to
131+
scale up web containers. You can also use ``deis logs`` to view
132+
aggregated application logs, or ``deis run`` to run one-off admin
133+
commands inside your application.
134+
135+
To learn more, use `deis help` or browse [the documentation](http://docs.deis.io).
120136

121137
```bash
122138
$ git push deis master
@@ -142,6 +158,18 @@ Total 146 (delta 84), reused 47 (delta 22)
142158

143159
$ curl -s http://ec2-198.51.100.36.us-west-2.compute.amazonaws.com
144160
Powered by Deis!
161+
162+
$ deis scale web=4
163+
Scaling containers... but first, coffee!
164+
done in 12s
165+
166+
=== peachy-waxworks Containers
167+
168+
--- web: `node server.js`
169+
web.1 up 2013-09-23T19:02:30.745Z (dev-runtime-2)
170+
web.2 up 2013-09-23T19:36:48.741Z (dev-runtime-1)
171+
web.3 up 2013-09-23T19:36:48.758Z (dev-runtime-1)
172+
web.4 up 2013-09-23T19:36:48.771Z (dev-runtime-2)
145173
```
146174

147175
## Credits

0 commit comments

Comments
 (0)