github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/website/source/docs/commands/compile.html.md.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: compile"
     4  sidebar_current: "docs-commands-compile"
     5  description: >
     6    The compile command prepares Otto to manage your application.
     7  ---
     8  
     9  # Command: compile
    10  
    11  The `compile` command tells Otto to prepare to manage your application. Otto
    12  configures itself with smart defaults by detecting what kind of application
    13  exists in the current directory. Using the optional
    14  [Appfile](/docs/appfile/index.html), you can also add specific config to
    15  override or modify Otto's default.
    16  
    17  Otto then generates all the [Vagrant](https://www.vagrantup.com),
    18  [Packer](https://www.packer.io), and [Terraform](https://www.terraform.io) config
    19  necessary to develop, build, and deploy your application. These generated
    20  configs are stored under the `.otto` directory for easy inspection. (Otto only
    21  stores local data in the `.otto` - it is not meant to be checked in to version
    22  control.)
    23  
    24  During compilation, Otto also generates a unique identifier for your app and
    25  stores this in `.ottoid`. This helps ensure that multiple applications deployed
    26  into the same infrastructure will not collide or be duplicated. This file
    27  should be checked in to version control.
    28  
    29  ## Usage
    30  
    31  ```
    32  otto compile
    33  ```
    34  
    35  This is meant to be the first command you run in your application's root
    36  directory. Otto's other commands will detect if `otto compile` still needs to
    37  be run and let you know.
    38  
    39  ## Example
    40  
    41  Here is an example run from a Ruby project with no `Appfile` present:
    42  
    43  ```
    44  ❯ otto compile
    45  ==> Loading Appfile...
    46  ==> No Appfile found! Detecting project information...
    47      No Appfile was found. If there is no Appfile, Otto will do its best
    48      to detect the type of application this is and set reasonable defaults.
    49      This is a good way to get started with Otto, but over time we recommend
    50      writing a real Appfile since this will allow more complex customizations,
    51      the ability to reference dependencies, versioning, and more.
    52  ==> Fetching all Appfile dependencies...
    53  ==> Compiling...
    54      Application:    website (ruby)
    55      Project:        website
    56      Infrastructure: aws (simple)
    57  
    58      Compiling infra...
    59      Compiling foundation: consul
    60  ==> Compiling main application...
    61  ==> Compilation success!
    62      This means that Otto is now ready to start a development environment,
    63      deploy this application, build the supporting infrastructure, and
    64      more. See the help for more information.
    65  
    66      Supporting files to enable Otto to manage your application from
    67      development to deployment have been placed in the output directory.
    68      These files can be manually inspected to determine what Otto will do.
    69  ```