Automating development environments and deployment with Otto
Ottomatic
New web applications often work reliably on the developer's machine and everything looks great – until the developer deploys the web page on a public web server, that is. All of a sudden it fails to deliver images because of strict access permissions, while the app complains about missing PHP libraries. Why is it that the engine always starts to stall when the most important release deadline is just around the corner? A tool named Otto [1] promises an elegant solution to this dilemma.
Delivery Hero
Otto first sets up a tailored development environment on the programmer's system. When called upon to do so, it bundles the finished application onto a virtual machine and automatically launches it on a production system or in a cloud. Otto not only ensures that all the required libraries, frameworks, and services exist, it also protects the production system against attacks.
Does your project need a database? Again, this is no problem: Otto installs the database and automatically sets it up to meet your requirements. In everything it does, Otto orients its approach on trusted best practices. Otto is even smart enough to identify some of the required dependencies based on the source code.
After the developer has finished revising the application, all it takes is a single command at the command line to transfer the application to the production system. In this way, Otto actively supports the principles of continuous integration [2] or continuous delivery [3], allowing developers to extend their projects quickly, add new features, and deliver the goods. Because they handle classical administrative tasks in this process, they then naturally enter the realm of DevOps [4].
Old Friends
The company behind Otto is HashiCorp. This California company is mainly known for its Vagrant tool, which semi-automates the process of creating virtual machines [5], which sounds suspiciously like one of the tasks handled by Otto. In fact, Otto draws on Vagrant and many other HashiCorp tools in the background to do its work, and it all happens transparently for the user, who has no contact at all with the tools. Otto is released under Mozilla Public License Version 2.0, and development is an open process on GitHub [6].
Otto has one drawback: It is still very much at the start of its development path. When this article was written, the latest version was 0.1.2, and at the time of press, version 0.2.0 had been released. Version 0.1.2 contained only a small portion of the intended functionality. On a brighter note, Otto handled the functions that are implemented perfectly in our lab – with one minor exception.
Instant Web
HashiCorp delivers Otto as a prebuilt package for 32-bit, 64-bit, and ARM Linux, as well as 32- and 64-bit Mac OS X and Windows. If you want to deploy the tool, you only need to download the matching ZIP archive [1] and unpack to your hard disk, revealing the lightweight otto
program, which weighs in at just 15MB. Although you can call it directly – there is no need to install – HashiCorp does recommend adding otto
to your PATH
.
In addition to Otto, you also need VirtualBox version 4.2.0 or newer, as well as the latest version of Vagrant. Some of the major distributions let you install the two tools through the package manager; if not, you can pick up the packages for VirtualBox [7] and Vagrant [8] online. Future versions of Otto will install all the required tools automatically, and the plan is for Otto eventually to replace Vagrant [9].
Buy this article as PDF
(incl. VAT)