drie

drie documentation

Welcome to the drie documentation. You'll find comprehensive guides and documentation to help you start working with drie as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Support

Quickstart: Deploy a ruby app

Steps to deploy a ruby app

First you need to download a copy of our demo app

> $ git clone https://github.com/drie/demo-rails-app.git                      [±master ●]
Cloning into 'demo-rails-app'...
remote: Counting objects: 73, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 73 (delta 1), reused 0 (delta 0), pack-reused 67
Unpacking objects: 100% (73/73), done.
Checking connectivity... done.
> $ cd demo-rails-app                                                         [±master ●]

This repo includes a pretty vanilla rails app with a couple of additions

> $ ls -al                                                                    [±master ✓]
total 64
drwxr-xr-x  20 drie  staff   680 17 May 14:21 .
drwxr-xr-x  13 drie  staff   442 17 May 14:18 ..
-rw-r--r--   1 drie  staff    52 17 May 14:18 .buildpacks
drwxr-xr-x  13 drie  staff   442 17 May 14:21 .git
-rw-r--r--   1 drie  staff   474 17 May 14:18 .gitignore
-rw-r--r--   1 drie  staff  1504 17 May 14:18 Gemfile
-rw-r--r--   1 drie  staff  4005 17 May 14:18 Gemfile.lock
-rw-r--r--   1 drie  staff    45 17 May 14:18 Procfile
-rw-r--r--   1 drie  staff   195 17 May 14:18 README.md
-rw-r--r--   1 drie  staff   249 17 May 14:18 Rakefile
drwxr-xr-x   8 drie  staff   272 17 May 14:18 app
drwxr-xr-x   7 drie  staff   238 17 May 14:18 bin
drwxr-xr-x  11 drie  staff   374 17 May 14:18 config
-rw-r--r--   1 drie  staff   153 17 May 14:18 config.ru
drwxr-xr-x   3 drie  staff   102 17 May 14:18 db
drwxr-xr-x   4 drie  staff   136 17 May 14:18 lib
drwxr-xr-x   3 drie  staff   102 17 May 14:18 log
drwxr-xr-x   7 drie  staff   238 17 May 14:18 public
drwxr-xr-x   9 drie  staff   306 17 May 14:18 test
drwxr-xr-x   3 drie  staff   102 17 May 14:18 vendor

The drie specific files are .buildpacks which tells us how to build your app and Procfile which tells us how to run it. You'll find some more details on these in the other guides.

