How to use Cloud Explorer with Scality S3 server

I spent a few weeks searching for an open-source S3 server that I can run at home to test Cloud Explorer. I first came across Minio which is an open-source S3 server but I could not get it to work with Cloud Explorer because it had issues resolving bucket names via DNS which is a requirement using the AWS SDK. I then read an article about Scality releasing an open-source S3 server that you can run inside a Docker image. I was able to get Scality up and running quickly with little effort. In this post, I will explain how I got the Scality S3 server setup and how to use it with Cloud Explorer.

First, I needed to run the Scality Docker image which was a simple one-liner:

docker run -d –name s3server -p 8000:8000 scality/s3server

Next, I needed to modify /etc/hosts on my laptop to resolve buckets properly with Cloud Explorer. By default, the Scality Docker image resolves to localhost which can be changed. I appended the bucket names that I will use for this test (test and test2) to the localhost entry in /etc/hosts. localhost test.localhost test2.localhost

Now I can configure the Scality S3 credentials in Cloud Explorer as shown below. I used the default Access and Secret keys by the Docker image.

View post on

Now Let’s create a bucket:

View post on

And there it is!

View post on

Let’s upload a file to make sure it works:

View post on

The file is there!

View post on

Now let’s run a performance test just for fun:

View post on

It was really cool that Scality released this as open-source. Not all of the Amazon S3 features are supported by Scality such as file versioning and others but I hope that this project continues to be worked on and gains community involvement. Please check it out and let me know how you like Cloud Explorer. Please file any bugs on the GitHub issue tracker.

Running WordPress on Kubernetes

I recently started to check out Kubernetes and wanted to share with everyone how I got WordPress running on it as a three-tier application. I made the decision to learn Kubernetes because Docker Swarm was not working well for me. To start, I downloaded and installed MiniKube on my laptop.

I then created three Docker images and pushed them to my Docker Hub registry:


The Nginx image consists of the WordPress zip archive and the Nginx web server with a custom configuration file. The Phpfpm image contains Phpfpm and the WordPress zip archive. The MySQL container consists of the MySQL database server with a few tweaks such as setting the default root password to ‘sql’ and granting table access to anyone with a password.

Now that I have my Docker images ready, I can create the Kubernetes manifest file:

After the manifest file is created, I will deploy it with kubectl:

kubectl create -f wordpres.yaml

To access WordPress, you can connect to it easily with Minikube:

minikube service nginx

Now you should be able to see the WordPress installation screen. Return to the terminal and create a database.

kubectl get pods (To find the Mysql pod name)
kubectl exec -it mysql-qe900 bash
create database wordpress;

Return to the WordPress installation in your browser. Here is the database credentials to use during the setup:

Username: root
Password: sql
Database Name: wordpress
Database Host: mysql

Finish the installation and you should have a Working Blog!

The nice thing about Kubernetes is that you can scale parts of an application. Since this exercise has WordPress broken up into three pieces, I can choose the components that I want to scale. For example, the Nginx and Phpfpm pods can be replicated and scaled across different nodes as needed. I would not recommend scaling the MySQL database unless you setup replication right after to avoid data inconsistency.

I hope that you learn how easy it is to use Kubernetes and give it a go!

Forking Docker will lead to more fragmentation

If you have been keeping up with Docker lately, you may have come across my blog post about the sad state of Docker. In this post, I go over how the 1.12 release appeared interesting from all the marketing announcements and the constant copying and pasting of the same Docker content into blogs over the world. However, many others and I expressed our opinions on Hacker News on how Docker failed to deliver a quality product and how they failed to create a quality release. The New Stack then summarized all of the weekend discussions going on in a new blog post and discussed that a fork of Docker may arise. Is a fork really the best answer? Let’s take a look.

The nice thing about open source software is that anyone can take the software and modify it as needed or even create their own version of the software for redistribution. Software repositories like GitHub make it really easy for developers to fork a project and begin making their own changes and improvements. A recent example was the fork of OwnCloud into NextCloud. My problem with forking is that it leads to fragmentation. I personally like one or two ways of doing something well versus many different ways to partially achieve the same goal.

