Introducing Whales
Dockerizing your applications was never this easy
You probably have heard of Docker, have you? That magic tool that allows programmers to mix and match technologies, distribute and manage applications in isolated containers. Basically, Docker bridges the gap between development and deployment processes, reducing efforts and risk problems within application dependencies inside containers, in other words, Docker is a new way of doing almost everything in containers, and also is open source
Docker containers are great, but implementing them was a little more complicated than it needed to be. That’s the main reason why we buckle up at Icalia Labs and built Whales a set of tools that helps you dockerize your applications, go and see the demo for yourself.
How does it work?
All you need for Whales is to have Docker up and running on your machine and then just run the following command inside the folder of the application you want to dockerize:
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
By default, it will output the files (dev.Dockerfil
& docker-compose.yml
) you need to run your application with Docker in a development environment. If you want the Dockerfile
for production, no worries we have a command for that too:
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”
See it for yourself:
Architecture
The Architecture is simple, it is composed as a flow, a chain of micro-apps that work together to dockerize your project. We call these Whales and Belugas (A type of whale)
The command you send on the terminal sends a signal to the starting whale to start the process of dockerizing your project.
All of these whales have a single responsibility in the process and each of them depends on the rest, it is a chain of requests between them to dockerize your project.
This is the diagram flow:
Now, let’s summarizes what is happening:
Dev
runs a command to dockerize his project.whales
ask his budbelugas
the features of your project.Belugas
is the head member of theBelugas Team
. The Belugas Team is the Feature Detector Team andBelugas
starts by calling his budbelugas-linguistic
to start gathering the features.Belugas Linguistic
will take your repo and detect what language is build on then it will callbelugas-<language>
to gather the features of your project.- Depending on the language,
belugas-php, belugas-ruby or belugas-python
will analyze your project to gather the features it can find. - Then
belugas-<language>
will send the features back tobeluga
. Beluga
will send the features towhales
.whales
will receive the features and send them towhales-api
.whales-api
will check the features and gather the recipes to compose theDockerfile
anddocker-compose.yml
and display it on the terminal.Happy Dev
has a dockerized project.
This is the process the Whales Team
goes through each time a Dev needs to dockerize a project.
Supported Languages
Whales use 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.
Currently, we have the following analyzers:
- [Belugas Ruby](https://github.com/Gueils/belugas-ruby)
- [Belugas PHP](https://github.com/Gueils/belugas)
- [Belugas Python](https://github.com/Gueils/belugas-python)
We hope the Whales Team could help you dockerize your project!
You liked this? Starred us on Github o send us some love at Twitter