Monday, February 24, 2014

The Dashbuilder demo gets Docker-ized

   During the last week I've been playing a little with Docker. Docker is an open-source virtualization technology that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere.  For those interested in getting all the details  I recommend watching this excellent presentation given by the Docker's founder Solomon Hykes.

   In a nutshell, what Docker provides is a platform for:
  • Creating custom images. an image could be an application, a custom Linux distro, a service or whatever packaged Linux software you can imagine. An image it's basically composed by a base Linux distro plus some software installed and configured on top of it. 
  • Sharing a custom image with others via the Docker's central repository - https://index.docker.io. You can push your own images, search for images and pull images created by others.
  • A daemon service (accessible via a REST API) plus a command utility package for creating containers and managing its life cycle: list the available containers, start/stop a container instance, etc.
   What I've done in Dashbuilder is to create a Docker image containing the latest demo of the project and push that image to the Docker shared repository. 


Installation

   Before going further, you need to install the Docker package on your Linux host. At the time of this writing Docker is only available for Linux based machines. Windows and Mac OSX support is still under development. Please read the Docker package installation.

Once you have Docker installed you can carry on with the demo installation as follows:
  1. Pull the image from the central repo:
    sudo docker pull dgutierr/dashbdemo 
    
  2. Run the image:
    sudo docker run -p 8080:8080 dgutierr/dashbdemo 
    
  3. Open the app:
    http://localhost:8080/dashbuilder  
    Users: root/root, demo/demo
    
      If you actually don't know how to interact with the app, please take a look at the Quick Start Guide.

   Enjoy!   


Image internals

   Our Docker image is based on the mattdm/fedora image, which is basically a Fedora 20 distro, plus the following software installed:
  • Open JDK 1.7.0,
  • Git client, and 
  • A git clone of the Dashbuilder demo repository.

No comments:

Post a Comment