The container space is already starting to grow rapidly in terms of building and orchestration. The biggest container format is of course Docker and they have Swarm for their container orchestration. CoreOS also has their own container runtime called Rocket which is starting to gain traction and uses Kubernetes for orchestration. There are many other companies sprouting up in the container management area with their own unique solutions. However, Kubernetes appears to be coming the standard orchestration layer that many products use now. To help standardize containers, the Open Container Initiative (OCI) was formed to help define how containers work.

The OCI was created by members of CoreOS, Red Hat, Docker, and a few others on June 22, 2015 and gained support from companies like Apcera, Google, Apprenda, Amazon, and many more. Collaboration between companies for the greater good is terrific and we need more of this. Docker made strides to make an official OCI compliant version in their v1.11 release. Progress is being made to better standardize in this space but it takes time to achieve. Instead of forking Docker, the community should continue to raise their concerns in a nice manner and wait a little bit longer for change to happen.

Creating more fragmentation will be counterproductive because the attention of the people will be split amongst projects. How will companies new to containers and microservices ever learn to adopt this great new way of doing things if they can never decide on what to use? Anyone can fork Docker but we need to ask ourselves if another container solution is really needed when we have many to choose from already. If the answer is yes, we must ask ourselves who will maintain it? How long can this fork last? How much time will be wasted? Do the forkers have enough resources to make a quality project? How will they make their product secure and address vulnerabilities?

How about instead we stay positive and keep containing?

The Sad State of Docker

I have always been a big fan of Docker. This is very visible if you regularly read this blog. However, I am very disappointed lately how Docker handled the 1.12 release. I like to think of version 1.12 as a great proof of concept that should not have received the amount of attention that it already received. Let’s dive deep into what I found wrong.

First, I do not think a company should market and promote exciting new features that have not been tested well. Every time Docker makes an announcement, the news spreads like a virus to blogs and news sites all over the globe. Tech blogs will basically copy and paste the exact same procedure that Docker discussed into a new blog post as if they were creating original content. This cycle repeats over and over again and becomes annoying because I am seeing the same story a million times. What I hate most about these recent redundant articles is that the features do not work as well as what is written about them.

I was really excited hearing about the new Swarm mode feature and wanted it to work as described because this means that one day I can easily make a Swarm cluster with my four Raspberry Pi’s and have container orchestration, load balancing, automatic failover, multi-host networking, and mesh networking features without any effort. Swarm in v1.12 is very easy to setup versus the predecessor and I wanted to put it in production at home (homeduction). To test Swarm, I setup a few virtual machines using docker-machine on my laptop and went through the Swarm creation process and then began to run into issues when deploying my applications.

An important feature to have in a Swarm cluster is multi-host networking for containers. This allows containers to talk to each other on a virtual network across many hosts running the Docker engine. Multi-host networking is important for containers to communicate with each other such as web application connecting to another container with MySQL. The problem I faced is that none of my containers could communicate across hosts. When it did work sometimes, the mesh networking would not route traffic properly to the host running my container. This means none of my applications worked properly. I went to the Docker forums and many people shared my pain.

It is not wise to explode the Internet and conventions with marketing material about exciting new features that do not work as presented. There are still many bugs in Swarm that need to be fixed before releasing to the general public to have them beta test for you. What is the rush to release? Will it hurt that much to wait a few more weeks or months to do it right and have the product properly working and tested? Yes, we all know Docker is awesome and is trying to play catch up with competitors such as Apcera and Kubernetes, but please take it slow and make Docker great again!

[Edit 8/31/2016]

Tweaked paragraphs to make it more clear that my testing was not done on the Raspberry Pi and done with docker-machine on a laptop.

Moving from a single machine with Docker to a cluster of Pi’s

I decided to finally make use of my four Raspberry Pi model 3’s and take the challenge to move all of my home services to them. Previously, I ran a x86 Desktop as a server in my living room. The loud noises coming from the server made it uncomfortable to be in sometimes. The loud noisy box is home to this website and many other applications such as Plex, Transmission, OpenVPN, Jenkins, Samba, and various Node.js projects all running in Docker. Having all of those applications running on a single box is a single point of failure and makes system administration harder when reboots are required.

To make administration easier, I decided that one Pi should be a load balancer for as many applications as possible. Yes, I know that having a single Pi as a load balancer is also a single point of failure but it makes administrating the other Pi’s easier. I researched how to do HTTP and TCP load balancing with NGINX and made a Docker container for it which runs on one Pi.

Now I needed to think about where to run all of these containers and made a mental map of where to run them. I decided the best way for deploying containers would be through a private local registry so I created a Docker registry on one of the Pi’s and pushed all of the images. Let’s take a look at the application architecture to see what each Raspberry Pi is doing.

Now I have all of my applications from the loud server running on the quiet Pi’s and many of the containers are load balanced. The next task is to figure out a way to manage the containers and automate the image building process. I wrote a complex Bash script that accomplishes my requirements to manage the little cluster of Pi’s using many SSH and GIT commands. I found Git to be the easiest way for me to manage my HTML and configuration files. Since BitBucket offers private Git repositories for free, I used them. If I need to make any changes, my Bash script will do a simple pull from the repository and each node will be in sync. It was a tough journey but I learned a lot.

Running an SSH server in a container on Apcera

SSH is the Swiss Amy Knife of system administration and provides the easiest way to manage a system remotely. When running containers, there is typically someway to connect to a container’s shell from a client that communicates through an API like Docker or by using an SSH solution which is how Apcera does it. Some applications that run in containers may require SSH access to communicate with other containers or services. For example, Hadoop is a popular cluster application that uses a distributed filesystem spread across many nodes and communicates with each other via SSH. Let’s take a look on how to setup an SSH server running inside a capsule (a minimal OS container) on the Apcera Platform.

1. Create a capsule.

2. Connect to the capsule so it can be configured.

3. Run the following commands inside the capsule.

I had to change the port that the SSH server listens on because Apcera uses the default port 22 to provide access to the capsule with their command-line utility APC. Please note that once SSH is installed in a capsule, you will not be able to use “apc app connect” any longer.

4. Expose the SSH port so a external route can be added.

5. Add a route to the application for external access.

Now it is time to add an external route so I can remotely login the capsule with SSH. On Apcera, traffic goes through the central host which contains the router for the entire platform. I need to know the IP address of the central host so I can add the route. If you are using Apcera Community Edition, this can be acquired by running:

The port I am connecting to is 55540 which is a random free port on the system. When I use SSH to login remotely, I will need to specify the port.

6. Connect to the SSH server using the public routing port.

I hope that you found this blog useful on how to install SSH into a capsule on Apcera. The same capsule configuration instructions from step 3 can be used in your Dockerfile if you wanted to run Docker images on the platform. If you have time, check out the Apcera Community edition that can be installed on your laptop or in the cloud for free:

Examining the Apcera Cloud Platform

I like to take a break from my usual Docker blog posts and discuss the Apcera Cloud Platform. The Apcera Cloud Platform runs containerized workloads such as Docker images or applications from source code in a clustered environment. For the past several weeks, I have been playing with Docker Swarm and spent time researching how to put this blog into production on it. Life has been very difficult for this migration because Swarm requires a lot of handholding and lacks the failover automation that I need. I began researching the Apcera Platform and tried out the community edition that users can try for free. The areas that I focused on for my needs regard ease of use and workload portability.


Workload mobility is important for me because I will eventually need to perform maintenance or upgrades on a server that will require downtime. Unlike Docker Swarm, Apcera features a built-in job and health manager that actually works and is not beta code. These managers ensure that my applications are running healthy with the desired number of instances. If a node running this website dies, it will automatically be scheduled to run on another machine in the cluster. This great technology by Apcera makes my life easier because I do not have to worry about Swarm not failing over my applications properly and also risk running rogue containers when the failed node comes back online.


The Apcera Platform makes it easier for me to host this site because the routing is automatically handled by the platform. For example, I can create a cluster that exists at home on multiple VMware ESXI servers and the built-in router can direct web traffic to where this site is running. Apcera features a built-in persistent storage provider called APCFS that I use to store the database for this site.  Another container running MySQL can use the persistent storage so data will not be lost when the container stops running.  If the website or MySQL container fails or moves machines, routing adjustments will be made automatically so the application can use the database.


