Skip to content

Commit 46f5f9e

Browse files
committed
chore(deploy): deploy your first application
1 parent bbdc0a6 commit 46f5f9e

1 file changed

Lines changed: 88 additions & 5 deletions

File tree

src/quickstart/deploy-an-app.md

Lines changed: 88 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,94 @@
1+
## Register an Admin User
2+
3+
The first user to register against Deis Workflow will automatically be given administrative privileges.
4+
5+
6+
Using the DNS hostname from the previous step, let's create our admin user:
7+
8+
```
9+
$ deis register http://deis.104.197.125.75.nip.io
10+
username: admin
11+
password:
12+
password (confirm):
13+
email: jhansen@deis.com
14+
Registered admin
15+
Logged in as admin
16+
$ deis whoami
17+
You are admin at http://deis.104.197.125.75.nip.io
18+
```
19+
20+
You have now registered your first user and you are ready to deploy an application.
21+
22+
## Deploy an Application
23+
24+
Deis Workflow supports three different types of applications, Buildpacks,
25+
Dockerfiles and Docker Images. Our first application will be a simple Docker
26+
Image-based application, so you don't have to wrestle with checking out code.
27+
28+
Run `deis create` to create a new application on Deis Workflow. If you do not
29+
specify a name for your application, Workflow automatically generates a
30+
friendly (and sometimes funny) name.
31+
132
```
2-
deis register
33+
$ deis create --no-remote
34+
Creating Application... done, created proper-barbecue
35+
remote available at ssh://git@deis.104.197.125.75.nip.io:2222/proper-barbecue.git
336
```
437

38+
Our application has been created and named `proper-barbecue`. As with the
39+
`deis` hostname, any HTTP traffic to `proper-barbecue` will be automatically
40+
routed to your application pods by the edge router.
41+
42+
Let's use the CLI to tell the platform to deploy an application and then use curl to send a request to the app:
43+
544
```
6-
deis create my-first-app --no-remote
7-
deis pull deis/example-go -a my-first-app
8-
deis config:set POWERED_BY="Docker Images + Kubernetes"
45+
$ deis pull deis/example-go -a proper-barbecue
46+
Creating build... done
47+
$ curl http://proper-barbecue.104.197.125.75.nip.io
48+
Powered by Deis
949
```
1050

11-
Link to application reference page.
51+
!!! note
52+
If you see a 404 error, make sure you specified your application name with `-a <appname>`!
53+
54+
Workflow's edge router knows all about application names and automatically
55+
sends traffic to the right application. The router sends traffic for
56+
`proper-barbecue.104.197.125.75.nip.io` to your app, just like
57+
`deis.104.197.125.75.nip.io` was sent to the Workflow API service.
58+
59+
## Change Application Configuration
60+
61+
Next, let's change some configuration using the CLI. Our example app is built
62+
to read configuration from the environment. By using `deis config:set` we can
63+
change how the application behaves:
64+
65+
```
66+
$ deis config:set POWERED_BY="Docker Images + Kubernetes" -a proper-barbecue
67+
Creating config... done
68+
69+
=== proper-barbecue Config
70+
POWERED_BY Docker Images + Kubernetes
71+
```
72+
73+
Behind the scenes, Workflow creates a new release for your application and uses
74+
Kubernetes to provide a zero-downtime rolling deploy to the new release!
75+
76+
Validate that our configuration change has worked:
77+
78+
```
79+
$ curl http://proper-barbecue.104.197.125.75.nip.io
80+
Powered by Docker Images + Kubernetes
81+
```
82+
83+
Congratulations! You have deployed your first application using Deis Workflow.
84+
There is a lot more you can do with Deis Workflow, play around with the CLI:
85+
86+
* You may scale your app with `deis scale cmd=5 -a proper-barbecue`
87+
* Roll back to a previous release with `deis rollback -a proper-barbecue`
88+
* See application logs with `deis logs -a proper-barbecue`
89+
* Try one of our other example applications like:
90+
* [deis/example-ruby-sinatra](https://github.com/deis/example-ruby-sinatra)
91+
* [deis/example-nodejs-express](https://github.com/deis/example-nodejs-express)
92+
* [deis/example-java-jetty](https://github.com/deis/example-java-jetty)
93+
* Read about using application [Buildpacks](../../applications/using-buildpacks) or [Dockerfiles](../../applications/using-dockerfiles.md)
94+
* Join our [#community slack channel](https://slack.deis.io) and meet the team!

0 commit comments

Comments
 (0)