Rancher Part 4:  Using the Catalog Example with GlusterFS

image_pdfimage_print

As promised, it’s time to get to the catalog goodness. Since GlusterFS hasn’t gotten enough love from me lately, it’s time to bring that into the process as part of my Rancher demo. The goal with this exercise is to spin up a GlusterFS environment and to expand it using the built-in capabilities provided by the catalog.

Deploying an Application from the Rancher Catalog

Go to the Applications menu option and select Catalog from the secondary menu. That will bring you to the built-in application catalog screen:

applications-catalog

There are a neat array of applications to choose from which target a number of typical core services. In the left hand pane, you can see that they can be searched and sorted by category. The default shows the full list.

We want to try out a GlusterFS demo because it will show us how a multi-container stack is deployed, plus we get to expand it as well using the Rancher UI. Find the GlusterFS link in the catalog and click the Launch button:

glusterfs

We have a few options available as you would expect. We can choose the name of the stack, a free-form description text field, and also the

add-glusterfs-stack

What’s even cooler is that you can expand the Preview link to expand the window. This will give us the two YML files that could be used from the command line interface to create this same cluster:

compose-yml

You can see the contents of the sample YML files here for each of the docker-compose and rancher-compose that I’ve copied out to GitHub gists for better viewing:

Docker Compose: https://gist.github.com/discoposse/4cb03c3abfa60d1d9a40

Rancher Compose: https://gist.github.com/discoposse/2f7c1a24aca645a93567

Once you complete the wizard, the GlusterFS stack will spin up and you will see the results within a couple of minutes”

glusterfs-running

You can look at your running stack by clicking on the name in the Stacks view. This will bring up the screen showing some details about the application, commands, status, and also the containers further down the page.

glusterfs-stack-details

Yes, it is just that easy.

wait-there-is-more

Scaling up the GlusterFS Cluster in Rancher

Now that we have our GlusterFS environment running, we can expand it by a couple of nodes to illustrate how easy it is to scale the application.

In the Stacks view, you simply click the +Scale Up button

scale-up

As you wait and watch, the view will update showing the network address, and container status. Once completed, it will look something like this:

add-glusterfs-node-1

You can do it again to show just how easy it is to add another node:

add-glusterfs-node-2

To confirm that the application itself has recognized the new nodes, let’s spark up a terminal shell and see how the health of the GlusterFS cluster is. You can do this easily by hovering on the container in the view and the clicking the context menu which brings up the Execute Shell option:

execute-shell

 

We can use the glusterfs pool list which will tell us which servers are actively attached to the GlusterFS pool. As you can see from the example here, there are 5 nodes in the pool:

glusterfs-pool-list

To manage the scale level, including reducing the scale manually, you can use the + and – buttons that appear in the Stack details view:

scale-details

Was that both fun and easy? Why, yes it was.

jack-yes

Join us in our upcoming 5th post in the series as we explore the advanced container configuration options. This is a great opportunity to explore core Docker concepts as well, so put on your thinking caps for that one!

DiscoPosse

People, Process, and Technology. Powered by Community!

You might also like

2 Comments

  • Ankur
    November 18, 2015 at 1:35 pm

    You need a section on how to use the volume you have created. Is there a single volume for the entire cluster?

    • DiscoPosse
      DiscoPosse
      November 19, 2015 at 8:18 am

      Excellent catch Ankur! I’ve got a GlusterFS post ready to go shortly on that to cover the inner workings on that environment.

LEAVE A COMMENT

Proudly Sponsored By

Advertisement

GC On-Demand

Subscribe to the Blog

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Upcoming events:

Archives