Scaling the website for performance has also never been easier. From the Apcera Web Console, I can click on an application and increase or decrease the number of instances on the fly and the job manager will make the necessary adjustments on this cluster. It is also easy to accomplish this with the APC command-line utility that comes with Apcera. I hope that you enjoyed this blog post and find a way to run containers in production easier than ever!



Getting started with the many ways to Docker

This is a followup on how to use Docker after building a Swarm cluster. I think it is important for people to understand the different ways to create containers and choose the best way for their needs.This blog post will explain docker-compose, docker engine, and how to do persistent storage.


[Docker Compose]

Let’s begin with docker-compose. This utility allows a user to create a manifest file of all the containers needed and how they communicate with each other. This example will show you how to create a MySQL container and connect it to a web application called nodechat.


Download the sample docker-compose.yml in a new directory. Below is the contents of the file for reference.  Since YAML files are space sensitive and not easy share in a blog post, please do not copy and paste the contents below.



image: rusher81572/mysql
restart: always

image: rusher81572/nodechat
restart: always
– 8080:8080
– mysql:mysql


Type the following command to create the containers.

docker-compose up

A lot of output will be displayed on the screen next and may not bring you back to a terminal prompt. It is safe to press ctrl+c when you see the following:

nodechat_1 |
nodechat_1 | listening on *:8080
nodechat_1 | Creating Database…..
nodechat_1 | Creating Table……

Now that the containers have been created, it is time to start them.

docker-compose start

Run the following command to find out which host is running nodechat with:

docker ps


Use your web browser to navigate to the host running nodechat on port 8080. Feel free to chat with yourself =)


This is how you can stop and remove your running containers built with the compose file:

docker-compose stop

docker-compose rm -f


[Docker Engine]

Now let’s run the equivalent Docker engine commands to accomplish the same result as the docker-compose file so you will have a better understanding on how Docker works.


Pull the image from the repository:

docker pull rusher81572/mysql
docker pull rusher81572/nodechat

Run the containers in daemon mode (In the background) with -d. The -p argument exposes a port for outside access. The format for -p is outside_port:inside_port. The “name” argument specifies a container name. This will allow us to link the nodechat application to the MySQL container simply by using a name. The”link” argument links the MySQL container to Nodechat using the container name. This will allow connectivity between nodechat and MySQL to store the chat data. The format for “link” is:  container_name:link_name.

docker run -d –name mysql rusher81572/mysql

docker run -d –link mysql:mysql -p 8080:8080 rusher81572/nodechat

(If you have any issues copying and pasting the above commands….There should be two “-” before name and link. For some reason, WordPress changes them to a single minus sign)

Find out what host is running nodechat with “docker ps” and use your web browser to navigate to the host running nodechat on port 8080



Dockerfile’s contain all of the steps needed to create a container such as adding files, defining volumes, installing software, and setting environment variables. The following steps will explain how to create persistent storage for containers by creating a container to share volumes with other containers.


Create a directory called “fileserver” with a file called “Dockerfile” with the following contents:

FROM ubuntu
VOLUME /share
CMD sleep infinity

Build the filesever container. The -t argument specifies the tag for the container which is basically a name for it.

docker build -t fileserver .
mkdir data

Run the container in daemon mode. The -v argument allows you to share a local directory inside the container as a volume. Replace location_to_data_dir with the full path to the data directory created in the previous step.

docker run -d -v location_to_data_dir:/share –name fileserver fileserver

(If you have any issues copying and pasting the above command….There should be two “-” before name)


Now we have a container named fileserver that can share volumes with other containers. The files will be store locally in the data directory. To create a client, create a directory called “fileserver-client” with a file called “Dockerfile” with the following contents:

FROM ubuntu
CMD sleep infinity

Build the fileserver-client container image.

docker build -t fileserver-client .

Now let’s run the fileserver-client container in interactive mode to create a test file. Interactive mode runs a container in the foreground so you can see what is happening and even interact with the shell. The argument “volumes-from” will mount all of the volumes from the container specified. Please note that the container will stop and return you to the shell after running the command.

docker run -it –volumes-from fileserver fileserver-client touch /share/foo.txt

(If you have any issues copying and pasting the above command….There should be two “-” before volumes-from)


Run another fileserver-client container to see list of files on the fileserver.

