github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/website/source/intro/getting-started/build.html.md (about)

     1  ---
     2  layout: "intro"
     3  page_title: "Build"
     4  sidebar_current: "gettingstarted-build"
     5  description: |-
     6    Build the application to prepare it for deployment in this getting started guide.
     7  ---
     8  
     9  # Build
    10  
    11  Now that we have an infrastructure, the next step is to prepare the
    12  application for deployment by building it. The build step turns your
    13  application into a deployable unit. This might be an Amazon Machine Image,
    14  a Docker container, etc.
    15  
    16  For our simple example, Otto will create an AMI to launch.
    17  
    18  To build the application, run `otto build`.
    19  
    20  This step is likely going to ask you for permission to install
    21  [Packer](https://www.packer.io). Otto uses Packer under the covers
    22  to build deployable artifacts. If you say yes, Otto will install
    23  this for you. If you already have the latest version of Packer
    24  installed, you won't be asked.
    25  
    26  After installing Packer, Otto will once again ask you for your credentials.
    27  This time, however, just enter the password you used to encrypt them
    28  when building the infrastructure, and Otto will be able to read your
    29  saved credentials.
    30  
    31  Next, Otto will go forward and build an AMI that can be launched.
    32  This will take a few minutes. Within the AMI, Otto installs Ruby, configures Passenger (a Ruby
    33  application server), and more. Again, depending on your application type,
    34  Otto will install different things here.
    35  
    36  ```
    37  $ otto build
    38  ...
    39  
    40  ==> otto: Creating the AMI: otto-getting-started 1442990619
    41      otto: AMI: ami-4b19662e
    42  ==> otto: Waiting for AMI to become ready...
    43  ==> otto: Terminating the source AWS instance...
    44  ==> otto: Cleaning up any extra volumes...
    45  ==> otto: No volumes to clean up, skipping
    46  ==> otto: Deleting temporary security group...
    47  ==> otto: Deleting temporary keypair...
    48  Build 'otto' finished.
    49  
    50  ==> Builds finished. The artifacts of successful builds are:
    51  --> otto: AMIs were created:
    52  
    53  us-east-1: ami-4b19662e
    54  ==> Storing build data in directory...
    55  ==> Build success!
    56      The build was completed successfully and stored within
    57      the directory service, meaning other members of your team
    58      don't need to rebuild this same version and can deploy it
    59      immediately.
    60  ```
    61  
    62  **Congratulations!** You've just built an AMI that can be launched!
    63  
    64  Imagine you're a developer that doesn't know how to properly configure
    65  a server to serve an application you've built. In one command, Otto has
    66  done this for you, for your specific type of application, and has
    67  pre-configured the server with safe best practices.
    68  
    69  ## Status
    70  
    71  You can see the status of your build at any point by running
    72  `otto status`. Since the prior step, you can see that the build status
    73  is now "BUILD READY":
    74  
    75  ```
    76  $ otto status
    77  ==> App Info
    78      Application:    otto-getting-started (ruby)
    79      Project:        otto-getting-started
    80      Infrastructure: aws (simple)
    81  ==> Component Status
    82      Dev environment: CREATED
    83      Infra:           READY
    84      Build:           BUILD READY
    85      Deploy:          NOT DEPLOYED
    86  ```
    87  
    88  ## Build Speed
    89  
    90  The granularity of a build is currently at the machine level and
    91  creates an AMI (for AWS). In the very near future, the build step will
    92  build a container that is deployed using [Nomad](https://www.nomadproject.io).
    93  
    94  When this change comes, the build and deploy steps should become much
    95  faster, creating a much tighter feedback loop to deploying applications.
    96  
    97  This again shows the strength of Otto: as tooling and technology improve,
    98  Otto can adopt these new best practices and manage them for you automatically.
    99  As a developer, you can focus on your application, and Otto does the rest.
   100  
   101  ## Next
   102  
   103  In this step, we built an AMI for our application. Along with the previous
   104  step, we now have an infrastructure and an AMI. We're now ready to
   105  [deploy the application](/intro/getting-started/deploy.html)!