Panamax Docker Application Template: A Classic 3-Layer WordPress Web Application Cluster with Load Balancer

Why this template?

This Panamax template gives you two WordPress installations that will be sharing web traffic. This will be done through an HAProxy load balancer. We’re using MySQL as the database for both WordPress installations. This template gives you a real world example of how to use Docker and Panamax’s application templates to quickly set up a classic 3-layer web application cluster.

Panamax

Panamax is Docker management for humans.

MySQL

MySQL is the world’s most popular open source database.

WordPress

WordPress is a web software you can use to create a beautiful website or blog.

HAProxy

HAProxy is a reliable, high performance TCP/HTTP load balancer

System requirements

  • RAM: 512 MB Minimum, 1GB Recommended, 2GB Preferred
  • Cores: 1 core Minimum, 2 core Recommended

Images used

tutum/mysql:latest The most popular and easy to use mysql image on docker hub.

tutum/wordpress-stackable:latest A WordPress image that can connect to other databases like MySQL, MariaDB.

tutum/haproxy:latest A well maintained load balancer, and easy to use by simply linking to it.

Setup and access

You need to set up port forwarding through VirtualBox. This can be done by entering virtualbox into your terminal. You will select panamax-vm  and go to Settings > Network > Port Forwarding and set the Host Port to 3333 or whatever you want, and the Guest Port to 80. This will let you access your WordPress installation through the assigned port.

Panamax VirtualBox

You will need to go to the Manage tab of Panamax and add the repository https://github.com/tifayuki/panamax-contest-templates/ to your Sources.

Panamax Sources

Go to the Search tab and search for this template by typing in WordPress, finding WordPress – High Availability and click Run Template.

Panamax WordPress

You can access the load balanced WordPress on http://localhost:3333 (replace “3333” with your designated port from the previous step)

Panamax WordPress Install

Scalability

You can add more WordPress instances to the cluster by adding more sections described in the template under category: Application Tier, and add a corresponding link in category: Load Balancer Tier.

Note:

  • By default, the media uploaded to WordPress is stored inside the container’s file system, not in the database. Thus, an image uploaded to one container may not be accessible by the other container.
  • To solve this, we use volume to share the /app/wp-content folder.
  • To avoid permission problems, please ensure that /app/wp-contents exists on your Panamax host before launching this template.

To download Panaxmax, please visit: http://panamax.io/

To see the source, please visit: https://github.com/CenturyLinkLabs/panamax-contest-templates/blob/master/wordpress_high_availability.pmx

Tagged with: , , , , , , ,
Posted in Uncategorized
3 comments on “Panamax Docker Application Template: A Classic 3-Layer WordPress Web Application Cluster with Load Balancer
  1. I get pleasure from, lead to I discovered just what I used to be looking
    for. You’ve ended my 4 day long hunt! God Bless
    you man. Have a nice day. Bye

  2. Anglea says:

    Hi Dear, are you really visiting this web page on a regular basis, if so afterward you will without doubt take pleasant knowledge.

  3. Estoy con psoriasis desde hace 2 años y testado varios métodos de curación con limitado acierto

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories
%d bloggers like this: