I am still incredibly excited by Docker. The more I think about it, the more I foresee a revolution in software deployment architectures for SaaSs – yes, SaaSs … I am speaking Parseltongue. If you remember my previous article, I wrote a guide on how to deploy a Java application – Stash – with Docker. That worked pretty well, but I deferred further automation to a later date. In this second post I am going one step further with automation, exploration, and awesomeness. My long-term plan is simple: one-button cluster deployment of all Atlassian products configured and linked together, ready to go. The latest Docker release makes things even more convenient with container naming and linking support. In this installment I’ll cover: Automated build of containers for Stash, JIRA, and PostgreSQL. How to inspect containers and wire them up. The Dockerfiles that automate building the images from scratch. Tips and repeatability. Let’s ride further down the automation line. Before we start: install Docker A few prerequisites are needed before we start: On Linux, install Docker and you’re ready. On Mac, install Vagrant and run: git clone https://bitbucket.org/atlassianlabs/atlassian-docker cd atlassian-docker vagrant up (wait … wait … wait…) You’ll get an Ubuntu 13.04 ready with Docker already running. Now you can ssh into the box with: 1vagrant ssh After you ssh into the Vagrant instance type sudo docker pull base to pull the docker images called base (Ubuntu 12.10 at the moment). The short version: Install Stash and JIRA with PostgreSQL in a jiffy I brought down the effort of setting up Stash, JIRA with PostgreSQL in three containers to a single command. Change directory (cd) into the shared vagrant folder that links your host to the vm (or clone the atlassian-docker project again in the container) and run: 1/vagrant/build_and_deploy_stash_jira.sh You’re done. Now wait for the whole build to complete and for the Java processes to startup (it can take several minutes). After that you can access: Stash on http://localhost:7990 JIRA on http://localhost:8080 PostgreSQL running on port 5432. Now you can proceed to perform the initial web initialization of Stash and JIRA: You’ll be required to enter IP address, ports and database credentials of PostgreSQL. Read below to get the credentials and to learn to inspect the containers. Inspecting And Wiring Containers If you’ve been following along, now when you query Docker about the running containers we get three: 123456sudo docker ps ID IMAGE COMMAND CREATED STATUS PORTS d11f14b62f75 durdn/jira-6.1.1 /opt/jira/bin/start- 3 minutes ago Up 3 minutes c63a987b160f durdn/stash-2.9.1 /opt/stash/bin/start 4 minutes ago Up 4 minutes 216abca5886f zaiste/postgresql […]