Development environment.

Armada runs only on Linux as of yet. Thus you need to have a Linux box with Armada installed to start using it. Whether you want to install Armada on your existing machine or setup separate VirtualBox machine for development, it's very easy: Armada installation. We strongly suggest the latter, as we also provide ready-to-use vagrant box with Armada. Using it that way you won't clutter your other environments and interfere with other services in undesired ways.

In most common case, you probably may have some root directory for your projects (e.g. D:\git_projects), and your project directory inside it (e.g. D:\git_projects\coffee-counter). The recommended way to start development is to download Armada's Vagrantfile into your project directory and run new VirtualBox machine using vagrant, e.g.:

D:\>cd \git_projects\coffee-counter
D:\git_projects\coffee-counter> curl -sLO http://vagrant.armada.sh/Vagrantfile
D:\git_projects\coffee-counter> vagrant up

If you are on a Windows box and don't have curl available, you can download it from here.

Our default Vagrantfile is configured to map the directory above it to directory /projects inside vagrant. So, if you ssh to newly created VirtualBox machine (vagrant ssh) you should see all your projects under path /projects. You can use your favourite editor/IDE to edit your project source and the changes will be instantly visible inside vagrant.

To follow next steps along, please copy contents of the file coffee-counter.py from the previous chapter into your project directory coffee-counter/. The code is also available for download:

coffee-counter$ curl -sLO http://armada.sh/docs/coffee-counter.zip
coffee-counter$ unzip coffee-counter.zip
Archive: coffee-counter.zip inflating: Dockerfile creating: src/ inflating: src/coffee-counter.py creating: supervisor/ inflating: supervisor/coffee-counter.conf

Wherever we use prompt coffee-counter$ it means we want to run commands inside our service's main directory in the vagrant box, e.g. /projects/coffee-counter.

Now, we can proceed to build our first Dockerfile.