Skip to content

Commit

Permalink
Improve readme outline
Browse files Browse the repository at this point in the history
- Add the official whales icon
- Add "How does it work" & "Architecture" section

Closes #13
  • Loading branch information
mayra-cabrera committed Jun 28, 2017
1 parent 2884cfc commit 24ee34a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 30 deletions.
74 changes: 44 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,49 @@
[![Test Coverage](https://codeclimate.com/github/WhalesIL/whales/badges/coverage.svg)](https://codeclimate.com/github/WhalesIL/whales/coverage)
[![Made with Love by Icalia Labs](https://img.shields.io/badge/With%20love%20by-Icalia%20Labs-ff3434.svg)](https://github.com/IcaliaLabs)

# Whales

<p align="center">
<img src="whales.png" height="200px" alt="whales"/>
<img src="whales.png" height="300px" alt="whales logo"/>
</p>

## Overview

Whales is a tool that automatically dockerizes your applications. It works as command line interface that tames the [Belugas](#belugas-analyzers) features analyzers and outputs necessary Docker files to run your application with Docker.
Whales helps you dockerize your applications by outputting the necessary files to run your application with Docker. Check it out:

<p align="center">
<img src="demo.gif">
<img src="demo.gif" height="300px" alt="whales demo"/>
</p>

## Table of contents
---

- [Why](#why)
- [Installation](#installation)
- [Usage](#usage)
- [Belugas Analyzers](#belugas-analyzers)
- [How does it work](#how-does-it-work)
- [Architecture](#architecture)
- [Contributing](#contributing)
- [Credits](#credits)

## Why?

Dockerizing your legacy apps was never this easy. We present you the Whales ecosystem: A set of tools to automatically dockerize your applications.
- [License](#copyright)

## Installation

### Prerequisites
Whales is distributed and run as a Docker [image](https://hub.docker.com/r/whalesil/whales/), so the only thing you need is to have Docker [installed](https://docs.docker.com/engine/installation/) and running on your machine. After that just fire up your terminal and run:

Whales is distributed and run as a [Docker](https://hub.docker.com/r/whalesil/whales/) image, so you only need to have Docker [installed](https://docs.docker.com/engine/installation/) and running on your machine.

### Setup

Fire up your terminal and run:

```console
```bash
docker pull whalesil/whales:latest
```

And that's it!
And that's it! You're ready to use Whales!

## Usage

Here's where the magic begins, first of all in your terminal go to the project directory you want to dockerize:

```console
```bash
cd code/path_to_project/
```

And then just execute the following command:

```console
```bash
docker run \
--interactive --tty --rm \
--env API_BASE_URI=whales.herokuapp.com \
Expand All @@ -62,27 +53,50 @@ docker run \
--volume $(pwd):/code whalesil/whales
```

By default Whales returns `dev.Dockerfile` and `docker-compose.yml` files, this are the files you need to run Docker on development mode. If you want the `Dockerfile` for production, just run the same command with an `-e="production` flag:
By default this command will return `dev.Dockerfile` & `docker-compose.yml` files, these are the files you need to run your application in a dev environment with Docker. These files are not perfect, but we're hoping them to be a great starting point for you.

```console
If you need the files for a production environment, run the following command:

```bash
docker run \
--interactive --tty --rm \
--env API_BASE_URI=whales.herokuapp.com \
--env BELUGAS_CODE="${PWD}" \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume $(pwd):/code whalesil/whales whales tame -e="production"
```
```

## Belugas Analyzers
Until now, this command only returns the `Dockerfile` for production, `docker-compose.yml` its on his way.

Whales uses Belugas analyzers to detect multiple features on a project based on a code static analysis, in other words, thanks to this analyzers we can detect which language, framework, database and dependencies your project use.
### How does it work?

Currently we have the following analyzers
Whales works as a command line interface based on features analyzers, these analyzers can detect multiple features on your project through a code static analysis, in other words, thanks to these analyzers we can detect what language, framework, database and other dependencies your project uses.

Currently, we have three feature analyzers:

- [Belugas Ruby](https://github.com/WhalesIL/belugas-ruby)
- [Belugas PHP](https://github.com/WhalesIL/belugas)
- [Belugas Python](https://github.com/WhalesIL/belugas-python)

The above implies we only support 3 languages: Ruby, PHP & Python

### Architecture

The architecture is simple, it is composed of a flow chain of micro-apps that work together to dockerize your project, we call these "Whales and Belugas Team", this is the outline they follow:

1. The command you send on the terminal conveys a signal to Whales, so he can start the process of dockerizing your application.
2. Whales ask his bud [Belugas](https://github.com/Gueils/belugas) the features of your project. [Belugas](https://github.com/Gueils/belugas) is the head member of the Belugas Team: _The Feature Detector Team :whale:_
3. [Belugas](https://github.com/Gueils/belugas) starts by calling his smarty-pants bud, [linguistic](https://github.com/Gueils/belugas-linguist) to find out the primary language your project is using.
4. Depending on this language, [liguistic](https://github.com/Gueils/belugas-linguist) will ask one of his other buddies: [belugas-ruby](https://github.com/Gueils/belugas-ruby), [belugas-php](https://github.com/Gueils/belugas-php) or [belugas-python](https://github.com/Gueils/belugas-python) to search specific information in your repo.
5. When they're done, these fellows will send back the information founded (features) to the main [Belugas](https://github.com/Gueils/belugas).
6. [Belugas](https://github.com/Gueils/belugas) will send the features to Whales.
7. Whales will receive the features and used them along with his intelligence to build the need it Docker files
8. Finally, Whales will display the files on the terminal

### What's with the cetacean name?

Well, they're really cool [animals](https://en.wikipedia.org/wiki/Beluga_whale)! :whale: :whale2: :dolphin:

## Contributing

Everyone is freely to collaborate, just make sure you follow our [code of conduct](https://github.com/WhalesIL/whales/blob/master/CODE_OF_CONDUCT.md). Thank you [contributors](https://github.com/WhalesIL/whales/graphs/contributors)!
Expand Down Expand Up @@ -113,4 +127,4 @@ See [LICENSE](https://github.com/WhalesIL/whales/blob/master/LICENSE.txt)

![Icalia Labs](https://raw.githubusercontent.com/icalialabs/kaishi/master/logo.png)

Whales is maintained by [Icalia Labs](http://www.icalialabs.com/team)
Whales is maintained with love by [Icalia Labs](http://www.icalialabs.com/team)
Binary file modified whales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 24ee34a

Please sign in to comment.