Gaudi News: gaudi.io, apt-get install gaudi, ambassadors, and more!
It was the occasion to announce a new dedicated website for gaudi: gaudi.io. Documentation, tutorials, online configuration builder, you'll find all things related to gaudi there. Thanks to @DaphDaOne & @francoisz for making this website possible.
I'm proud to announce that gaudi can now be installed from an apt repository (on Debian & Ubuntu):
wget -O - http://gaudi.io/apt/gaudi.gpg.key | sudo apt-key add - echo "deb http://gaudi.io/apt/ precise main" | sudo tee -a /etc/apt/sources.list sudo apt-get update sudo apt-get install gaudi
Docker is not yet available on official Ubuntu repositories for versions up to 13, so if you're stuck there, install docker by hand before installing gaudi.
You can now attach it to a MySQL component to get a shiny web application for managing your database:
This component contains an apache server listening on the specified port, and serving a phpMyAdmin application.
Docker alone doesn't allow linking of containers across multiple servers. Docker containers communication is restricted to the private network by design. Ambassadors lift that constraint, and they're now in gaudi.
So how can we deal with distant communication of Docker containers? Developers from Century Link Labs recently wrote about this subject:
Ambassadors are containers whose sole purpose is to help connect containers across multiple hosts
The magic behind Ambassadors is socat, a command line utility that allows socket manipulation and port forwarding.
Let's discover how gaudi integrates ambassadors with a simple redis client / server example:
On the distant machine, create a
applications: redis: type: 'index' image: 'dockerfile/redis' ambassador: type: 'remote' port: '6379'
Start the `redis server with:
On the local machine, create a
.gaudi.yml to start the redis client:
applications: redis-cli: type: 'index' image: 'vieux/redis-cli' environments: REDIS_PORT_6379_TCP_ADDR: [here to IP of the remote server] ambassador: type: 'local' port: '6379'
redis client with:
You can now attach the client container, and communicate with the distant server:
$ docker attach redis-cli
In previous versions of gaudi, each time the configuration file was changed, you had to rebuild manualy all containers with the
gaudi rebuild command.
But that was before: gaudi now stores a checksum of your configuration file, and rebuilds automatically all containers when it detects a change.
Who doesn't get impatient when gaudi is building a container? The first launch, pulling the base image, and building containers, may take up to 10 minutes.
Thanks to a small Go trick, stdin & stdout are now attached to the build result.
This feature will now display the building progression, and delight impatient people.
Container customization is now simplified with the ability to add specific files (like configuration files) to a container:
applications: app: type: 'apache' add: conf.ini: '/root/conf.ini' dir/conf2.ini: '/root/conf2.ini'