Your next step is to create a new app. App names must be unique across the platform (i.e. customers can't use the same app name). In this case we've called our app oliverstone but you should pick something different.

> $ drie app add oliverstone                                                  [±master ✓]
Question: drie needs to associate this app with a remote Git repository from
          which we can build your app.
          Would you like to use https://github.com/drie/demo-rails-app.git [Y/n]: Y
Info:     Creating new app 'oliverstone' with remote repo
          'https://github.com/drie/demo-rails-app.git'.  This will take a few
          minutes.
Creating app |##############################################################|Time: 0:10:37
Info:     Your next step is probably to add some environment variables for
          your app using `drie app config --help` or, if your app doesn't use
          environment variables, you could jump straight to building and
          deploying your app using `drie app deploy --help`.

The next step is to deploy your code to the app. By default this will deploy the latest version of the master branch.

> $ drie app deploy                                                           [±master ✓]
Question: Please pick the app you'd like to use:
          (1) demo-rails-app (https://github.com/drie/demo-rails-app.git)
          (2) oliverstone (https://github.com/drie/demo-rails-app.git)
          (3) None of the above

          Your choice: 2
Info:     You haven't specified a revision to deploy.  We've assumed master.
Question: Do you wish to proceed? [Y/n]: Y
Info:     Attempting to build master; it may take a couple of minutes to start
Warning: Permanently added '[52.91.110.102]:2222' (RSA) to the list of known hosts.
Attempt to write login records by non-root user (aborting)
Info:     You've not got any instances actually up and running.  You can get
          started by running `drie app scale --help`

Rails needs some environment variables set. This is done using the following configuration command.

> $ drie app config RAILS_ENV=development                                     [±master ✓]
Question: Please pick the app you'd like to use:
          (1) demo-rails-app (https://github.com/drie/demo-rails-app.git)
          (2) oliverstone (https://github.com/drie/demo-rails-app.git)
          (3) None of the above

          Your choice: 2

You can find out what's currently happening with your app using the following command. Any other changes will be queued and bundled so that they're deployed after this one.

> $ drie app show                                                             [±master ✓]
Question: Please pick the app you'd like to use:
          (1) demo-rails-app (https://github.com/drie/demo-rails-app.git)
          (2) oliverstone (https://github.com/drie/demo-rails-app.git)
          (3) None of the above

          Your choice: 2
App oliverstone
===============
status: deployed
id: 06da3967-f2e1-4ef4-a5a1-356a0f83237b
deployed commit: c65d4bacbbee4ecdac1c82fb900eeba875e144e0
build repo: https://github.com/drie/demo-rails-app.git

web address
======
None

processes
======
0 web

config
======
REPO_URI=https://github.com/drie/demo-rails-app.git
RAILS_ENV=development

At the moment, you don't have any copies of your app running. Lets scale things up.

> $ drie app scale 1                                                          [±master ✓]
Question: Please pick the app you'd like to use:
          (1) demo-rails-app (https://github.com/drie/demo-rails-app.git)
          (2) oliverstone (https://github.com/drie/demo-rails-app.git)
          (3) None of the above

          Your choice: 2
Info:     Scaling oliverstone:web from 0 to 1
Info:     This change requires us to spin up 1 new VM(s) which can take a few
          minutes.  Check the status field in `drie app show` to see when this
          change is complete.

And see how things are going

> $ drie app show                                                             [±master ✓]
Question: Please pick the app you'd like to use:
          (1) demo-rails-app (https://github.com/drie/demo-rails-app.git)
          (2) oliverstone (https://github.com/drie/demo-rails-app.git)
          (3) None of the above

          Your choice: 2
Warning:  Your app is currently being updated, such as changing the number of
          instances or changing the version of the running app.  The following
          shows the state which we expect your app to reach in a few minutes.
          Please re-run this command for updates.
App oliverstone
===============
status: deploying
id: 06da3967-f2e1-4ef4-a5a1-356a0f83237b
deployed commit: c65d4bacbbee4ecdac1c82fb900eeba875e144e0
build repo: https://github.com/drie/demo-rails-app.git

web address
======
None

processes
======
1 web

config
======
REPO_URI=https://github.com/drie/demo-rails-app.git
RAILS_ENV=development

So far its registered that we want one copy of the app but it hasn't finished deploying yet. Wait a couple of minutes before taking another look.

> $ drie app show                                                             [±master ✓]
Question: Please pick the app you'd like to use:
          (1) demo-rails-app (https://github.com/drie/demo-rails-app.git)
          (2) oliverstone (https://github.com/drie/demo-rails-app.git)
          (3) None of the above

          Your choice: 2
Warning:  Your app is currently being updated, such as changing the number of
          instances or changing the version of the running app.  The following
          shows the state which we expect your app to reach in a few minutes.
          Please re-run this command for updates.
App oliverstone
===============
status: deploying
id: 06da3967-f2e1-4ef4-a5a1-356a0f83237b
deployed commit: c65d4bacbbee4ecdac1c82fb900eeba875e144e0
build repo: https://github.com/drie/demo-rails-app.git

web address
======
https://web_oliverstone.app.drie.co

processes
======
1 web

config
======
REPO_URI=https://github.com/drie/demo-rails-app.git
RAILS_ENV=development

You'll see that it now has a web address displayed which you can checkout your new app on.

You are now deployed! Enjoy

Quickstart: Deploy a ruby app