docker run -it –volumes-from fileserver fileserver-client ls /share

Check to ensure that the files are being stored locally.

ls location_to_data_dir/data

The file should be displayed in the terminal. Feel free to play around with this more. I hope that you learned something new today.

Cloud Explorer is back with v7.2

Introducing Cloud Explorer 7.2!

Cloud Explorer is a open-source Amazon S3 client that works on any operating system. The program features a graphical or command line interface. Today I just released version 7.2 and hope that you give it a test drive. Feedback and uses cases are always encouraged.


What’s new in this release?

To start,  this release of Cloud Explorer was compiled with Java 1.8.0_72 and version 1.10.56 of the Amazon S3 Java Development Kit ( JDK). The major improvements in this release regard file synchronization. Basically, it was mostly rewritten. By putting forth the effort, it helped reduce technical debt and consistency between the command line and graphical version of Cloud Explorer.


How do I get it?

Cloud Explorer v7.2 is available under the “Downloads” section of the Release page on GitHub. Simply click on “” and the download will begin. When the download is finished, extract the zip file and double click on “CloudExplorer.jar”.


Where do we go from here?

I know it has been a while since Cloud Explorer has been touched. It is hard to handle a project all by yourself and keep innovating. I feel that with this release, Cloud Explorer reached a stable point.  I am always looking for new ideas and help from the community. If you are interested in contributing, please contact me or open an issue on the GitHub page.


Using Docker Swarm in Production


I have always been fascinated with Docker Swarm and how it can cluster multiple computers together to run containers. I mainly used Swarm via docker-machine with the Virtual Box provider for testing. I felt that now it is time to try and run this in production. This blog post will explain how to create a simple Swarm cluster and secure it with a firewall. Docker officially recommends that you enable TLS on each node but I wanted to make it simpler with firewall rules to prevent unauthorized access.


Docker v1.10 has been installed on each of these machines running Ubuntu 15.10:

node_0 – The Swarm Master.
node_1 – A Swarm node.
node_2 – Another Swarm node.


1. Setup each node to have Docker listen on it’s own host IP address and disable the firewall rules:

First, stop the Docker daemon so we can make configuration changes:

systemctl stop docker

Edit: /etc/default/docker.  Uncomment if needed and modify DOCKER_OPTS as follows:

DOCKER_OPTS=”-H tcp://node_0_ip:2375 –iptables=false”

Start the Docker daemon again:

systemctl start docker

(Repeat this process for all the nodes)

2. On the Swarm Master node, create a cluster token. Each Swarm client will need the token to form a cluster. The output of this command will be a long token that you will need in the next steps.

docker run swarm create

3. On the Swarm Master node, create a Swarm Manager using the token from step 2. The Swarm manager will listen on port 5000.

docker run -d -p 5000:2375 -t swarm manage token://6b11f566db288878e16e56f37c58599f

2. Type the following commands from the master node to join the slave nodes to the cluster using the token from step 2.

docker run -d swarm join –addr=node_0_ip:2375 token://6b11f566db288878e16e56f37c58599f
docker run -d swarm join –addr=node_1_ip:2375 token://6b11f566db288878e16e56f37c58599f
docker run -d swarm join –addr=node_2_ip:2375 token://6b11f566db288878e16e56f37c58599f

3. Since the Swarm manager is running on port 5000 on node_0, we need to tell the Docker client such as a laptop to connect to that host and port to use the cluster. The following command will show the status of the Swarm cluster.

docker -H tcp://node_0_ip:5000 ps


4. Finally, we need to secure the Swarm cluster with firewall rules so that only the nodes in the cluster can talk to the Docker engine. The following rules will deny all incoming traffic and only allow Docker access from the nodes.


ufw allow 22
ufw allow 5000
ufw default deny incoming
ufw allow from node_1_ip
ufw allow from node_2_ip
ufw enable


ufw allow 22
ufw default deny incoming
ufw allow from node_0_ip
ufw allow from node_2_ip
ufw enable


ufw allow 22
ufw default deny incoming
ufw allow from node_0_ip
ufw allow from node_1_ip
ufw enable


Now you should have a three node Docker Swarm Cluster that is locked down. If you need to enable an external port for a container, the firewall rules will need to be adjusted manually.